Summary
This chapter was all about the net
package, TCP/IP, TCP, and UDP, which implement low-level connections, as well as WebSocket and RabbitMQ.
WebSocket gives us an alternative way of creating services. As a rule of thumb, WebSocket is better when we want to exchange lots of data, and we want the connection to remain open all the time and exchange data in full duplex. However, if we are not sure about what to choose, it is recommended to begin with a TCP/IP service and see how it goes before upgrading it to the WebSocket protocol.
Lastly, RabbitMQ is a rational choice when we want to store and retrieve a large amount of data to an external data store.
Go can help you create all kinds of concurrent servers and clients.
We are now ready to begin developing our own services! The next chapter is about REST APIs, exchanging JSON data over HTTP, and developing RESTful clients and servers—Go is widely used for developing RESTful clients and servers.