I need to transfer financical data between two process (currently c++ and c#, in future c++ and c++ on Linux). It's live quotes - something like 1 100, 1 100.1, 2 101.2 end so on.). Data has well-defined format. Latency must be low. I'm choosing between zeromq and using shared memory myself. I have couple questions about zeromq:
I don't need to run my parts on different hosts or something like that. So I have one producer-one consumer pattern on localhost. I'm just not sure if I should use zeromq for such simple scenario, or probably i should just use shared memory and that's it?
Shared memory is nasty and error prone, in my opinion. ZMQ is elegant. I would prefer the ZMQ route always.
If anything, ZMQ will be easier to set up than shared memory - not the other way around.
ZeroMQ could be faster than the shared memory because of its baked in buffering. The messaging patterns also provide a much more flexible way of approaching problems. As always, do your own tests and determine which you prefer.
I would expect the ZeroMQ version to be simpler long term.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With