We're trying to synchronise data between a wcf service and two (or more)
winforms clients.

On the wcf side of things we have our entities being persisted to a SQL
Server 2k8 instance and each of the clients have their own instance of sql
server CE. NH is being used to persist local data and on the service,
entities are transferred from client to service as plain and simple DTOs.

I'm trying to figure out the best approach for synchronising data e.g:
- ClientA creates a new Cat and saves it locally, after a while syncs and
sends it to the service.
- ClientB updates an existing Cat locally then after a while syncs and sends
it to the service - at this point he picks up the new Cat ClientA had
created
- ClientA eventually syncs again and picks up the change to the cat ClientB
had made.
- ... etc including deleting and some conflict management (for our scenario
newest change wins will suffice)

So far we've got in a right mess involving endless loops and a whole host of
failed attempts with different ID strategies, modified dates, change flags
and haven't come up with a clean solution.

I've been trying to find out how much help I can get from NHibernate and
what it already offers for this. From what I can gather I maybe be able to
clean things up using the NH <version> tag and possibly make use of
ISession.Replicate (or Merge?) to deal with new/changed entities during the
sync but can't find very much documentation on these methods.

Can anyone firstly tell me if it sounds like I am going down the right track
with these methods and then if so point me in the direction of any good
material to help with this? If not, or if anyone has any good suggestions of
how best to deal with this I'm very keen for any help :)

Any comments greatly appreciated!

Dan

-- 
http://danny-t.co.uk

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to