简体   繁体   中英

How to check number of active users in Dash app?

How would one check the number of "active users", ie number of users having the web page open in browser at any given time in a Dash web application?

There are a number of ways to achieve this.

Firstly the more robust approach would be to leverage the auth service you probably already setup so that users are correctly permissioned (a request to a token service would identify each user). After this you can record the initial site load by inserting an entry into a backend database.

You don't need to use an auth service of course you could just record the users IP address and insert into the database

If you wanted to know who is using your web app at any given time then one approach would be to add an interval timer callback which would add these entries to the database along with the access time

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM