单一数据库和多用户桌面应用程序

发布于 2024-11-18 02:16:32 字数 392 浏览 6 评论 0原文

我对这个概念很陌生,所以我需要指导以了解在以下场景中最好使用什么。

我必须制作一个包含许多功能的桌面应用程序,例如 parts StockEmployees DataCompany Cars Data 等。

现在的问题是许多用户将使用该应用程序,并且办公室位于安装该应用程序的不同城市。

我想要一种方案,如果一个人将任何数据上传到数据库,其他人会得到其反映,其他人会立即得到更新。例如,如果添加更多汽车,每个人都会更新他们的汽车列表。

我想使用 webservices 并且数据应该存储在网站数据库的某个位置,以便每个人的应用程序每隔 20 秒左右刷新一次列表。

任何帮助表示赞赏

I am new to this concept so i need guidance that what will be best to use in following scenario.

I have to make a desktop application that contains many features like parts Stock ,Employees Data,Company Cars Data etc etc.

now the problem is that many users would be using the application and offices situated are in different cities in which this application is installed.

I want a scheme that if one uploads any data to database other gets its reflection and other instantly gets updated.for example if more cars are added everyone using gets their cars list updated.

I was having idea to use webservices and data should be stored somewhere on website database so that everyone's application refreshes lists every say 20 seconds or so.

Any help is appreciated

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温柔少女心 2024-11-25 02:16:32

您不会不断地重新加载所有数据;这里有一些常见的方法:

  • 保留更改列表;如果您添加新数据,您将添加主数据记录并且您会写入发生更改的事实(本质上是一个“事件”列表)。然后,您可以定期查询更改日志以获取和添加/更新/删除,只需
  • 在基础设施允许的情况下询问(x)之后的所有事件,某种发布/订阅框架 - 实际上相同的方法,但通常使用中间件进行更改,而不是主要的数据库

如何获取数据;投票简单有效;主动推送更难设置,但可能会减少延迟 - 不确定在这里是否值得。

另一种方法是将其设计为 Web 应用程序 - 然后所有数据都存储在服务器场中,并且可以立即更新。您的“桌面”应用程序可能是使用 ajax 的网页

You wouldn't reload all your data constantly; there are a couple of common approaches here:

  • keep a list of changes; if you add new data you add the primary data record and you write the fact that the change happened (essentially an "events" list). Then you can query the change log periodically to get and additions/updates/deletes simply by asking for all events after (x)
  • if the infrastructure allows, some kind of pub/sub framework - same approach really but typically using middleware for the changes, rather than the main DB

re how you get the data; polling is simple and effective; active pushing is harder to setup but may reduce latency - not sure it is worth it here

Another approach, though, is to design it as a web app - then all your data lives at the server-farm and is trivial to update immediately. Your "desktop" app could be a web page using ajax

逐鹿 2024-11-25 02:16:32

尝试云计算并将您的数据存储到云中

,然后尝试在投反对票后恢复我的积分。

云(尤其是 Windows Azure)非常适合这个项目。 Web 服务也会有所帮助,因为它们可以轻松扩展到多个 Web 服务器(例如 Azure 中的实例)。让许多桌面客户端直接与数据库对话并不是一个好主意,并且通常会导致可伸缩性问题。

如果您经常刷新客户端数据,输出缓存在这里可以提供很大帮助,这几乎不需要代码即可实现。这比管理更改列表更容易。

Try Cloud Computing and store your data into cloud

OK trying to recover my points here after the downvote.

The cloud (windows Azure especially) is a great fit for this project. Web services would help too as they can be easily scaled out to a number of webservers (Instances in Azure speak). Having many desktop clients talking directly to a database is not a good idea and often results in scalability issues.

Output cacheing could help a great deal here if you are refreshing your client side data frequently, this can be implemented with almost no code. This makes it much easier to do than managing lists of changes.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文