Stephen
unread,Feb 29, 2012, 4:42:31 PM2/29/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Disruptor
I was trying to code out a use case for this and I am now wondering if
this framework is just so easy or I am missing something.
Take a trade matching engine. Orders come in, log them then based on
the symbol, check for matches on existing orders. If there are
matches, create trades and update the orders to new volumes. Then send
the trades out.
Following this, is it as simple as:
executorService = Executors.newCachedThreadPool();
disruptor = new Disruptor<OrderEntry>(OrderEntry.FACTORY, ENTRIES,
executorService);
OrderEntryLogger orderEntryLogger = new OrderEntryLogger();
OrderEntryHandler orderEntryHandler = new OrderEntryHandler();
disruptor.handleEventsWith(orderEntryLogger).then(orderEntryHandler);
disruptor.start();
ringBuffer = disruptor.getRingBuffer();
Where OrderEntryLogger logs the event, and OrderEntryHandler checks
the market for matching trades.
What am I missing?