Web Assembly & Streaming Data for Financial Markets (HTML5, OMS, EMS, Market Data)

Had the pleasure of seeing a presentation by Mike Dunne, CTO of Activ Financial on Web Assembly.

Firstly, what is Web Assembly? 


There's a good answer on the Mozilla website here.

"WebAssembly is a new type of code that can be run in modern web browsers and provides new features and major gains in performance. It is not primarily intended to be written by hand, rather it is designed to be an effective compilation target for low-level source languages like C, C++, Rust, etc.
--https://developer.mozilla.org/en-US/docs/WebAssembly/Concepts

"The WebAssembly ecosystem is at a nascent stage; more tools will undoubtedly emerge going forward. Right now, there are two main entry points:
  • Porting a C/C++ application with Emscripten.
  • Writing or generating WebAssembly directly at the assembly level"
--https://developer.mozilla.org/en-US/docs/WebAssembly/Concepts

There is the mandatory "hello world" example here.

What's the relevance to Global Electronic Trading?

Here's an extract from one of the slides that Mike presented:
The item "MB" is a middle-box.  This can be thought of as the web streaming server that takes data from a server-side backbone and converts to JSON for distribution to web clients.

The above is a pretty standard architecture for systems such as:
  • Single dealer platforms
  • Web delivered EMS
  • Web delivered OMS

But Mike proposed a new architecture pattern:
The difference here is that there is no middle box, that the data from the server-side backbone is pushed all the way through to the web client.  This sounds like a small detail, but it's actually a big deal. Why?

Removing the middle box has a number of positive effects:
  • frees up hardware
  • frees up developer time
  • reduces overall system complexity
  • reduces time-to-market for changes and new developments
  • reduces end-to-end latency 

Mike also gave an instructive example of the development options available: 


Although the JavaScript tooling is pretty clunky at the moment, this will get better over time. And the same incremental improvement will happen for wasm.  But today the process involves writing C or C++ then using Emscripten to compile to Web Assembly.

The C/C++ world has a great deal of tooling available, over time we should see that the quality for WASM development improves.

Bottom line: If you are building web applications that stream market data - whether exchange data, broker quotes, Axes or anything else - it is time to look at WASM if you have not done so already.

Disclosure: Activ Financial and Alignment Systems have no commercial arrangements in place. No axe, just impressed with their work.

Comments