Skip to content

Commit

Permalink
馃摝 NEW: changes
Browse files Browse the repository at this point in the history
  • Loading branch information
thatbeautifuldream committed May 1, 2023
1 parent d1a1ce2 commit cb1e88e
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,37 @@
- `Server` - any system that provides a service to a client is considered as a Server. Here a system which is providing a service to a client is a server. So a database is a server, a python program is a server, a process is a server, a browser is a server, a mobile phone is a server. So any system which is providing a service to a client is a server.

```mermaid
graph TD
A[Client] -->|tcp_123| B(Load Balancer)
B -->|tcp_456| C[Server1]
B -->|tcp_456| D[Server2]
graph LR
A[Client] -->|request| B[Server]
B -->|response| A
```

- Simmilarly with `databases` just installing database application on system wont do the job, you need to boot up the database server inorder to provide a service to the program requesting for data.

```mermaid
graph LR
A[Client] -->|request| B[Server]
B -->|request| C[Database]
C -->|response| B
B -->|response| A
```

- For example lets take MongoDB, we have the application MongoDB Compass Application (just a GUI for you to interact with the db) which we can boot up and connect to the respective database server and then we can perform CRUD operations on the database. So the MongoDB Compass Application is a client, the MongoDB database server is a server and the MongoDB database is a database.

```mermaid
graph LR
A[MongoDB Compass Application] -->|request| B[MongoDB Database Server]
B -->|request| C[MongoDB Database]
C -->|response| B
B -->|response| A
```

- Generally the mongodb server uri looks like `mongodb://localhost:27017` , here mongodb is the protocol, localhost is the loopback host (127.0.0.1), 27017 is the port.
- Now you may create a python program which can connect to the mongodb server and perform CRUD operations on the database. This illustrates a point that client can be anything irrespective of them having a GUI or not. Here the python program is a client, the mongodb server is a server and the mongodb database is a database.
- Client can be anything that requests for service, its a general programming term.
- Now talking about Servers, Even a mongodb application will not work untill unless you boot up the database server. Now this process can be running in the system background and you may not even know about it. It remains on until the system is on and whenever you make a query to the database it will process all queries and spit out the response accordingly to the client.
- Now this communication may happen over any medium, lets say it can happen over HTTP (Application layer protocol) or HTTPS that depends over TCP (Transport Layer Protocol) or UDP or any other protocol. So the client and server can communicate over any protocol.
- Detailed Explanation : The TCP may involve the three way handshake and then the client and server may communicate over HTTP or HTTPS or any other protocol.

- `R.E.S.T.` is a architectural style for designing networked applications. More commonly it is used to describe the way web services communicate over HTTP.
- `R.E.S.T.` stands for `Representational State Transfer`, which does not self explain that much, but it is a architectural style for designing networked applications.
- Changes
Binary file not shown.

0 comments on commit cb1e88e

Please sign in to comment.