Conference | Building Low Latency Microservices

Peter Lawrey, presents at the 2016 Goto in Chicago .

The presentation begins around the concepts of meeting low latency trading requirements without using a monolithic infrastructure, Peter discusses how low latency microservices operate and how they receives events from a source of data that contains the complete history of all events and operates in an append-only manner. The low latency microservice reacts to the events, processes the input data, and generates output data. In many cases, the function is stateless: all required information is derived from the input events. However, in some cases efficiency is gained by maintaining some state between transactions. High performance and low latency are the objectives that determine whether a particular Chronicle service maintains some state or is stateless. If state is maintained, it can be persisted to reduce start-up time the next time the service is launched.

Chronicle’s software is highly optimized Java, employing techniques that minimize operating system overhead and Java Garbage Collection (the objective is zero GC). The low latency microservices in Java  are single-threaded, eliminating the need for thread management, locks, signals, polls of thread state, etc. This produces a deterministic and reproducible result (critical for replicating and debugging problems), while also increasing throughput and decreasing latency.

In the presentation Peter explains about a Lambda architecture and how the low latency microservices function receives events from a source of data that contains the complete history of all events and operates in an append-only manner. The microservice reacts to the events, processes the input data, and generates output data. In many cases, the function is stateless: all required information is derived from the input events. However, in some cases efficiency is gained by maintaining some state between transactions. High performance and low latency are the objectives that determine whether a particular Chronicle service maintains some state or is stateless. If state is maintained, it can be persisted to reduce start-up time the next time the service is launched.

There is also examples of how to produce a stateful Lambda plus some code excerpts

The presentation moves onto gives an indepth overview of the Interprocess transport used between the low latency microservices which in this case is Chronicle Queue and Peter illustrates how the benchmarks can be performed using a Java Microbenchmark Harness, he finally discusses the lack of flow control in Chronicle Queue and how this can help with low latency trading and benchmarking

 

 

 

 

Peter Lawrey

Peter Lawrey is a Java Champion and Oracle Code One alumnus. Peter likes to inspire developers to improve the craftsmanship of their solutions and his popular blog “Vanilla Java” has had over 4 million views. Peter is the founder and architect of Chronicle Software. He has one of the top number of answers for Java and JVM on StackOverflow.com (~13K).

Featured Products

Data Processing

Chronicle Queue Enterprise

Persisted messaging framework that handles massive throughput. Delivers superior control of outliers, and replicates easily across hosts.

Read more >>