How does Trello accurately show users online / offline / idle status?

Trello very accurately displays information about the status of online / offline / inactivity, as I personally saw. There are several solutions for tracking online statuses of users, and this requires a serious invoice. There are also traditional problems associated with not knowing whether the user has closed the browser, disconnected, etc., which cause inaccuracy in displaying the status of battery life / unemployment. For a platform that does not have chat features (which, I believe, would require overhead to track user status and, therefore, ease the task), how does Trello achieve this, albeit without much overhead?

Also Trello can detect disconnects and resume the connection (not so smoothly though).

Clicking and polling the Trello layer is described here.

+4
source share
2 answers

Each browser tab is considered a session associated with one user. Each level of session activity is monitored separately, while the user shows the highest level of activity of all his sessions (where the highest is active, then it is idle, and then disconnected).

- , WebSocket 5 . reset , , keydown mousedown. , 5 . onunload, .

, , , , . , , , ( , Trello, ).

, , , (2 , WebSocket, - 10 ) , ( ).

, , .

+5

Trello socket.io.. , - , , , . , , .

, socket.io .

+1

Source: https://habr.com/ru/post/1527453/


All Articles