You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Hrana WebSocket support (JSON, then Protobuf) #189
Let libsql-java speak Hrana 3 over WebSocket. A JDBC connection can then keep one multiplexed connection to sqld, instead of making one HTTP request per pipeline.
Both phases share a seam that does not exist yet. Today LibsqlConnection depends directly on the concrete LibsqlHttpClient and on the HTTP baton as its source of truth for "is a stream open". WebSocket has no baton — the client assigns a stream_id. Phase 1 introduces a stream-level seam (open / execute / batch / close, with error mapping) implemented by both the HTTP client (baton) and the WebSocket client (stream_id), and migrates LibsqlConnection to it. Phase 2 reuses that seam and swaps only the frame encoding.
Sequencing
Phase 2 starts only after phase 1 is merged.
Source of truth and outside check
Protocol: vendor/HRANA_3_SPEC.md, section "Hrana over WebSocket".
Behavior: integration tests against the pinned sqld image (libsql.image in the root pom.xml), which is independent of this codebase.
Done when
Both phases are merged.
The integration tests run JDBC over WebSocket in both encodings against sqld.
The HTTP transport is unchanged, and its conformance and integration tests still pass.
The transport seam (LibsqlClient) is in place, LibsqlConnection no longer depends on the HTTP client, and LibsqlDriver selects the transport and encoding from the URL. The HTTP transport is unchanged.
Verified on merged main (6591155): 374 unit tests pass, spotless:check passes, and WebSocket*TransportIT passes 8 of 8 against the pinned sqld image (5 JSON, 3 Protobuf).
Remaining limits are recorded in #188: wss has no TLS integration test, and Protobuf over HTTP and Hrana cursors are out of scope.
Activity
magnusp commentedon Oct 24, 2026
Both phases are merged.
hrana3), merged as22c67d5.hrana3-protobuf), merged as6591155.The transport seam (
LibsqlClient) is in place,LibsqlConnectionno longer depends on the HTTP client, andLibsqlDriverselects the transport and encoding from the URL. The HTTP transport is unchanged.Verified on merged
main(6591155): 374 unit tests pass,spotless:checkpasses, andWebSocket*TransportITpasses 8 of 8 against the pinned sqld image (5 JSON, 3 Protobuf).Remaining limits are recorded in #188:
wsshas no TLS integration test, and Protobuf over HTTP and Hrana cursors are out of scope.