clockworklabs / clockworklabs/SpacetimeDB

Batch subscription updates for multiple transactions before sending

Open
#2,784 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
25.2k
Forks
1.1k
Avg merge
2d 7h
Merged PRs (30d)
46

Description

We could batch by n messages or t milliseconds so that multiple subscription updates for a client would only result in one syscall.

Note, this does not require any changes to the websocket api. We can continue to feed() each message one at a time to the websocket and flush() should automatically send the messages in a single frame.

We should also add some jitter if necessary so that not all client tasks are alive at the same time.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing where subscription updates are sent and how websocket feed() and flush() are coordinated. Determine batching semantics for n messages or t milliseconds and whether jitter is needed; done means multiple updates for one client produce a single syscall without changing the websocket API.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.