technology ◦ 90% of employees come from engineering, math, or hard science backgrounds • Quantitative investment manager ◦ math • Automated trading ◦ robots • C++ ◦ speed • Open source stack ◦ freedom
◦ Accounting ◦ Risk management ◦ Compliance • Exchanges provide a "drop-copy" ◦ FIX protocol • Scrub the messages and forward to said third party ◦ MongoDB for message passing
◦ Header + body + trailer ◦ Key is numeric (maps to some "standard" name) ◦ Value is string • Good fit for MongoDB ◦ Key / value ◦ Flexible document sizes ◦ easier to query than SQL alternatives
connection ◦ Known system and can be kept database free ◦ QuickFix • fix2json ◦ Tail reading of output FIX log files ◦ Easy to represent fix as json and subsequently bson ◦ Keep db inserts independent of FIX connection • Downsides of combining ◦ Re-population ◦ Data will not be resent
is purged daily using a simple MongoDB shell script • Important to keep tabs on the data size if your data requirements change often ◦ Mitigated intraday if you are constantly reading ◦ Critical if you want full replay • Easy to reconcile with Drop FIX logs
cursor ◦ Handling restarts • Select only required fields • Filter and alter any field before sending • Outgoing message log in FIX • Easily handle different clients
Relevant for tracking down problems and keeping records • Logging time is "wasted" time • Previous logging solution was slow ◦ XML based ◦ String conversions • XML is easy to read after logging
by the app during logging • Internal data format for MongoDB ◦ mongorestore • Exists sequentially in flat files • Easily rendered as json • Numbers: ◦ original XML implementation: 1k ops/s ◦ improved XLM implementation: 3k ops/s ◦ first pass BSON implementation: ~20k ops/s ◦ current BSON implementation: ~30k ops/s
BSON not a standalone library ◦ Highly coupled to MongoDB c++ driver • Like MongoDB, schema-less ◦ Just something to remember if creating post-processing tools
◦ Some can have extra fields • Each machine contains independent logs ◦ Each log could be a different format ◦ Daemon to read and insert into MongoDD ▪ Central location, no hunting when problems happen • Real-time monitoring and alerting ◦ Human intervention required • Web based tools to "tail" view log entries ◦ WebSockets