I have a black box model (written in Julia) that requires realtime tick data as an input. The output of this model needs to be pub-subbed out to clients listening on a socket or topic. I have dozens to potentially hundreds of input streams that I need to process in realtime.
Other than the Reactive, RabbitMQ and Kafka packages, are there any other libraries that I should explore for such a use case?
Note, however, that RabbitMQ, Kafka, ĂMQ and Redis all have pretty different sets of features. For example, ĂMQ and Redis are the fastest, but may become a single point of failure (cluster mode being much harder to use), Kafka provides persistence for a configured period of time, but has much higher latencies, etc. In fact, I rarely see them as switchable alternatives.
I was hoping for a more Julia-centric approach that doesnât rely on ĂMQ or Redis either (I have used those successfully via python and c++ clients). Something like OnlineStats.jl sounds like it could work but, frankly, I havenât had a chance to explore other alternatives yet. Thank you for the recommendations @dfdx.
If you are looking for Julia-only solution, consider channels. They arenât really queues and lack many of their advantages, but may be good for your specific use case.
Julia client for NATS https://nats.io/ could also be interesting.
I want to have a messaging system out of JVM world because of heaviness (1) nor C++ world because of complexity (1) and ideally without dependencies (and so a Go solution could be interesting)
Ended up using 0MQ for a prototype with a mix of c++ and python. The prototype ended up becoming production and eventually code stopped being maintained. Became more of a 3 language problem after a while. Interested to see how this thread plays out.
Concerning to the performance and system architecture (for your HFT sys I guess), choosing a proper MQ could be important, but may not so critical at the very beginning, because you can always switch to or âplug intoâ a different MQ sys if you carefully designed the interface.
One of the big architectural blunders Iâve done in ZeroMQ is its threading model. Each individual object is managed exclusively by a single thread. That works well for async objects handled by worker threads, however, it becomes a trouble for objects managed by user threads. The thread may be used to do unrelated work for arbitrary time span, e.g. an hour, and during that time the object being managed by it is completely stuck. Some unfortunate consequences are: inability to implement request resending in REQ/REP protocol, PUB/SUB subscriptions not being applied while application is doing other work, and similar. In nanomsg the objects are not tightly bound to particular threads and thus these problems donât exist.
REQ socket in ZeroMQ cannot be really used in real-world environments, as they get stuck if message is lost due to service failure or similar. Users have to use XREQ instead and implement the request re-trying themselves. With nanomsg, the re-try functionality is built into REQ socket.
In nanomsg, both REQ and REP support cancelling the ongoing processing. Simply send a new request without waiting for a reply (in the case of REQ socket) or grab a new request without replying to the previous one (in the case of REP socket).
In ZeroMQ, due to its threading model, bind-first-then-connect-second scenario doesnât work for inproc transport. It is fixed in nanomsg.
Have you ever encountered any issue in using ZeroMQ as described above?
Quite the same, I have to deal with front-end modules written in c# calling data feeder in c++ DLL , may be more Python modules coming in.