Calculate plans on the server over a WebSocket #320
Notifications
Due Date
No due date set.
Blocks
#323 Queue server calculations beyond PLANNING_WORKERS
nessar/vac-optimizer
#324 Limit server calculations per client IP
nessar/vac-optimizer
#325 Calculate locally when client and server builds differ
nessar/vac-optimizer
Reference: nessar/vac-optimizer#320
Reference in new issue
Block a user
Parent
#319
What to build
When the person presses Calculate, the calculation runs on the VacOptimizer server instead of on their device, and the app behaves as it does today: progress, Cancel with the best valid plan retained, the stable plan explanation, the explanation of an incomplete calculation, and counterfactual date analysis of a displayed leave placement.
The server carries the existing planner worker protocol over a same-origin WebSocket, one socket per worker job. It runs the unchanged planner worker for each socket and terminates it when the socket closes. The client keeps fixing the calculation's Europe/Paris calendar date. If the socket cannot open within a short connect timeout (about 5 seconds), or the server closes it before sending any message, the device calculates locally without notice. A connection lost mid-calculation is an incomplete calculation with the best valid plan already received, without an automatic retry.
This ticket has no queue, no per-IP limit and no build check: every socket starts a calculation immediately.
Acceptance criteria
ng serve, which has no backend.Blocked by
None — can start immediately.