Back to Blog
·AlgoX2 Team·Product

Open-Sourcing the X2 SDK: a production exchange you can download

Until now, AlgoX2 has been something only our large enterprise clients could touch. To try the platform, you had to be one of them.

That is about to change. We are building the X2 SDK, and anyone will be able to download it, build against it and see AlgoX2 run real applications. Not toy demos: the headline sample is a working exchange.

The SDK is not released yet. This post covers what it will contain, what stays closed, and why we are giving it away.

A self-contained development environment

The SDK is a fully self-contained environment for writing distributed apps that run on X2. It has several entry points and works at several levels of abstraction, so you can start wherever your app needs to.

It supports six languages out of the box: Rust, Go, Python, TypeScript, C++ and Java.

Six languages from one model compiler

AlgoX2 stores its data model in relational tables, and our code is generated from them on the fly by a model compiler. That is the approach behind OpenACR. We used LLMs to extend the model compiler to five more language targets.

We are starting conservative. Python, JavaScript and C++ get the message headers, the wire protocol and more or less full API support. The other languages get the message headers, so you can write the rest yourself.

We have no heavy applications in those languages, so we are not going to write their libraries for you. Given the message headers, whipping one up is not that difficult these days.

What is open and what is closed

You get the source code to everything except the server. The server stays closed source, and you download it as a signed tarball from GitHub releases. Everything else builds from source, and the sample apps come with it.

A real exchange, not a toy

The most sophisticated sample is a fully functioning exchange with no single point of failure. Two matchers run hot-hot, side by side, with deduplication. Kill one, and the other keeps processing. Kill both, and they restart from a checkpoint on a different node.

It’s a Terminator-like model that could be stunned but not disabled permanently, because it’s just going to reassemble itself from liquid metal.

Alexei LebedevCEO and Co-Founder

People who build exchanges can start from this sample and grow it into a production exchange. We think it will shame many of the production exchanges running around the world today, and that it is time for this kind of system to be freely available. Matching-Engine Failover and Hot-Hot Redundancy explains how the two matchers stay in step, and How to Build an Exchange covers the log they read.

One switchboard for many protocols

Other samples build custom distributed databases, work with time series, and connect several protocols at once.

In one of them, a fleet of cars publishes its locations with mosquitto_pub, the MQTT client used in IoT applications. The data goes into X2, and X2 serves it straight back out:

  1. Postgres. A Postgres instance subscribes to it, so every location is reflected there instantly.
  2. Kafka. The same data can be read through the Kafka API.
  3. NATS. It is served to NATS clients as well.
  4. Redis. It is served to Redis, which answers geofenced queries against it.

In this sample, X2 is a large switchboard with replay and fast transactions. One system integrates all the others. The protocols page lists what AlgoX2 speaks at its edges.

Apps that survive failure

The SDK also ships samples of fully checkpointed applications that run on streams. They restart automatically, scale, go down and come back up, and survive failures.

That is very difficult to do, and very few platforms support it, especially alongside the low-latency execution X2 offers. We are giving it away for free.

The bet behind it

We expect to publish more samples. Many distributed apps are waiting to be written on a platform that provides the main semantics of distributed computation, instead of each one carrying an ad hoc distributed platform of its own.

That is the bet. The distributed part has to be its own thing, and it has to provide all the APIs. The many apps you write on top of it are then very simple. That is what the SDK is for.

Tell us what is wrong

We use LLMs, but there are still humans on the other side making all the decisions. We want to hear from real users trying to write real distributed apps on X2, the negative feedback as much as the positive: this is bad, you shouldn’t have done that, do it this way.

Leave your email on the contact page to get updates about the SDK. We would love to be surprised by what people build.

Watch the video

Plays from YouTube, which may set cookies. See the Privacy Policy.

Watch on YouTube


Want more context on the platform? Read about the product, or get in touch with us on the contact page.