Jamsocket PlatformOverview

Jamsocket Platform

The Jamsocket Platform provides lower-level APIs for developers who want to write their own sync engines and sandboxed code execution environments. When you use these APIs, the Jamsocket Platform runs an instance of the containerized code that you provide as a session backend. That is, a lightweight backend that runs for a user or document session.

Session backend basics

Session backends are server processes that you can start instantly with an API call. Your application connects to them from client-side code. When the last client disconnects, the session backend is shut down.

This architecture is commonly used for multiplayer collaboration, sandboxed user code execution, and more.

There are four main steps to getting a running session backend on Jamsocket.

  1. Create a service with the Jamsocket CLI, HTTP API, or the Jamsocket dashboard.
  2. Build your session backend code using a standard Docker builder workflow
  3. Push your containerized session backend to your Jamsocket service.
  4. Spawn a service to create a running session backend.

Learn how to create, build, push, and spawn session backends using our Quickstart, which covers the basic steps for integrating Jamsocket into a full-stack application.

Session backends for your use case

It can be helpful to think about session backends as a part of a larger application architecture. The most common use cases for Jamsocket include realtime multiplayer applications, data intensive applications, and AI/LLM powered applications.

Realtime Multiplayer

Think of the session backend as a room or document that users can collaborate on.

  • Session backends can be shared between multiple clients that connect to it via WebSocket connections.
  • Session backends are stateful. They can load the document into memory when they start up, and then act as the authority for that document during that user session.
  • Session backends are ephemeral. The backend will gracefully shut down once all clients are disconnected.

To see multiplayer collaboration in action, follow this NextJS SocketIO tutorial for building a shared canvas.

Data Intensive Applications

The session backend gives clients the extra computational power needed for data intensive applications.

  • Session backends offer dedicated compute and memory for compute intensive applications. Using BYOC or fully managed, you can designate the amount of compute and memory needed for your application.
  • Use the session backend as a coordination layer between data intensive workers and connected clients.

AI/LLM Powered Applications

The session backend provides a stateful environment for AI agents to operate on documents with your users.

  • Manage multi-step workflows use a session backend to manage multi-step generative AI flows.
  • Use the session backend as a source of truth between clients and AI agents.
Built by Jamsocket.