Erlang for Finance

So, the forthcoming "Hardcore Erlang" book just got a lot more interesting.

The example application (which, apparently, will really get built) will now be the core of a stock exchange. This is very exciting to me. Recently I made a career change from spending most of my time working with telecoms systems to spending most of my time with financial systems. And I have been flabbergasted at the time, expense and painful tears of frustration that go into building financial systems, particularly trading systems, given that their basic function is so simple. A lot of this seems to be because the "enterprise" technology stacks turn out (oh the irony) to be dramatically ill-suited to the task.

These systems receive messages and emit messages, perhaps in different formats, perhaps onto a different transport. They do various kinds of fairly simple processing on messages, typically an "enrichment" of a message with some extra data looked up from somewhere. They filter out some messages. And so on. They are, in point of fact, very very similar to switches, bridges, routers and firewalls. They even have similar soft real-time, high availability, high throughput characteristics.

Over in the telecoms world, for some strange reason they don't build routers out of J2EE stacks. They don't handle voice packets with XSLT. Maybe there's a lesson there for someone. And maybe having a stock exchange (or something like out) out there written in the kind of technology that routers are written in might help unwedge a few conversations. I live in hope.

2 comments:

Unknown said...

Its partly the technology, but a lot of it is down to the fact that they made up the process as they went along and no-one understands how it is meant to work now. Not so true of Stock exchanges perhaps, but the more OTC you get the truer it is.

(An Erlang core would be very cool though)

Anonymous said...

"They are, in point of fact, very very similar to switches, bridges, routers and firewalls."

While I agree, and I think it's obvious, when doing some work with one of the exchanges they were not amused when I observed of their core trading app: "It's a router. It's a big, honking router."

Yet, it fits. There are a lot of Tandem systems still living in the underneath of financial infrastructures, down where the work happens. It's a piece of technology that delivers "soft real-time, high availability, high throughput" in something comprehensible in enterprise-land. It exposes SQL, which we understand.

Sigh.