At the moment you can't join a room via the rest api and register for notifications server-side. This is on the roadmap, however. Currently your options to do this serverside are limited to polling.
Can a server join a GetInstant room in order to get notified of changes?
-
30-09-2022 - |
Pregunta
Can a server join a room in order to get notified of changes?
Usecase: A user updates a field A, for which another calculated field B must be updated. However only the server is able (has the rules) to calculate the field B based on A.
What I mean would be the following flow:
- user updates field A.
- gets synced to GetInstant
- GetInstant notifies all users in the room among which the server, of the changed field A
- Server calculates field B
- field B gets synced to GetInstant
- (optional: clients get notified of updates of field B)
As a workaround I could let all updates go through by own server and do the plumbing myself, but I'd rather not. Moreover, directing traffic like this is costly for the sporadic case that I need to do these calculated field transforms.
Solución
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow