should I use shared memory in "stock trading" system to separate "market data receiver" part?
<p>My trading system consists of two parts</p>

<ul>
<li>"Udp milticast market data receiver" - just receives market data from UDP multicast and nothing else(orderbooks, orders, best bid/ask etc.)</li>
<li>"Main system" - uses market data, calculates new orders, send orders etc etc.</li>
</ul>

<p>These systems are pretty connected - typical scenario is something like that:</p>

<pre><code>- "UDP" -&gt; "Main" Apple BID/ASK 500.1/500.2
- Main sends order № 1122 Apple BUY 555
- "UDP" -&gt; "Main" Order № 1122 Executed
- Main send order № 1123 Apple SELL 505
- "UDP" -&gt; "Main" Order №1123 Registered, Ammount 1, Executed 0, Left 1
</code></pre>

<p>"UDP" part doesn't know that "Main" exist.
"Main" uses "UDP"</p>

<p>I want to make these to be separate projects because theoretically I can run "UDP" itself without running "Main". Or I can run several "Main" instances.</p>

<p>So "UDP" should produce some writable storage that others can use.</p>

<p>But "Main" and "UDP" are pretty connected - they use the same classes and same structures to represent <code>Quotes</code> etc.</p>

<p>And I also can't have perfomance penalty, perfomance is very important I need something as fast as just storing data inside application.</p>

<p>Should I use "shared memory" or other techniques or it's better to make everything in one project?</p>

<p>I think my problem is pretty general because a lot of different market data adapters already written by different companies so there should be some "default" solution.</p>
