denarius-exchange / denarius

An open-source financial exchange
Other
35 stars 5 forks source link

Implement last price and market depth propagation mechanism #33

Open analyticbastard opened 10 years ago

analyticbastard commented 10 years ago

The connectors should have a mechanism to convey the last price and several levels of bid and ask, as well as bid and ask distributions, so that clients can know of this information.

analyticbastard commented 10 years ago

These kind of messages should be sent using a multicast library to minimize network usage.

On the other hand, there might be premium users (market makers?) who need prioritary and accurate information. Should this be implemented separately?

analyticbastard commented 10 years ago

Multicast libraries which are open source and applicable to our case are rare. A clojure wrapper around emcaster, which implements the Pragmatic General Multicast (PGM) protocol, might be the solution to our problems.

analyticbastard commented 10 years ago

Or perhaps a wrapper around JavaPGM is a better option, since it seems more modern.

analyticbastard commented 10 years ago

I guess the final answer to this question is JGroups: http://www.jgroups.org/

analyticbastard commented 10 years ago

It seems that there have been some developments lately: ZeroMQ http://zeromq.org/

Edit: The most voted answer seems to support this http://stackoverflow.com/questions/731233/activemq-or-rabbitmq-or-zeromq-or

analyticbastard commented 10 years ago

We are definitely going the ZeroMQ way. See webpage for supporting evidence of performance.

Attention, ZeroMQ is a native library. There is a (pure) Java implementation, JeroMQ, and a JNI interface library, zjmq. JeroMQ works out of the box and is the default. For best performance, select zjmq. See Extras directory Readme.md.

jvirtanen commented 9 years ago

I'm probably a bit late, but I would like to mention NASDAQ MoldUDP64 1.00 as one alternative. MoldUDP64's benefit compared to ZeroMQ is that the wire protocol is simple and open. Thus, market participants don't have to depend on the ZeroMQ library for connectivity.

I have written Nassau, a high-performance implementation of MoldUDP64 for the JVM.

analyticbastard commented 9 years ago

Thanks! At the moment I am inactive in this project, and I realized that a lot of the core needs to be rebuilt using Meldown or similar. Your project Nassau certainly looks interesting.

jvirtanen commented 9 years ago

Reactor, the foundation on which Meltdown is built, looks interesting. I didn't know about it before.

I hope you'll have time to return to this project in the future. At least I have been following the development with keen interest. :grin: :+1: