javascript - Best Practices for implementing Chat in Django (storing online users) -
i'm implementing chat system in django.
i'm having bit of trouble deciding how create models decide online users. 2 problems see:
- you can't tell when user goes offline
- i want "users" lightweight (no log-in necessary), means don't want use django's user system.
any suggestions on how go modeling this?
store info in cache. it's ephemeral enough doesn't belong in long-term database, , access needs fast.
you don't need store lot of info deal chat session, storing in user's session (you can anonymous non-logged in users, , pull info "real" users table if happen logged in) right way go provided you're using pure caching session backend , memcached.
Comments
Post a Comment