从简单的桌面应用程序到客户端服务器应用程序
我已经为一台 PC 开发了一个带有 SQL Server 数据库的简单桌面应用程序,现在客户希望使其在多台 PC 上运行。我想知道什么是更好的:目前我已经从 SQL 管理远程数据库,并且所有应用程序都只需连接到它。这是一个好主意还是我必须做一些修改才能改善应用程序的执行?
数据库有很多信息要导入到应用程序中。
我对 WCF 没有很好的了解,但是阅读它会有所帮助吗?
I have developed a simple desktop application with a SQL Server database for a single PC and now the client want to make it work on multiple PCs. I want to know what is better: for the moment I have remote the database from sql management and all application just connect to it. Is this a good idea or do I have to do some modification to improve the executing of the application?
The database has a lot of information to be imported to the application.
I don’t have a good idea about WCF but would it help to read about it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以拥有一台托管数据库的专用服务器,并且所有客户端应用程序都可以连接到它。但您必须注意的一件事是事务管理,即当用户更新某些信息时,其他用户不能更改该数据以使该数据不一致。您可以查看这篇描述 Sql Server 事务 的文章。
You could have a dedicated server with database hosted on it and all the client applications could connect to it. But one thing you have to take care of is
transaction
management that is while a user is updating some piece of information, no other user could change that piece of data to make that data inconsistent. You could a look at this post describiing Sql Server Transactions.根据要求,我建议将本地数据库保留为缓存,以便快速启动应用程序,并实现同步过程,其中本地和远程数据库不时进行比较或由用户手动触发。
这与 IMAP 电子邮件客户端或 Evernote 的工作方式非常相似。
Depending on the requirements I'd recommend keeping the local database as cache for speedy application start and implement a synchronisation process where the local and remote databases are compared from time to time or triggered manually by the user.
This would be very similar to how for example IMAP email clients or Evernote works.