Private Phoenix channel names without user ID

I am writing a service in which drivers of a certain platform send GPS coordinates periodically via WebSocket.

The canonical name for those channels would be something like “locations:driver_id”, but of course the driver was authenticated when the socket connection was established. So, the driver_id part of it is redundant, you have it in the socket assigns.

The app never broadcasts to those channels, they are one way only (except for replies), and I am thinking about dropping the suffix. You connect, join “locations”, and start streaming.

Do you see any drawback in that naming schema?

I do not see any, however you could even use HTTP for that, especially with keep-alive or HTTP/2 persistent streams. In HTTP over QUIC it should become even simpler.

Yeah, you could, but you can use WS too :).

There is going to be more “events” sent, which would map to their own channels… I think WS is a natural way to implement that.