R
R
Roman Rakzin2016-05-28 23:23:12
go
Roman Rakzin, 2016-05-28 23:23:12

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

2 answer(s)
V
Vladimir Grabko, 2016-05-28
@TwoRS

https://github.com/v-grabko/Core/wiki/TcpClientServer
You will do the same anyway. I just already made an abstraction.

G
Gizmothron, 2016-05-31
@Gizmothron

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 question

Ask a Question

731 491 924 answers to any question