This project was inspired by my father who wanted to try algorithm trading from his home computer. I modeled this system after another called Apama. The core of this system is an event pump with dynamic listeners and event classes. Its a multi-pass message system which allows synchronization of events in a parallelized environment with minimal performance overhead.
As long as there are events in queue -- we dequeue an event and enqueue its completion event. This way, when the event is processed by iterating through all the listeners the internal events get enqueued in front of the parents completion event. This way we can synchronize events without any real overhead.
The above trades generated also generated the following logs from the system shown below.
The size of this project is pretty small, but is also has a strong foundation of core classes and interfaces which make it extendible. As reference to the core loop, we have GUTS (main loops and system logic), Event (base class for all events), and EventListener (base class for everything that produces Events.)