views:

131

answers:

2

In my embedded project I have to move(sync) data between two systems. The data structure is complex and hence need some quick utility.I guess i should convert my data to XML format and sync it using rsync ?

Boost is not going to be there on our embedded platform.

Could someone suggest lightweight yet efficient library to convert my data to XML ?

some search suggest

libs11n, Sweet Persist, Google Protocol Buffers

but don't know which would fit to my needs.

+3  A: 

You should also consider using something more lightweight like YAML instead.

Roddy
+1  A: 

i've used protocol buffers on embedded platforms as a method of data transmission before. Works great and was chosen due to the low overhead, especially compared to XML.

You don't explicitly state your hardware / software but i assume that your using something that can run a linux kernel and that its syncing across an ethernet connection. rsync in theory could work, but you would be paying more in overhead (the rsync daemon running, writing to file, etc) and the latency would suffer badly. When you say "sync a data structure" I assume this needs to be done relatively quickly and that you probably need to implement a heart beat system to make sure you stay up to date. These factors again rule out the write to file and rsync option.

Mark