2

Is there a C library that serializes and/or synchronizes data structures on two distinct nodes. It would be ideal if synchronizing is not intertwined with serialization. To summarize, what i want would be distributed synchronization of data structures (trees, structs, etc) in a transparent manner.

The closest i came to an answer is Client-server synchronization pattern / algorithm?, but no links were provided.

Community
  • 1
  • 1
qwrty
  • 331
  • 3
  • 15
  • Is this relevant ?? [Maemo|GObject with DBUS](http://maemo.org/maemo_training_material/maemo4.x/html/maemo_Platform_Development_Chinook/APPENDIX_D_Source_code_for_the_GLibDBus_synchronous_example.html) – qwrty May 20 '11 at 10:33
  • Update: libopensync seems promising (can synchronize arbitary data ), AFAIK if the plugin is not a server type (dosent read socket directly .. marshalling Transport layer is taken care of by the library) else AFAIK we have to provide it (you could use AMQP, beanstalkd, zeromq,etc) along with google protocol buffer,etc [libopensync](http://www.opensync.org/) – qwrty Aug 02 '11 at 10:21

1 Answers1

0

As far as I know, there is no pre-made data synchronization library for C/C++.

You could use MessagePack, and add a last_updated timestamp field to your structure. Then you could use MessagePack to compare timestamps and transfer data between nodes.

MessagePack even provides a helpful Quick Start tutorial at http://wiki.msgpack.org/pages/viewpage.action?pageId=1081387.

Philip Wernersbach
  • 461
  • 1
  • 5
  • 11