Hello everyone! Can you please advice about best aproach on using DO with scenario described below. We have to support following requirements: 1.) There is one centralized database wich contains about 50.000 records, each record containing few simple type fields, some references and one byte[] (GIS geometry) with average size of 3000 bytes 2.) There are 10-20 concurent WPF client apps which connects to centralized database over the web 3.) Client apps should download all off the records (including prefetched geometry field byte[]) and use them in disconnected manner for viewing purposes (readonly) 4.) Client app can edit/add/remove 1 record at time and save changes immediatly to the remote database 5.) Client app should be able to serialize disconnected data and use them later (if not possible alternatively can download all the data each time app starts) 6.) Client app should be able to sinchronyse changes only (made by other users) from remote database without downloading all off the records each time. Synchronisation should be performed very frequently (1 minute period) The basic idea is to use DO and expose it trough http using WCF Data Services. Since there is no sync support I would do this myself using AD HOC aproach with some thombstone tables and synchronisation logic/queries. Would that be possible? Is there any better way? Is there something specific about DO to deal with? Regards, Sandi This thread was imported from our support forum. The original discussion may contain more detailed answer. Original topic by Zgckula. |
Alex (Xtensive) wrote:> Would that be possible? Definitely - all depends on you... > Is there any better way? I don't know to what it could be compared... > Is there something specific about DO to deal with? I can enlist the following specific features / ideas:
Realis wrote:Hi Alex! DO is realy great in a way it handles refrential integrity, lazzy loading, ... So we have been trying hard this days finding a way to still use DO on client side but support remote storage based on scenario described earlier in this post. Here is the idea: We would like to use DO (with disconected state) on client side normaly. To support remote storage we would implement our own WCF storage provider with SQL Server back end storage. Infact this isn’t realy new storage. What we want to do is put some communication layer between. This should be done in generic way. Client app should only differ in config settings when using local or remote storage and have to fully support all DO features (See figure attached) After a brief examination of DO source code it seams there is no simple contract to implement this. Can you advise? Is there any explanation about pattern to impement custom storage provider? Regards, Sandi Alex (Xtensive) wrote:This case is really more complex, I can enumerate just few issues:
So I'd advice to avoid this until such provider is implemented by us (there are such plans - I remember, I wrote about "remote://" protocol, but don't remember where ;) ). We understand this must be almost an ideal solution for N-tier development with DO4 ("almost" - because it requires most part of DO to run on the client, which isn't always possible, e.g. currently this won't work with Silverlight), and thus this will be done. Btw, why you dislike the original idea about sync? I.e. what issues are stopping you here? I'll try to help to resovle them. As far as I see, it must be really much easier to implement. I'd like to show some magic here, but it seems it will be there only when we'll implement remote:// protocol or sync... Until this is done, the only available option is to care about this by your own. Realis wrote: I expected your answer would be like this. But I hoped on some magic. If that is the case we'll move back to MS Sync option. Before that we need to study sync framework first. I realy hope it is more evolved than MS entity framework. Regards, Sandi Yep, such a solution is really nice in many cases... We'll add integrated support for it some day, but for now we must finish with more vital features.. Zgckula wrote: Thank you Alex! What I don't like here is WCF Data Services which somehow undermines the beauty of using DO directly. I Will consider using DO on local storage and Microsoft Sync Framework for synchronisation. Best regards, Sandi |