Writing messages on dating sites
So I was fascinated to hear about a talk at QCon London in March last year from LMAX. Its business innovation is that it is a retail platform - allowing anyone to trade in a range of financial derivative products.
The Business Logic Processor runs entirely in-memory using event sourcing.The Business Logic Processor is surrounded by Disruptors - a concurrency component that implements a network of queues that operate without needing locks.During the design process the team concluded that recent directions in high-performance concurrency models using queues are fundamentally at odds with modern CPU design.Over the last few years we keep hearing that "the free lunch is over" - we can't expect increases in individual CPU speed.So to write fast code we need to explicitly use multiple processors with concurrent software.This is not good news - writing concurrent code is very hard.
Locks and semaphores are hard to reason about and hard to test - meaning we are spending more time worrying about satisfying the computer than we are solving the domain problem.
Various concurrency models, such as Actors and Software Transactional Memory, aim to make this easier - but there is still a burden that introduces bugs and complexity.
The last outbreak of smallpox occurred in the late seventy’s.
The last outbreak of smallpox occurred in the late seventies.
As a result it has to process many trades with low latency.
The system is built on the JVM platform and centers on a Business Logic Processor that can handle 6 million orders per second on a single thread.