5 ms·
It is a rather vauge statement and could have used some clarification; however Go does make writing network protocols very simple, and building something like a
by jamescun 12y ago
It is a rather vauge statement and could have used some clarification; however Go does make writing network protocols very simple, and building something like a gossip protocol based system with a leader election system is doable in a week. Even quicker if you use some of the existing distributed systems libraries for Go.
- cgag 12y agoWhat does Go do that makes writing network protocols simple?
- skj 12y agoGo makes it straightforward to have one program efficiently communicating with many different servers and clients. It does this by having all network IO be event-based in such a way that it's effectively tied directly into the scheduler, and then communicating between the different goroutines managing all these connections is very easy.
- micro_cam 12y agoAll of the HTTP, socket, encryption, compression etc libraries have a really clean, consistent design based around stackable reader and writer interfaces. This makes it really easy to combine things, swap out transport layers etc. Go routines and channels are also nice for handling concurrent requests though I find myself using mutexes more than channels for finer grained control.