[英]how to merge local database with remote database automatically?
I have background of ruby on rails , cakephp , angular , wordpress kind of technology, currently i have a client who is asking for application which can work offline without internet, and when it got connectivity of internet the database of local server need to be automatically merge with remote database. 我有ruby on rails,Cakephp,angular,wordpress这类技术的背景,目前我有一个客户正在要求可以在没有Internet的情况下可以脱机工作的应用程序,并且当它具有Internet连接时,本地服务器的数据库需要自动进行与远程数据库合并。 can ruby-desktop will handle this kind of application , or should i go with another technology ?
ruby-desktop可以处理这种应用程序吗?还是我应该使用另一种技术? which technology will make my work easy?
哪种技术可以使我的工作变得轻松?
For SQL Server you can use Merge Replication for this. 对于SQL Server,您可以为此使用合并复制 。 Or you code your application to handle the synchronization, writing to a local database, detecting when you have connectivity, and copying data back and forth to the central database.
或者,您对应用程序进行编码以处理同步,写入本地数据库,检测何时建立连接以及将数据来回复制到中央数据库。
The choice really comes down to how many tables need to be synced, whether you have bi-directional tables, and whether you need automatic conflict detection and resolution. 真正的选择取决于需要同步多少个表,是否有双向表以及是否需要自动冲突检测和解决。
So, if you have only a few tables to replicate, and they are all either download-only, or upload-only then just write this as part of your application. 因此,如果只有几张表要复制,并且它们要么都是仅下载的,要么是仅上传的,则只需将此表编写为应用程序的一部分。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.