[zeromq-dev] 0MQ to the rescue
gdiethelm at dcv.cl
Mon Aug 9 22:21:57 CEST 2010
I am planning to use 0MQ to create a replication mechanism for a legacy
system. This oldie is implemented with COBOL programs updating a Sybase
database (which lives on AIX). Due to its nature, all system context is
represented in the data stored on Sybase.
I intend to write an extended stored procedure (XSP) in C that will be
called, via triggers, on each insert, update and delete for certain
tables on the legacy. When the trigger is invoked, the XSP will push a
message into a 0MQ socket, containing the table, operation and all
fields for that row. The receiving end will pull these messages from the
0MQ socket, analyze them and figure out what to do in the "next
generation" implementation of the system.
For the push side, I want to make sure the processing is very light and
there are no stalls due to waiting for any I/O. My plan is to bind a
PUSH socket to a well-known address and possibly setting a larger HWM to
ensure everything stays in memory.
For the receiving side, I want to make sure I don't ever loose any
messages and don't really care so much if the operations take longer. My
plan is to connect a PULL socket to the well-known address and using a
mix of a larger HWM and/or a swap file. I might run several copies of
this process if necessary (hence the usage of connect here).
Of course I plan on running a few benchmarks of my own to validate my
assumptions, but I would really love to hear any comments regarding this
little design. I am very excited because if I can pull this off, I may
have found a way to integrate legacy and "next generation" in a way that
will be almost 100% transparent to the legacy and that will allow the
next generation to move at its own pace.
Thanks in advance and best regards.
More information about the zeromq-dev