|
|
|
|
|
by robinrheem
2196 days ago
|
|
Thank you very much for your kind reply. So does that mean the algorithm, which is in the hot path will just broadcast via a messaging system like ZeroMQ or Kafka to another subscriber that’ll just save the order and position data to the database right? Plus the messaging system will be nonblocking and just do a fire and forget style. |
|
In that path the rest of the world does not exist: you are interacting with an exchange, possibly multiple exchanges, and that's it. The rest of the world doesn't exist. No ZeroMQ or Kafka or whatever.
After you send an event, you can set a flag or copy some data structures for another thread of lower priority to do some house keeping. This might include sending an update on some messaging system, yes. This can be something like TIBCO RV, or a proprietary equivalent, or perhaps the ones you mentioned.
But the bottom line is: when doing low-latency, high-frequency trading you don't want to do anything that is not strictly required in the hot path. You must read the message coming from the market, very quickly decide how you want to react (i.e. send a new order or update an order, at which price point, etc.) and that's it. You will in fact even avoid computing too much stuff here; you would have pre-computed as much stuff as possible to be ready to very quickly do a lookup and maybe some trivial computation before making your decision.