Hey Everyone, need some help on evaluating my approach for websocket/channel use.
I have some binary data coming in from multiple sources, say these sources are S1, S2 ... Sn. I am using websocket to get this data ingested. I will be putting this data in a messageQ along with "source name".
I will have a messageQ will be setup as FAN OUT model and consumer will keep consuming it & discarding it IF there is no actively destination.
When a destination comes online, it will open a websocket connection to my server and will tell that i am interested in data from S2.
Server will send a channel message with "source name" (s2 in this case) to the code which is processing messageQ messages
the messageQ processor, once have source name, will filter that source data, and send it back to websocket process via another channel
once the websocket connection ends, the websocket process will send a message via channel that its no longer interested in any source data
ther messageQ processor will stop filtering and keep on reading messages from the queue and ignoring it
Is this right approach to stream binary data from source -> destination? is my usage of channels correct? once i send a value via channel, does that value is removed once read by a porcess or it stays there? any thoughts/inputs will be appreciated
want low latency
scalable (not in version 1 but eventually)
cloud provider agnostic