Skip to content

Stream larger data#1262

Merged
danielballan merged 13 commits intobluesky:mainfrom
gwbischof:stream-big-data
Jan 21, 2026
Merged

Stream larger data#1262
danielballan merged 13 commits intobluesky:mainfrom
gwbischof:stream-big-data

Conversation

@gwbischof
Copy link
Copy Markdown
Contributor

@gwbischof gwbischof commented Dec 19, 2025

Add a max_size param for subscriptions so that clients can specify that they want to receive larger data.
This also improves the client behavior when receiving a message that is too large.

I think we ignore the codecov failures because the Starlette TestClient.websocket_connect() doesn't support max_size.
I tested this on a local tiled and it has the behavior that I was going for.

Any thoughts about what the client behavior should be when receiving data that is too large?

Test against tiled-staging worked well.

uv run receiver.py
Listening for updates. Use Ctrl+C to stop....
Array created: 1768934662.683
Message exceeds max_size (1000 bytes). Subscription will disconnect permanently. Increase max_size in start() to receive large messages.

I opened an issue to fix the warnings from the docs build: #1273

Comment thread tiled/client/stream.py
@gwbischof gwbischof marked this pull request as ready for review December 23, 2025 20:56
Comment thread tiled/client/array.py Outdated
@danielballan danielballan merged commit f050703 into bluesky:main Jan 21, 2026
30 of 36 checks passed
ZohebShaikh pushed a commit that referenced this pull request Feb 21, 2026
* fix a little bug with StreamingCache no defined

* add missing dep to pixi.toml

* increase the websocket max size

* expost the max_size param

* update docs

* touch up

* add more max_size params to subclasses

* improve receiver handling of messages that are too big

* touch ups

* touch ups

* move max_size param to start

* disconnect when message too big

* update max_size docs
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.

2 participants