Building the Future of Collaborative Applications

By Benjamin Wolba on 17 March 2022

This post was originally published on the Future of Computing blog.

Do you notice lag when collaborating online with colleagues around the world? You’re not alone! As the future of work moves increasingly remote and users and colleagues are spread out around the world, apps and database systems are being challenged to support collaboration in real-time with low latency across continents and oceans.

To address these challenges, James Arthur and Valter Balegas founded Vaxine, a low-latency, geo-distributed database that allows developers to build collaborative applications using CRDTs: conflict-free replicated data types. Receiving a pre-seed investment led by Lunar Ventures earlier this year, Vaxine is about to turn cutting-edge research into applications.

Learn more about Vaxine from our interview with the CEO, James Arthur:

Why did you found Vaxine?

I was looking into the global write-path latency problem you run into whenever building a geo-distributed application: How do you keep data consistent without waiting on the speed of light?

You can see from platforms like Cloudflare and Fly.io that there’s a major trend to serving applications close to the user. Network latency often dominates response times, so moving your app or functions close to the user can radically increase the snappiness of your app.

However, once you move your app close to the user, you also need to move your data. Otherwise, the gains in latency between the app and user are undermined by the increase in latency between your app and the database. As it turns out, that’s a really fiendish problem due to some “minor” constraints like the CAP Theorem and the speed of light.

I started investigating the problem by making a low-latency global database using existing technology, YugabyteDB, to be specific. This worked, but when talking to developers about it, they all focused on the consistency guarantees and the trade-offs YugabyteDB was making to achieve low latency.

It led me to dive into the scientific literature on consistency modes for low-latency databases: and I discovered a tremendously rich vein of research by academics including Marc Shapiro, Nuno Pregucia, and Annette Bieniusa with concepts like highly available transactions, conflict-free replicated data types, and causal consistency, which had all been combined in the development of the open-source project AntidoteDB.

Collaborating with the academics and my co-founder Valter, we started to design a database system built on top of Antidote DB that could demonstrate its viability for real-world applications. The result is Vaxine: a low-latency, rich-CRDT database that can work as a standard backend for collaborative, geo-distributed applications.

How does it work?

Current generation global databases such as Google Spanner and CockroachDB use network communication to coordinate when writing data. Because this network communication goes all across the world, it runs up against the speed of light. It can easily take a whole second for the system to agree on a write that could otherwise be made in less than 1ms.

Vaxine eliminates this network communication, speeding up writes by several orders of magnitude using CRDTs: A data structure that can be updated independently and concurrently without the need for additional requests to ensure consensus between replicas. It’s always mathematically possible to resolve inconsistencies, ensuring strong eventual consistency.

Why is it called Vaxine?

Initially, the project started as Electric DB with a strong focus on low latency. However, over time it turned out that low latency combined with data integrity and immunity from consistency issues is a lot stronger differentiator, and Vaxine captures this proposition better than Electric.

There’s also a strong naming convention in the research literature based on the concept of a “cure” for consistency issues. So AntidoteDB implements the Cure protocol, and Vaxine is a delivery mechanism for the Antidote.

We’re also developing Vaxine using the programming language Elixir. Having an x in the name is very common in that ecosystem because Elixir files use the .ex file extension.

How did you evaluate your startup idea?

I talked to potential users early on and got valuable feedback. This led me to focus not only on low-latency but also on data integrity and consistency – and research different data consistency setups.

Special thanks go to Purva Gujar, who has been there from the start. She has helped tremendously with the customer development process, not least through her extensive contacts in the San Francisco developer scene. Also to Paul Harter, who was instrumental in the earliest days when the project was forming, and, of course, to my co-founder Valter, who pioneered rich-CRDTs in the first place.

We’ve also had a lot of interest and encouragement from the Erlang and Elixir community, which is very friendly and welcoming. There is a lot of value in focusing on a tight-knit community first before going wider – just like Heroku started as a platform for Ruby applications.

Who should contact you?

We are very keen to chat in “discovery mode” with potential future users who could benefit from our value propositions and use our database to develop low latency, real-time, collaborative applications.

Whether you are an open-source enthusiast, working with Erlang/Elixir, or simply interested in our work: feel free to join our Discord community.

Last but not least: In May 2022, I am speaking about Vaxine at Code BEAM in Stockholm – Europe’s largest conference for Elixir and Erlang developers. Happy to meet you there or online!


Introducing Rich-CRDTs

By Valter Balegas on 03 May 2022

Rich-CRDTs are conflict-free data types (“CRDTs”) extended to provide additional (“Rich”) database guarantees. These guarantees, such as constraints and referential integrity, make building applications under eventual consistency much simpler.

Subscribe to the Vaxine blog and newsletter.

Get technical updates and articles straight to your inbox.

We will never share your email.

Or go old-school with some really simple syndication.

Subscribe

Subscribe using RSS

Go old-school with some really simple syndication.

Subscribe