Overview

Jamsocket Session Backends

Session backends are a necessary component to applications that require a stateful server-side process that persists across a user(s) session.

Session backend basics

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 setting up Jamsocket in 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 WebSockets.
  • Session backends are stateful, making it the suitable place for resolving conflicts, validating edits and broadcasting those changes
  • Session backends are sessionized so, 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.
Jamsocket is built by Drifting in Space.