y-http provider to replace y-websocket and websocket polyfill
Open
@max-nextcloud is already working on this.
Since Jun 3, 2025.
enhancement
- Dominant language
- JavaScript
- Stars
- 659
- Forks
- 133
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 110
Description
Is your feature request related to a problem? Please describe.
The yjs provider that syncs with the server is way to complex
Describe the solution you'd like
Have a y-http provider that takes care of the syncing and can handle being online / offline well.
y-http
- open connection
- expose connection
- basic syncing
- basic awareness messages
- include url in connection
- expect client to know params to open
- use ydoc client id in open
- handle awareness queries (without sending them)
- delay test requests
- ensure awareness messages are send at least every 10 seconds
- return only newer messages in DummyServer
- hand version to sync request
- ensure old awareness states are cleared after 30 seconds
- implement closing the connection
- test reopening the connection
embedding in text js
- implement client to instantiate y-http with
- extract api calls from Sync service and use connection instead
- extract document flags such as
hasOwnerfrom sync service and use them - implement events in y-http provider and handle them instead of sync service events
server side
- allow flagging updates as full compressed history
- at most send all versions since last compressed one
- clean up older versions
later
- process queries
- send query message with every request
- send compressed history
- make the api stateless, removing the need for connection
- reset remote doc when receiving compressed history
- detect out of sync and reconnect (effectively receiving compressed history and all steps since then)
- handle sync queries (without sending them)
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.
Assessment
This issue has not been assessed yet.