具有自动客户端-服务器数据同步功能的 ORM。有现成的解决方案吗?
考虑应将其数据存储在远程服务器上的客户端应用程序。我们不希望它“即时”访问此数据,而是希望它在本地数据库中拥有此数据的副本。所以我们不需要与远程服务器连接来使用应用程序。最终我们想要将本地数据库与远程服务器同步。我所说的一个很好的例子是 Evernote 服务。此类应用程序非常常见,例如在移动开发中,无法保证用户拥有永久的互联网连接,带宽有限且流量可能昂贵。
ORM(对象关系映射)解决方案通常允许开发人员为其业务逻辑数据定义一些中间“模型”。然后用他的编程语言将其作为某种对象层次结构使用,并能够将其存储到关系数据库中。
为什么不向 ORM 系统添加一项功能,允许自动同步共享相同数据模型的两个数据库(客户端和服务器)?这将简化上述类型 I 的应用程序的开发。是否有适用于任何平台或语言的系统实现了此或类似功能?
Consider the client application that should store its data on remote server. We do not want it to access this data "on-fly", but rather want it to have a copy of this data in local database. So we do not need connection with remote server to use application. Eventually we want to sync local database with remote server. The good example of what I am talking about is Evernote service. This type of applications is very common, for instance, in mobile development, where user is not guaranteed to have permanent Internet connection, bandwidth is limited and traffic can be expensive.
ORM (object relational mapping) solutions generally allows developer to define some intermediate "model" for his business logic data. And then work with it as some object hierarchy in his programming language, having the ability to store it relational database.
Why not to add to an ORM system a feature that will allow automatic synchronization of two databases (client and server), that share the same data model? This would simplify developing the applications of the type I described above. Is there any systems for any platform or language that have this or similar feature implemented?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
此链接可能提供一些有用的信息
http://gwtsandbox.com/?q=node/34
http://www.urielkatz.com/archive/detail /google-gears-orm-v01/
http:// www.urielkatz.com/archive/detail/google-gears-orm/
this links may provide some useful information
http://gwtsandbox.com/?q=node/34
http://www.urielkatz.com/archive/detail/google-gears-orm-v01/
http://www.urielkatz.com/archive/detail/google-gears-orm/
AFAIK,没有这样的 ORM 工具。
这是我们团队的最初目标之一(我是 DataObjects.Net 开发人员之一),但此功能仍未实现。我们可能会在今年春天开始进行数据库同步工作,但由于几乎尚未完成任何工作,因此没有确切的截止日期。
AFAIK, there are no such ORM tools.
It was one of original goals of our team (I'm one of DataObjects.Net developers), but this feature is still not implemented. Likely, we'll start working on database sync this spring, but since almost nothing is done yet, there is no exact deadline for this.
至少有一个开源 ORM 可以满足您的需求,但它是 Delphi ORM。
它被称为 mORMot,并在无状态/RESTless 架构中使用 JSON 进行通信GDI 消息、命名管道或 HTTP/1.1。它能够连接到任何数据库引擎,并嵌入优化的SQlite3引擎。
它是一个真正的客户端-服务器 ORM。也就是说,ORM 不仅仅用于对象的数据持久化(如在其他实现中),而是作为全局 n 层、面向服务的架构的一部分。 这确实很重要。
There is at least one Open Source ORM matching your needs, but it is a Delphi ORM.
It is called mORMot, and use JSON in a stateless/RESTless architecture to communicate over GDI messages, named pipes or HTTP/1.1. It is able to connect to any database engine, and embed an optimized SQlite3 engine.
It is a true Client-Server ORM. That is, ORM is not used only for data persistence of objects (like in other implementations), but as part of a global n-Tier, Service Oriented Architecture. This really makes the difference.