Use websockets in CWS for notifications to contestants
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1k
- Forks
- 412
- Avg merge
- 6d 10h
- Merged PRs (30d)
- 3
Description
Currently CWS gets notifications by polling every 30 seconds, and gets submission statuses by doing polling with exponential backoff (starting at 1 sec, delay multiplier about 1.5). Instead, we could use websockets to deliver the results as soon as they become available. As a demo of how effective this might be, currently for contests with a public scoreboard, you can see your score change on RWS before it updates in CWS (because RWS already uses websockets, at least when configured correctly).
This might also require adding some new rpc's to notify CWS of new submission results, but hopefully not too much work.
On the other hand, it would probably be a good idea to have a fallback for when websockets don't work (e.g. broken reverse proxy config), to make sure notifications aren't missed entirely.
Similarly, I think there's a bunch of polling in AWS which could also theoretically use websockets.
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 tracing the existing polling in CWS and the websocket implementation in RWS, then compare the related polling in AWS. Define the RPCs needed to deliver submission results and notifications, and verify that a reliable fallback prevents missed notifications when websockets are unavailable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100