As we said, there are 5 ways for systems (services) to communicate with each other:
- via IP;
- accessing a common DB;
- via API (SOAP/REST);
- via ESB;
- using message brokers (RebbitMQ/Kafka).
If anyone knows any other implicit ways, I'll be glad to hear them in the comments! Just no repetitions.
The first 2 are very simple, because they use existing technologies, without using additional connecting software. If you still have difficulties, I recommend reading: Olifer "Computer networks".
We have discussed the API in detail in two previous articles.
ESB will be considered now, as well as brokers. I don't like the latter very much, because it's useful only in complex architectural solutions, and they are shoved everywhere. I think that the value from them is 0.
Let's ride!
{
"shell_port": 28917,
"iopub_port": 28918,
"stdin_port": 28919,
"control_port": 28921,
"hb_port": 28920,
"ip": "127.0.0.1",
"transport": "tcp",
"signature_scheme": "hmac-sha256",
"kernel_name": ""
}
The little JSON tells us how the connection will be made when Jupyter Notebook starts. TCP is a popular protocol that the data bus uses and brokers receive their messages. And different ports indicate where to take/add data when connecting.
The data bus is like a mini-restaurant. Where there is a cook who gives orders, and there are guests who initiate these orders. The cook is the master system, the guests are slaves.
Brokers in turn put a waiter between them, who creates a queue of orders. He gives the oldest ones to the cook and accepts the newest ones from the guests.
In an ideal world, we would strive for fast food where the waiter position is abolished!
{
"base_url": "/",
"hostname": "localhost",
"notebook_dir": "/home/sage",
"password": false,
"pid": 281,
"port": 8888,
"secure": false,
"sock": "",
"url": "http://localhost:8888/"
}
While making our way to the database, among other things, let's not forget to specify its location on the host (in this case, localhost).
Using tokens and security keys, you can secure the connection, where each such message will have a parameter added that will authenticate you in the system.
Top comments (0)