CoralReactor is a powerful, ultra-low-latency, asynchronous, non-blocking, network I/O library that delivers high performance through a simple API. You can code multiple clients and servers (UDP or TCP) that run inside the same reactor thread which is optimized to the last bit for speed. Moreover, CoralReactor allows you to handle billions of messages without producing any garbage for the GC. The average one-way latency for a 256-byte message over loopback is under 2 micros, which is approximately 10 times faster than the standard JDK classes.


The Simplicity of CoralReactor

CoralReactor is a powerful, easy to use and ultra-low-latency Java library for network communication with zero garbage creation and minimal variance. Moreover, what stands out about CoralReactor is its simplicity. In this article we will demonstrate some examples of clients and servers to get you started with CoralReactor. Continue reading

Inter-thread communication within CoralReactor

CoralReactor was built on purpose, from the ground up, to be single-threaded. That means that no other thread besides the reactor thread should be executing any code or accessing any data belonging to servers and clients. This not only provides super-fast performance but also allows for much simpler code that does not have to worry about thread synchronization, lock contention, race-conditions, deadlocks, thread starvation and many other pitfalls of multithreaded programming. However there are common scenarios where other threads must interact with the reactor thread. In this article we analyze in detail how this is done, without breaking the single-threaded design principle and without creating any garbage. Continue reading

Handling Socket Lagging during Write Operations

A common problem when working with non-blocking sockets it that a client may lag when the send rate is too high, in other words, the client will push out messages faster then the network card can send and/or the other side’s network card can receive them. That will cause the underlying write socket buffer at the OS/Kernel level to fill up. In this article we explain how CoralReactor handles this complex scenario in a simple way so that you don’t have to worry about it. Continue reading