|
From: Chris F. <cd...@fo...> - 2011-07-29 06:07:33
|
On Fri, Jul 29, 2011 at 10:45:00AM +0530, harish badrinath wrote: > Hello, > > Firstly thanks for the quick answer. Does libopensyc provide any > default fallback transport mechanism (between two "networked" nodes) > /marshalling implementation. How is the message passing between two > remote nodes handled (would using AMQP/something similar be a > necessity in this situation ??) > > > +------------------------------+ > > | Machine running | > > | Opensync | > > | / \ | > > | / \ | > > | / \ | > > | / \ | > > | Plugin Plugin | > > +------/----------------\------+ > > / \ > > / \ > > +----------+ +-----------+ > > | Server 1 | | Server 2 | > > +----------+ +-----------+ Opensync itself only concerns itself with communicating with its plugins. It does that by direct procedure calls, in a threated setup, or it can run each plugin as a separate process. If run as a separate process, it uses it's own message handling / IPC / marshalling code to pass messages back and forth to those plugins. In theory it should be possible to run a plugin on another machine than the opensync engine is running on, but I've never done it. The marshalling code uses a read/write style, so this could be done over TCP, if it's not already doing it that way. :-) I'd have to study the code more to know for sure. As for the plugins, they can communicate with their data source any way they like. It could be through a library (such as accessing Evolution data), or direct filesystem access (file-sync), or through libsyncml (currently has some issues, as I understand), or via USB (Blackberry sync talks to the device this way) or some other method. There is no requirement for AMQP... if you want opensync to sync something unusual, you just need to write your own plugin, using opensync's API. The engine asks each plugin what changed in their data source, handles any conflicts, and passes new data back down to the plugins that need updating. From the plugin's point of view, it's all handled by C callbacks. - Chris |