Netwide Message Passing
摘要
As efficient as the exchange of messages presented so far is for many tasks, its concept basically contradicts the concept of the distributed programming that does not require shared memory: The communication between different goroutines, which—in contrast to operating system processes—are lightweight processes with a shared address space, runs in Go via channels that are already shared variables themselves. Distributed message passing in the strict sense is the communication between different computers or different operating system processes on one or more computers. After a short sketch of aspects of network communication based on TCP/IP, this chapter presents a channel concept by developing a package that permits the exchange of messages in networks and the construction of distributed programs on this basis. As an example of a distributed program, the algorithm of Ricart and Agrawala for decentralized mutual exclusion is explained.