Skip to content

(WIP) Support for large RPC messages using data streams#1013

Draft
1egoman wants to merge 8 commits intomainfrom
rpc-with-data-streams
Draft

(WIP) Support for large RPC messages using data streams#1013
1egoman wants to merge 8 commits intomainfrom
rpc-with-data-streams

Conversation

@1egoman
Copy link
Copy Markdown
Contributor

@1egoman 1egoman commented Apr 13, 2026

This is port of the identically named client-sdk-js pull request livekit/client-sdk-js#1832, adding support for RPC protocol version 2, via feeding the spec to a LLM.

Warning

This pull request was LLM generated and has only been lightly reviewed by a human. The author has tested this and confirms it works in the happy path, but no other validation has been done.

A more thorough review of this needs to occur before it could be merged. The plan is to hand this off to a rust sdk maintainer to get it fully across the line.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 13, 2026

Changeset

The following package versions will be affected by this PR:

Package Bump
livekit patch
livekit-api patch
livekit-ffi patch

Comment on lines +238 to +253
// =========================================================================
// v2 -> v2 tests (both sides support data streams)
// =========================================================================

/// Spec #1: Caller happy path (short payload) — v2 data stream used.
#[tokio::test]
async fn test_v2_v2_caller_happy_path_short() {
let client = Arc::new(RpcClientManager::new());
let transport = Arc::new(
MockTransport::new()
.with_remote_protocol("dest", CLIENT_PROTOCOL_DATA_STREAM_RPC),
);

let handle = spawn_perform_rpc(
client.clone(),
transport.clone(),
Copy link
Copy Markdown
Contributor Author

@1egoman 1egoman Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to any reviewers: The tests here don't use the larger e2e test infrastructure in this repository purposely, because some test need to fully emulate the behavior of an old client (ie, doing things like always sending RpcRequest / RpcResponse even with a newer client_protocol, etc).

I am not sure if this is a good idea or not. Halfway through the process, the LLM basically said it couldn't generate the tests with the e2e infrastructure and proposed this as an alternative so I let it go for it.

@1egoman 1egoman requested review from ladvoc and reenboog April 13, 2026 20:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant