1

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.

Kev
  • 118,037
  • 53
  • 300
  • 385
coder_bro
  • 10,503
  • 13
  • 56
  • 88

4 Answers4

1

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
  • 33,455
  • 4
  • 52
  • 58
0

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
  • 4,255
  • 28
  • 37
0

Actually you can use change tracking direct from SQL server.

http://msdn.microsoft.com/en-us/library/cc280462(SQL.100).aspx

Mond Raymond
  • 320
  • 1
  • 4
  • 9
0

You could have the "client" part of the Sync Framework be a separate C#.NET application or service. This means deploying the sync client and the .NET framework to the client machines. You would also have to build out a MySQL client provider for the Sync Framework (although you can probably find or adapt something from codeplex).

If you can't install .NET on the client machines, you may need to look at utilizing a sync system built on the Java stack and use that. Something like one of the solutions suggested here: Open source framework à la Microsoft Sync Framework suggestions?. At least some of the suggestions there can talk to both MSSQL and MySQL.

Community
  • 1
  • 1
davidpricedev
  • 2,107
  • 2
  • 20
  • 34