posit-dev / posit-dev/kallichore
Support for a binary Websocket protocol
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Kallichore's Websocket protocol is modeled after that of the Jupyter kernel gateway; that is, it sends text messages over the websocket that are well-formed JSON.
{
"channel": "iopub",
"header": {
"msg_type": "example"
},
"content": {
"example": true
}
}
This text-based representation has a few upsides:
- it makes debugging a lot easier since you can examine the message and its contents as simple strings
- it makes it easier to compose valid socket messages using high-level tools and in test frameworks
However, it also has a few downsides:
- it is not very space efficient
- it is unfriendly to raw binary data such as the message buffers (which we are currently base64 encoding)
- it is slightly more computationally expensive since everything needs to be serialized on the backend and then parsed on the front end
For these reasons, the official Jupyter Server uses a binary-based WebSocket protocol. We could support exactly the same one, as an option, if needed:
https://jupyter-server.readthedocs.io/en/latest/developers/websocket-protocols.html
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the Jupyter Server binary WebSocket protocol documentation linked in the issue, then locate Kallichore’s current text/JSON WebSocket implementation. Define whether binary mode is optional and how it handles raw buffers, and add coverage demonstrating protocol compatibility before considering the work done. No repository files or tests are named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- jupyter, rust
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100