1

We are at the onset of developing a solution to handle collection and storage of scientific field data.

The solution should handle multiple Thick Windows PC field-clients attached to vehicles (trucks, boats, etc.) connected through cellular-network to a central SQL server.

The clients provide the central server, with data collected from equipment as well as manual input. The clients consume semi-static data from the central server e.g. personnel lists, and predefined data relevant to the specific task.

Connection to the server is erratic and hence the clients should be able to operate fully without connection to the central server for up to 3 hrs.

We are looking at MSMQ and Microsoft Sync Framework as options to handle client/server communication. Any insights you can provide will be much appreciated.

Fubzot
  • 177
  • 1
  • 1
  • 10
  • Food for thought. Internet is one big cache. Have you looked at [HTTP E-TAG](http://en.wikipedia.org/wiki/HTTP_ETag)? If the information doesn't have to travel over HTTPS, using HTTP caching is one of the best ways to decrease the load on your server and operate without any connection requirements for a length of time. The biggest decision you have to make is how long your data is valid for. – Chris Bednarski Apr 11 '14 at 23:03

1 Answers1

1

Implement the sync with sync framework over WCF. This will allow you to (a.o.) compress the data with WCf behaviors. And you won't have to expose your sql server to the internets. http://code.msdn.microsoft.com/Database-Sync-SQL-Server-7e88adab and http://code.msdn.microsoft.com/Database-SyncSQL-Server-e97d1208

If you can have collisions (update data on multiple clients or both on client and server), implement a command pattern to send data to the server from the clients. Change the data locally on the clients and at the same time create a message to send to the server that does not use sync framework, but can be processed by the server with the same results. This gives you more control and flexibility.

I don't know about msmq. You can have reliable messaging over WCF and as long as the messages you send from the clients are idempotent and the data you send to the clients from the server is considered as the overriding truth, I don't see the need for msmq.

If you can use sql express on the clients, I very much prefer the sync fx 2.0 approach with sql server change tracking, but that's a Microsoft unsupported scenario. Otherwise, the sync fx 2.1 approach with metadata tables is ok, as long as you don't have more thann, say 50 tables.

If you have more specific questions, I might know more.

stombeur
  • 2,704
  • 22
  • 45
  • Thanks for your answer back in april it has been immensely usefull. We are now developing an application set up pretty much as you suggested and it works like a charm :) – Fubzot Oct 31 '14 at 10:07
  • Glad to hear it. You should also be aware that sync framework is not going to evolve imo. Microsoft abandoned the next version. If you haven't seen it already, take a look at Zumero. At least for another perspective on occasionally connected clients and database syncing. – stombeur Oct 31 '14 at 13:36