Posts

Showing posts from February, 2016

Simple Event Driven design

Overview Developers often ask about the performance or efficiency of a system or their code. What does this really mean? My code is so efficient, only a coding god could understand how it works. My code is really clever but unmaintainable. The next developer will re-write it anyway. My code is really efficient for the machine, but inefficient for the developer. My code is really simple to understand which means the developer is more efficient, and the code is more than fast enough and easy to fix if not. So instead of asking yourself how fast you can make the code and how many clever tricks you can put into it, ask yourself; how simple can I make this and still be more than fast enough? Simple Event processing. For me, the simplest event processing is a method call which doesn't return anything. This is simple to translate into an asynchronous messaging transport e.g. public interface EventProcessor {     void event(MyEventData data);    ...

How do low latency applications differ for regular applications?

Overview A common question we get is; What makes a low latency application different? What is it like to read? There is a number of considerations in designing a low latency application which distinguish it from other applications. Simplicity is key The best way to make something go faster is to get the application to do less work.  This means; create less garbage, transform data less times, make data the application needs readily available. Note: I say you need the option to do this, but this doesn't mean you have to.  You should use a profiler to guide you as to what sections need optimizing. Simplicity is especially important if you want consistent performance. If you are looking at your 99th percentile (worst 1 in 100) or  99.9th percentile (worst 1 in 1000) you are looking at the time when most things are going wrong at once.  The more complex the system, the more there is to go wrong. If throughput is also important to you, you find that one ...