Skip to content

Two Way Communication

legan_dary23 edited this page Jun 10, 2018 · 2 revisions

To allow synchronization across multiple browsers and multiple users, we use a broadcast mechanism to all two way communication. Front-end need to listen to the socket for getting the callback.

Callback Socket

https://localhost:8080/dsapi-websocket

When user open a book, the front-end should subscribe to the book and unsubscribe the previous book if existed. When user open a sheet, the front-end should subscribe to the sheet and unsubscribe the previous sheet if existed.

Broadcast Routes

https://localhost:8080/callback/updataBook/{bookId}
https://localhost:8080/callback/updataSheet/{bookId}/{sheetName}

Sample Subscribes

https://localhost:8080/callback/updataBook/cjfx4leqo
https://localhost:8080/callback/updataSheet/cjfx4leqo/Grade

Clone this wiki locally