subhojit777 / questionnaire-backend

Real-time crowd survey application (Back-end)
http://subhojit777.in/questionnaire-backend/
MIT License
4 stars 2 forks source link

Sync presenter and participant screen #40

Closed subhojit777 closed 4 years ago

subhojit777 commented 4 years ago

Motivation

Websocket is required to sync presenter and the participant screen.

Technical specs

The data used during the communication should have:

presentation_id - the id of the presentation which is being presented question_index - the index position of the question to be shown in presenter and participant screen

All questions for a presentation need to be fetched, and get the count, and that is how the question_index will be decided. It should not be less than 0, and should not exceed the (number of questions - 1)

We need to make sure that the query for http://subhojit777.in/questionnaire-backend/questionnaire_rs/index.html#get-questions-for-a-presentation returns the questions in same order as for question_index

Tasks

Notes

Doc can be found here https://actix.rs/docs/websockets/ it also has links to examples

React WebSocket example https://blog.logrocket.com/websockets-tutorial-how-to-go-real-time-with-node-and-react-8e4693fbf843