nextcloud / nextcloud/whiteboard
Integrated sync backend
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 215
- Forks
- 39
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 32
Description
Now that we have the basic sync running with the websocket_server, we should look into how we can mirror the behaviour with a PHP-only backend.
socket.io supports long polling https://socket.io/docs/v3/how-it-works/#http-long-polling which we could make use of
- provide php endpoints for GET and POST requests
- Think about way to store/distribute and handle the messages
- server-to-client
- init-room
- joined-data
- first-in-room
- room-user-change
- client-broadcast
- user-follow-room-change
- room-user-change
- broadcast-unfollow
- client-to-server
- connection init
- join-room
- server-broadcast
- server-volatile-broadcast
- user-follow
- disconnecting
- disconnect
- server-to-client
We could potentially require redis with https://github.com/phpredis/phpredis?tab=readme-ov-file#publish or just use a db backend if that is not present.
Required protocols to implement
https://github.com/socketio/engine.io-protocol
https://socket.io/docs/v4/socket-io-protocol#introduction
Additional resources
https://github.com/socketIo-php
https://github.com/socketIo-php/engine.io-parser
https://github.com/socketIo-php/socket.io-parser
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 by examining the existing websocket_server sync behavior and the linked Engine.IO and Socket.IO protocol documentation. Define the PHP GET and POST endpoints, message storage or distribution approach, and handling for the listed server-to-client and client-to-server events. Done means the PHP-only backend mirrors the required sync behavior and protocol interactions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, php
- Domain
- backend, distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100