Does software make jokes?
How do they talk to each other?? Do androids dream of electric sheep?
In my previous post, I talked about the different types of software.
And well…as I was typing/editing/and all the stuff, I realized….all these software….they’re working together right?
But how??
How do they communicate?
How do they talk to each other?
Communication mechanisms and protocols
Well, just as we, humans, communicate in various ways (talking, writing, sign language, touch) and adapt depending on who, what, and where, software has its own methods of communication.
These methods can be categorized based on the mechanism and purpose of the communication.
To make it easier to grasp, let’s imagine building a city and all the infrastructure needed (SimCity anyone? Caesar? yes, I know, I’m old school)
Here is an overview of the main types (or at least the most relevant ones to start with):
Now, imagine your city.
Many elements need to communicate and interact to keep everything running smoothly. (If you ever had a riot in Caesar, you know what I mean)
Inter-Process Communication (IPC):
Pipes: These are water (data) pipes, channeling water directly from the treatment plant to individual homes. They provide a direct path for data to flow.
Sockets: These are telephone lines, allowing people in different buildings to talk to each other over a network.
Message Queues: The city's postal service where messages are sent to a central post office, sorted, and then delivered to recipients in the right order.
Remote Procedure Calls (RPC):
JSON-RPC: Picture a city's emergency services, where you can call a central number, describe your problem in a common format (JSON), and get the appropriate help sent to you.
XML-RPC: Similar to JSON but using a different language (XML), like calling for help using a radio dispatch service.
Web Services:
REST: The city’s public bus system, where buses (HTTP methods) follow established routes (URLs) to transport people (data) to various destinations.
SOAP: Think of this as a formal courier service that ensures all packages (messages) are securely wrapped and delivered with detailed documentation.
APIs:
Web APIs: Like city information kiosks, providing visitors with information and services over the web.
Local APIs: Like help desks in large buildings, offering assistance and services locally.
Message Brokers and Queues:
RabbitMQ: A central message board, where people can post messages (tasks) and others can pick them up and act on them.
Apache Kafka:The city’s newspaper delivery system, distributing real-time news to subscribers efficiently.
Network Protocols:
HTTP/HTTPS: Roads! Providing paths for cars (data) to travel.
FTP: Freight train network, used for transferring large quantities of goods (data) between distant locations.
And for the final view:
(Yes, I had to. That game is just epic)
Each method has its use cases, advantages, and trade-offs.
The choice of communication method depends on factors like performance, scalability, security, and the specific needs of the software systems involved.
There you have it, how software communicates with software.
Of course this is a high-level overview and may even be somewhat oversimplified.
Bear with me, this is just the start.
Thank you for reading!
Adeline.
The rabbit hole:
A great great deep dive about APIs:
I went back and forth for the next one. There’s a lot in there, and I would say it is not beginner friendly.
But so so interesting!
Communication_protocol - Types
The serendipity trap:
How hardware understands software.
These 2 threads will get you a good start:
GraphQL will have its own time in the spotlight, just now right now 😜
Ah ah yes!
I always go back and forth between what to keep and what to trim down.
Thank you for the call out!