Chapter 2. Protocols
There are various methods a process can use to communicate with other processes. As an example of this, consider communication by reading and writing to the filesystem or by using Inter-Process Communication (IPC). But with these approaches, itâs only possible for a process to communicate with other processes on the same machine.
Instead, processes are typically built to communicate directly with the network. This still allows for communication between processes on the same machine, but more importantly, it allows processes to communicate across a network. There are limited resources available to any given machine and far more resources available across multiple machines.
Note
Jeff Bezos mandated in the early 2000s that Amazon services must expose APIs over the network. This is credited as transforming Amazon from a simple bookstore to the cloud behemoth that is AWS. This pattern is now embraced by tech companies everywhere, allowing teams to access data and innovate at an unprecedented rate.
A protocol is a standardized format for communicating between two parties. When communication happens without protocols involved, itâs inevitable that messages either wonât be interpreted correctly or wonât be understood at all. Itâs almost always better to adhere to an industry standard than to create a protocol from scratch. Itâs also better to embrace a smaller number of inter-service protocols within an organization to reduce the amount of implementation ...
Get Distributed Systems with Node.js now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.