Skip to content

Migrate endpoint calls and streaming to JSON-RPC 2.0 #5903

Open

Description

@SandPod

Problem to Solve

Standardize Serverpod's endpoint protocol on JSON-RPC 2.0, simplify future schema generation, and preserve communication with supported existing clients.

Proposal

  • Make all newly generated clients use JSON-RPC for endpoint calls and streaming messages, with a documented streaming extension and no legacy client fallback.
  • Preserve legacy HTTP and WebSocket protocols on the server through separate adapters sharing execution and stream lifecycle code.
  • Add frozen wire fixtures and released-client compatibility tests for the promised support window.
  • Separate compatibility tests, behavior-preserving refactors, and protocol changes into independently reviewable steps; prepare shared metadata for a future OpenRPC/schema generator.
  • Roll out server support before new clients. Target a minor release, explicitly reviewing the minimum-server requirement against our compatibility policy.

Use Case

Upgrade a server while deployed apps keep working, then ship newly generated clients using JSON-RPC for both calls and streams.

Alternatives

Keep the custom protocol, or maintain both protocols in new clients. Neither reaches the desired JSON-RPC-only generated-client end state.

Additional context

Early AI-only investigation of how this could be implemented — a public, preliminary exploration of architecture, risks, streaming, and implementation steps; not a human-reviewed or approved design.

How experienced are you with this library?

No response

Are you interested in working on a PR for this?

  • I want to work on this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions