Part 1/3: Order Matching Engine Requirements

View this thread on: d.buzz | hive.blog | peakd.com | ecency.com
·@bitsharesorg·
0.000 HBD
Part 1/3: Order Matching Engine Requirements
<center>https://news.bitshares.org/wp-content/uploads/Dev-Corner-P1.jpg</center> <br/><p><em>Dev’s corner is a new section of BitShares News where developers involved with the BitShares project post technical related briefs and observations.</em> </p>
<p>As an academic exercise, I wanted to take on building a order matching engine in C++. The purpose here is to iterate through the process of measuring and improving performance.</p>
<p>I imagine the initial requirements as naive, with later iterations including removal of floating point calculations, variable precision, 128-bit integers, “dust” handling (may be more of an implementation  question than a performance one).</p>
<p>This order matching engine will be strictly single-threaded and purposeful. It is hoped that the input will be clean and optimized (which could be offloaded) to improve throughput.</p>
<p>Tooling will be sparse, on purpose. The idea here is not a discussion of the intricacies of the tools, but how tweaks to code affects speed.</p>
<h2>The Idea</h2>
<p>The engine will receive limit orders that specify the <a href="https://news.bitshares.org/devs-corner-bitshares-assets/">asset</a> held, the asset to be bought, and the desired price. It will include a sequential ID, externally guaranteed to be unique (such a key could be analyzed  later… we’ll see…).</p>
<p>Once received, the order is processed and if not immediately filled, what is left over is placed on the order book.</p>
<p>Simple, right? There are many details yet to be sorted out. So we will get started! Stay tuned!</p>
<p>For the first cut of the order book, <a rel="noreferrer noopener" href="https://github.com/jmjatlanta/matching-engine/commit/2403936310cfb48cfd22935a8aaf5b319335cd6f" target="_blank">see this GitHub commit.</a> <br><br>Stay tuned for Part II: "Order matching and Container Types".</p>
<p><a href="https://www.jmjatlanta.com/index.php/2019/12/09/matching-engine-requirements/">Source</a></p>
 <br /><center><hr/><em>Posted from BitShares News using SteemPress, see: https://news.bitshares.org/order-matching-engine/ </em><hr/></center>
👍 , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,