views:

542

answers:

2

Hi All,

I am planning to use the following architecture for one of the applications: Client: Java based application, which will use a MySQL database Server: Will be C# based and the database will be SQL Server

Now is it possible to use Microsoft Sync Framework in Java? (Probably by implementing some interfaces?). I want the data from Java client to be synced to the server and vice versa. IS this possible?

If not, then can you suggest some other Sync framework.

A: 

You will need to find some "glue" between the Java and the Sync framework. The Java Native Interface will get you a good start.

Jim Blizard
+1  A: 

First off, I'm not familiar with Sync, but a quick read of the overview suggests that your client will need to provide either a web service or RSS feed in order for the Sync runtime to obtain the data to be sync'd from the Java process.

The problems I see with your design is that there's typically more than one client but, semantically, a single backend - the MySQL database in this case. I suspect this would lead to Sync thinking there are conflicts when multiple clients are running, but I could be wrong.

Anyway, that aside I assume your goal is to keep the MySQL and MSSQL databases in Sync? If this is the case then why not run a server-side process in front of the MySQL database that becomes the Sync participant. If you've got alread .Net on the server-side you could even write it in C#, which is bound to ease the interop issues.

If you are set on the client being the Sync participant then take a look at Jakarta Commons, which I think has the code you're need to turn you client into a simple web-server that'll be needed for it to act as a web-service or RSS feed.

Nick Holt