Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Offline/online/synchronization
Offline/online/synchronization [message #467530] Sat, 05 May 2007 06:35 Go to next message
Przemyslaw Rudzki is currently offline Przemyslaw RudzkiFriend
Messages: 34
Registered: July 2009
Member
Hi all,

Are there any defined or practiced patterns for developing an RCP
application that will work offline and online?

Basically some data is stored locally on the client side and at some
point of time is being synchronized or transfered to the server. I
assume that the data on the server side is common for many users and may
be modified on many different systems before being
transfered/synchronized with a central repository - a bit like source
code repository but for objects and with some level of automation during
synchronization.

For the moment, I believe the easiest way to implement this kind of
functionality would be to transfer whole datagraph (tree of objects) to
the server and depending on the timestamp (somehow internally stored)
determine which objects should be updated (adding should not be a
problem). However, this is a really simple case scenario and I can think
of at least couple more that makes things messy and more difficult
(wrong clock setting on client side, explicit overwrite of timestamp in
all objects, etc.) to deal with.

As RCP apps are becoming more popular I am sure someone had to deal with
that kind of problem before.

Any pointers, resources?

Rgds,

/p
Re: Offline/online/synchronization [message #467534 is a reply to message #467530] Sat, 05 May 2007 10:01 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
Normally you'd define your protocol between client/server to deal with this kind of scenario. For example, IMAP allows messages to be downloaded and cached on the client side, and then any subsequent synchronisation is done by keeping track of what the user does.

Another mechanism might be time-stamp based, such as using 'rsync' to remotely copy files (or unison, which uses rsync) and then upload.

Neither of those will help when the data is modified in two or more places independently. Some systems, such as Mac's SyncService, tracks changes on individual records and in the event of a collision will prompt the user to chose the right data set.

In short; it's a problem for many types of app, and RCP is no better or worse at handling this than anything else; the point being that you have to do all the work. And that's data dependent.

What I certainly would avoid doing is any kind of synchronisation of some giant object tree using serialisation; that's bound to cause problems. You need to track each change and timestamp it, and have a good story for reconciliation when it doesn't work.

Alex.
Re: Offline/online/synchronization [message #467535 is a reply to message #467534] Sat, 05 May 2007 11:45 Go to previous messageGo to next message
Przemyslaw Rudzki is currently offline Przemyslaw RudzkiFriend
Messages: 34
Registered: July 2009
Member
Thx for the input.

I was hoping that there are some more generic means for doing
synchronization. Something like SyncML but on a more general level (eg.
SyncML4J?).

/p

Alex Blewitt wrote:
> Normally you'd define your protocol between client/server to deal with this kind of scenario. For example, IMAP allows messages to be downloaded and cached on the client side, and then any subsequent synchronisation is done by keeping track of what the user does.
>
> Another mechanism might be time-stamp based, such as using 'rsync' to remotely copy files (or unison, which uses rsync) and then upload.
>
> Neither of those will help when the data is modified in two or more places independently. Some systems, such as Mac's SyncService, tracks changes on individual records and in the event of a collision will prompt the user to chose the right data set.
>
> In short; it's a problem for many types of app, and RCP is no better or worse at handling this than anything else; the point being that you have to do all the work. And that's data dependent.
>
> What I certainly would avoid doing is any kind of synchronisation of some giant object tree using serialisation; that's bound to cause problems. You need to track each change and timestamp it, and have a good story for reconciliation when it doesn't work.
>
> Alex.
Re: Offline/online/synchronization [message #467536 is a reply to message #467535] Sat, 05 May 2007 13:23 Go to previous messageGo to next message
Alex Blewitt is currently offline Alex BlewittFriend
Messages: 946
Registered: July 2009
Senior Member
Even SyncML is just a description language, which partitions data into subsets and timestamps them. You still have to write the code to generate the SyncML, and keep track of when that data changes.

The problem isn't *protocol* dependent, it's *data* dependent. You have to do something that makes sense for your data, which is why there's no standard.

Alex.
Re: Offline/online/synchronization [message #467540 is a reply to message #467536] Sun, 06 May 2007 08:26 Go to previous message
Przemyslaw Rudzki is currently offline Przemyslaw RudzkiFriend
Messages: 34
Registered: July 2009
Member
Well the hope is gone ;-).

/p

Alex Blewitt wrote:
> Even SyncML is just a description language, which partitions data into subsets and timestamps them. You still have to write the code to generate the SyncML, and keep track of when that data changes.
>
> The problem isn't *protocol* dependent, it's *data* dependent. You have to do something that makes sense for your data, which is why there's no standard.
>
> Alex.
Previous Topic:Using RCP and JNI results in NoClassDefFoundError
Next Topic:need something like SelectionListener
Goto Forum:
  


Current Time: Thu Apr 25 18:53:31 GMT 2024

Powered by FUDForum. Page generated in 0.03516 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top