How SOOT built a Multiplayer Filesystem for the Web
2024-07-25
Felicia Chang
SOOT is a new species of filesystem. Built for large visual archives, SOOT allows you to visualize, search and share these assets en masse.
They recently raised a $7.2 million seed round, a testament to their popularity among creative institutions like design firms, fashion houses and museums.
The Challenge
Building a multiplayer system wasn't initially a priority for the SOOT team. They were instead focused on building an AI system that could organize archives with thousands of images, PDFs and videos.
But whenever their AI altered data in a SOOT space, conflict resolution issues that mainly occur in multiplayer applications began to arise.
”People would make a change, and then the data would change from underneath them because the AI made a change. And we were getting conflicts from that,” explained Amol, co-founder and CTO of SOOT.
“AI systems today work in human time horizons.” A batch job can take minutes to complete and “you can’t just make the application totally unusable while the AI is off doing something.”
While they worked on making the AI faster, they also needed to address the conflicts users were seeing.
That's when they arrived at a eureka moment: “AI is effectively your second player” in a multiplayer environment.
Investing in multiplayer would enable not only peer-to-peer collaboration but also collaboration between their users and AI.
Evaluating different multiplayer solutions
With that realization, the team spent a month evaluating popular multiplayer solutions. They looked into operational transform, CRDTs and authoritative server models.
While operational transform and CRDTs are popular among text-based editors, both approaches would have ballooned in complexity when applied to applications like SOOT.
The SOOT team consulted experts across the multiplayer space: a chief engineer at Slack, a professor of CRDTs at Oxford, and Paul Butler, co-founder of Jamsocket.
After a deep consideration of the possible options, the SOOT team chose the most intuitive option for their use case: an approach called event-sourcing.
In this model, an authoritative server acts as the source of truth, managing state and resolving conflicts whenever clients make edits. That authoritative server is the Jamsocket session backend.
Jamsocket is probably our highest integration point. It’s the backbone in a very meaningful way for a lot of the work that we’re doing.
Avoiding the pitfalls of machine orchestration
Without Jamsocket, supporting an authoritative server would require significant engineering investment. Common container orchestrators, like Kubernetes, aren't designed to support stateful server side processes.
“Instead of spending a year thinking about how to do machine orchestration scalably – and then probably doing it in a buggy way – we rely on Jamsocket,” said Amol.
Bring your own compute
The SOOT team got started on the bring your own compute plan, which allows you to host Jamsocket in your own AWS account.
We worked closely with the SOOT team to integrate with their AWS setup, factoring in their particular security and scaling requirements.
“From day one, Jamsocket was more or less what we needed.”
When a client opens a SOOT space, SOOT spins up a Jamsocket session backend that loads the contents of the space from S3.
During an editing session, representations of state live on both the client and session backend. When a conflict arises, the session backend resolves the diverging versions using a process Amol compares to a git rebase. “That ended up working really well for us.”
The Future
By building multiplayer into their application, the SOOT team has been able to fully capitalize on their AI system. Now, their team is fully in “feature mode,” adding integrations with different data providers and creating new SOOT spaces that consumers can experience and play with.
If you’re interested in using SOOT, check out their public SOOT spaces or join the waitlist.
For a deeper technical dive on multiplayer applications:
- Read our article, AI as a Player in Multiplayer
- Build a NextJS example app with multiplayer features
- Reach out to us or book a call