DCSIMG
How to synchronize between local Sql servers (compact edition and mobile) to Sql server 2005 - Wortzel's blog

Wortzel's blog

.Net (2.0, 3.0, 3.5), C#, Asp.net, Com+, GIS(ESRI Software), Management, Analysis & Design, Life, Trips, And more...
How to synchronize between local Sql servers (compact edition and mobile) to Sql server 2005

One of the common options to synchronize several distributed sql servers to a central Sql server 2005 is by using Remote Data Access Synchronization (RDA).

I needed to check this option for one of my project.

What does it give us? How does it work?

The RDA tries to give us a solution to access data that stores in a central Sql server form local db's (Sql server mobile and Sql server compact edition databases). It includes a tacking engine that stores all changes in the remote db and pushes it later to the central Sql server. This architecture includes a pull option – when the central Sql server updates the locals databases. The synchronization works over HTTP.

So here are some pros vs. cons of the RDA:

Cons:

· Performance:

There is a performance hit when using RDA, because it works with the OleDB provider (The Sql Server data provider gives us a better performances).

· Security:

The RDA isn't giving us a complete solution for security problems. Although local databases isn't opening a direct connection to the central db, all the local db's hold the central db connection string.

· Support & future development:

The RDA is at a maintenance phase, Microsoft isn't planning to develop it any more (But don't worry it will be supported in VS 2008). The next technology is called "Sync Services".

Pros:

· Easy to use\Rapid development:

The API is very simple, just do this sample and you are in.

· Decrease the development cost:

This is a good & tested technology – so why not?

· Protocols supported:

RDA works on the HTTP and HTTPS, you don't need to implement a special protocol over the network layer.

As I mention before in VS 2008 Microsoft develop a new and a better technique to do this job (that called "Sync Services"). It is based on ADO.NET with caching option and completely supported WCF.

Want to learn more? Read Steve Lasker's Web Log.

Want to see who its work? Look in Steve web cast.

Published Friday, July 27, 2007 5:38 PM by Avi Wortzel

Comments

# re: How to synchronize between local Sql servers (compact edition and mobile) to Sql server 2005@ Friday, July 27, 2007 6:30 PM

RDA has one big problem - it's has massive overheads and ruins any chance for a normal architecture solution.

RDA is meant to be used by Smart Clients, i.e. Semi contacted semi disconnacted applications.

The Push & Pull method only work while you're online and have no caching mechanisim so it has to be implemented as part of the DAL and not the whole DAL.

Push & Pull methods are SQL query based. Meaning, In stand of being based on Business entities they drag you back to caring for the entry order & cascased of your DB.

You will also have to choose between transfering whole tables ("select * fro myTable") or a few selected column ("select myColumns from myTable").

If you choose the first, you're transfering massive amounts of data from the server which is often not required for a Smart Client app.

If you choose the letter, you'll have the impossiable task of maintain what columns in the Server DB are used on the Client.

Did I mention no Persistence layer on the planet supports RDA? (or did as off December 2006 when I last checked)

There're additional cons that makes RDA a nice concept for small non scalable apps but a terriable obstecale in the way of any Real World Applcation.

Justin-Josef Angel [MVP]

# re: How to synchronize between local Sql servers (compact edition and mobile) to Sql server 2005@ Sunday, July 29, 2007 5:27 PM

Hi Justin-Josef,

Thank you for sharing us your knowledge about the RDA. It's seems that you have a really terrible experience with it (and there are many more like you).

I really didn't know about all the cons you mentioned, so thank you for your information. Don't worry we decided not to use this framework in our projects and to wait to the "Sync Services" that will upcoming in VS 2008.

I really hope that the "Sync Services" will give a better solution for it.

Avi Wortzel