多个用户使用同一数据集的技术
这更像是一个学习问题,而不是编码,但我确信对于任何在 php/mysql/js 等中开发管理系统或应用程序的人来说,这是一个常见问题。
我开发了一个相当复杂的应用程序,可以让用户上传图像并定义热点其中包含相关操作。图像存储在一个表中,操作存储在另一个表中,每个操作的 json 数据存储在文本字段中。它是自定义阅读应用程序使用的杂志风格格式。然而,正如我所说,这个问题是普遍存在的。
基本上,我担心的是,如果有人同时编辑相同的图像和一组操作,并且他们都提交更改,或者如果它是由其他人编辑的,那么有一整套结构可能会在提交时失败。
我不想实现锁定系统,因为该系统的范围非常广泛(链接到其他图像等),而且我认为它有点丑陋。我在另一个问题中看到了此链接(MSDN多租户架构文章) ,但似乎有点势不可挡,而且专门针对sql server。
那么 - 我可以研究的数据和系统架构术语有哪些,或者人们可以推荐一些与该主题相关的好文章吗?专门针对 php/web 世界会很棒!
——
我仍在寻找关于这个问题的好的答案。同时发现通用术语是“并发”,但技术才是重要的:)
This is more a learning question than coding, but I'm certain it's a common issue for anyone developing administration systems or applications in php/mysql/js etc.
I've developed quite a complex application that lets users upload images, and define hotspots in them with associated actions. The images are stored in a table, and the actions in another, with json data for every action in a text field. It's a magazine style format that is used by a custom reading application. However, like I say, the problem is generic.
Basically, my fear is that if someone is editing the same image and set of actions at the same time, and they both submit changes, or if it was edited by someone else then there's a whole series of structures that potentially will fail on submission.
I don't want to implement a locking system, as the system is very wide ranging (links to other images, etc), and I think it's a bit ugly. I saw this link (MSDN Multi-tenant architecture article) in another question, but it seems a little overwhelming and specialised for sql server.
So - what are the terms for data and system architecture here that I can investigate, or are there some good articles to do with this topic that people can recommend? Specifically for php/web world would be great!
--
I'm still looking for good responses on this question. Found out meanwhile that the general term is 'Concurrency', but technique is the important thing :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先
是所有相关表格。然后,每当您想要提交更改时,不仅使用
,而且
现在如果用户提交更改,它将更新更改计数 - 另一个用户向同一对象提交更改,但从较旧的状态加载,可以被告知“另一个用户已刚刚改变了巴拉巴拉”
First
for all relevant tables. Then whenever you want to submit a change, use not only
but
now if a user submits a change, it will update the changecount - another user submitting a change to the same object, but loaded from older state, can be told "another user has just changed blah blah"