4 ms·
Weird to see this here! I've used CoralBlocks in the low-latency trading domain previously. Highly recommend. The API is kind, they're very responsive, and t
by WeaselNo7 2y ago
Weird to see this here! I've used CoralBlocks in the low-latency trading domain previously. Highly recommend. The API is kind, they're very responsive, and the latency is exceptional (and comes with all the basics like thread pinning built-in for convenience)
- smarx007 2y agoHow does it compare to LMAX Disruptor if you have any experience with both?
- papercrane 2y agoThey're both similar in design, the main difference is Coral Queue can be used for IPC between JVMs, using a mmap'd file.
- arnold_palmur 2y agoSee https://github.com/real-logic/aeron https://github.com/real-logic/aeron (also from the creator of the disruptor)
- algo_trader 2y ago> CoralBlocks in the low-latency trading domain previously. Yeah, modern JVM is a true miracle and you can be x5 productive (and safe!) compared to C/C++ Do you have any recommendations for a low latency work queue (with in a jvm)? I want to spawn millions of micro-second-tasks per second, to worker cores.. I am on a massive cache CPU so memory latency hasnt raised its ugly head yet EDIT: not LMAX please...
- jffhn 2y ago>any recommendations for a low latency work queue (with in a jvm)? I toyed around the ring buffer pattern a decade ago, creating a unicast one (using CAS on entries, and eventually a logarithmic scan for next readable entry, not to brute-force-scan them all), but I'm not sure that its latency is much better than that of a regular ThreadPoolExecutor (the throughput could be better though). Latency also depends on whether it spins or blocks when waiting for a slot to read or write. If you want to give it a try: https://github.com/jeffhain/jodk/blob/master/src/net/jodk/threading/ringbuffers/UnicastRingBuffer.java https://github.com/jeffhain/jodk/blob/master/src/net/jodk/th...
- pacoverdi 2y agoYou may find https://jctools.github.io/JCTools/ https://jctools.github.io/JCTools/ interesting
- joas_coder 2y agoI think you can take a look at the DiamondQueue, which is a Demultiplexer and a Multiplexer combined so that thread A dispatches a bunch of tasks to a fixed set of worker threads (W1, W2, W3, etc.) and then these worker threads use a Multiplexer to deliver the results to another thread B. Thread A and Thread B can also be the same thread. There is an example here => https://www.coralblocks.com/index.php/the-diamond-queue-demultiplexer-to-set-of-threads-to-multiplexer/ https://www.coralblocks.com/index.php/the-diamond-queue-demu... The DiamondQueue should be soon available for free at the CoralQueue project on GitHub.
- joas_coder 2y agoYou were interested in the diamond queue, so just wanted to say that it is now released in our GitHub => https://github.com/coralblocks/CoralQueue?tab=readme-ov-file#diamond https://github.com/coralblocks/CoralQueue?tab=readme-ov-file...
- bsder 2y agoGiven the documentation says that this is supposedly to be between JVMs, how do they handle the serialize/deserialize?
- kasey_junk 2y agoThey punt on the actual serialization format: https://www.coralblocks.com/index.php/inter-process-communication-with-coralqueue/ https://www.coralblocks.com/index.php/inter-process-communic... In most applications like this you'll see direct byte manipulation to byte buffers because you want to pull as much performance as possible. There are fast serialization formats like SBE that people leverage for this as well.
- joas_coder 2y ago> Given the documentation says that this is supposedly to be between JVMs, how do they handle the serialize/deserialize? Your transfer object needs to implement MemorySerializable. Below two examples from CoralRing's GitHub: https://github.com/coralblocks/CoralRing/blob/main/src/main/java/com/coralblocks/coralring/example/ring/Message.java https://github.com/coralblocks/CoralRing/blob/main/src/main/... https://github.com/coralblocks/CoralRing/blob/main/src/main/java/com/coralblocks/coralring/util/PayloadByteBufferMessage.java https://github.com/coralblocks/CoralRing/blob/main/src/main/... The second one effectively allows you to send anything you want (as bytes) through the ring, making CoralRing message agnostic.