I need to do some Data Synchronization between a client and a server. I have decided to use RabbitMQ for Data Synchronization, in order for my program to be tolerant for network failure. I know how to use RabbitMQ, so no problem there.
All data needs to be stored in a local database, and then copied to an other database.
My problem is exactly which data to transfer over the network.
Let me show some example code:
This is the way I write to my database today. The body of my method is removed since it is irrelevant for the question.
public static class DatabaseHelper
{
public static void RegisterCheckout(string checkoutStationId, string employeeId, string destinationId)
{
//Insert in to database
}
}
So in short my program calls DatabaseHelper.RegisterCheckout("123", "321", "456")
, the checkout is put into the local database.
But how do I serialize this method call, in order for me to reproduce it server side?