This is out of scope but here is some glue:

1. every socket connected is per user

2. you need smth another that would share a state between socktets.

It may be a module-level variable or add your users to redis pubsub (like django-channels does).

You can follow this repo where I continue researching this approach: https://github.com/alex-oleshkevich/asgi_cable

It is heavily WIP but you can get some insights.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Alex Oleshkevich

Alex Oleshkevich

More from Medium

Interpersonal Synchrony

The Work On The Reaction Prediction Software…

🚨Only Few days left until #Whitelist sale starts for the @metabunnylegends #NFT 🥊More than 9,000…

What is the difference between mortgage banker, mortgage broker and a mortgage banker/broker?