Answer the question
In order to leave comments, you need to log in
How to create a connection between applications in golang in real time?
Good afternoon,
There is a server and clients should be connected to it. You need to make a channel and notify the server / clients in real time.
How to make a websocket connection, but not between a server/browser, but two golang programs?
Or advise another technology so that it would be possible to send json data over the channel.
Thanks
Answer the question
In order to leave comments, you need to log in
https://github.com/v-grabko/Core/wiki/TcpClientServer
You will do the same anyway. I just already made an abstraction.
websocket is only if you need https compatibility.
If over the network:
gRPC if protection is needed.
Or just Google Protobuf - it's very fast.
msgpack is like a protobuf, but without the need to describe the protocol, it's like a binary json.
There is also gotalk
If everything is on one physical computer, then unix sockets.
Only the term "real time" means something completely different.
websocket a priori cannot be "real time" since it is a network protocol.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question