Skip to content

Commit f0b6d44

Browse files
committed
update writing styles on arbitrary notes
1 parent ad0d790 commit f0b6d44

File tree

343 files changed

+6025
-6004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+6025
-6004
lines changed

Diff for: docs/backend-system/01-web-server/web-server.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ title: Web Server
55
description: Web Server
66
---
77

8-
**Main Source :**
8+
**Main Source:**
99

10-
- **[What is a web server? - MDN](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_web_server)**
11-
- **[Apache vs NGINX - IBM Technology](https://youtu.be/9nyiY-psbMs?si=awdYABj62-vySNKk)**
10+
- **[What is a web server? MDN](https://developer.mozilla.org/en-US/docs/Learn/Common_questions/Web_mechanics/What_is_a_web_server)**
11+
- **[Apache vs NGINX IBM Technology](https://youtu.be/9nyiY-psbMs?si=awdYABj62-vySNKk)**
1212

1313
When we attempt to access a website using a [web browser](/internet-and-web/web-browser), the browser initiates communication by sending a message to a [server](/computer-networking/server) through an [HTTP request](/computer-networking/http-https).
1414

@@ -25,13 +25,13 @@ A static web server will deliver static content, these are simple web pages whic
2525
Dynamic web server, on the other hand, will deliver dynamic content. These content can change based on user input, and the server will generate content on-the-fly.
2626

2727
![Comparison between static and dynamic web server](./static-dynamic-web-server.png)
28-
Source : https://about.gitlab.com/blog/2016/06/03/ssg-overview-gitlab-pages-part-1-dynamic-x-static/
28+
Source: https://about.gitlab.com/blog/2016/06/03/ssg-overview-gitlab-pages-part-1-dynamic-x-static/
2929

3030
#### Web Server Feature
3131

32-
The previous explanation explain about a simple web server, in reality a web server is provided with much more complex feature. Some of them are :
32+
The previous explanation explain about a simple web server, in reality a web server is provided with much more complex feature. Some of them are:
3333

34-
- **[Reverse Proxy](/computer-networking/proxy#reverse-proxy)** : A technique which forwards client requests to the appropriate backend servers on behalf of the clients. This is useful for [load balancing](/computer-networking/server#server-optimization) and improving security by hiding the server's IP address.
35-
- **[Other server optimization technique](/computer-networking/server#server-optimization)** : Other technique such as caching, CDN, and load balancing.
34+
- **[Reverse Proxy](/computer-networking/proxy#reverse-proxy)**: A technique which forwards client requests to the appropriate backend servers on behalf of the clients. This is useful for [load balancing](/computer-networking/server#server-optimization) and improving security by hiding the server's IP address.
35+
- **[Other server optimization technique](/computer-networking/server#server-optimization)**: Other technique such as caching, CDN, and load balancing.
3636

3737
Most popular example of web server are Apache and NGINX. Apache follows a process-based model where each incoming request is handled by a separate process. Nginx uses an event-driven model, where a small number of processes can handle multiple connections simultaneously.

Diff for: docs/backend-system/02-apis-server-logic/apis-server-logic.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ title: APIs & Server Logic
55
description: APIs & Server Logic
66
---
77

8-
**Main Source :**
8+
**Main Source:**
99

10-
- **[APIs for Beginners 2023 - How to use an API (Full Course / Tutorial) - freeCodeCamp](https://youtu.be/WXsD0ZgxjRw?si=IJAjV5WMFpiaT8n0)**
11-
- **[What Is Middleware? - AWS](https://aws.amazon.com/what-is/middleware/)**
12-
- **[What is API Gateway? - ByteByteGo](https://youtu.be/6ULyxuHKxg8?si=NejEaVJLUUz8jH0x)**
10+
- **[APIs for Beginners 2023 - How to use an API (Full Course / Tutorial) freeCodeCamp](https://youtu.be/WXsD0ZgxjRw?si=IJAjV5WMFpiaT8n0)**
11+
- **[What Is Middleware? AWS](https://aws.amazon.com/what-is/middleware/)**
12+
- **[What is API Gateway? ByteByteGo](https://youtu.be/6ULyxuHKxg8?si=NejEaVJLUUz8jH0x)**
1313

1414
### What is API
1515

@@ -19,15 +19,15 @@ While making a program, we often interact with other software component (functio
1919

2020
#### APIs Types
2121

22-
Some types of APIs are :
22+
Some types of APIs are:
2323

24-
- **Library API** : Library is a collection of pre-written ready-to-use code, this includes function, classes, methods, constants, and other code components. Libraries are used to make programmers develop their application without needing to build everything from scratch. An example of library include graphics API like OpenGL that lets you render 2D or 3D computer graphics.
24+
- **Library API**: Library is a collection of pre-written ready-to-use code, this includes function, classes, methods, constants, and other code components. Libraries are used to make programmers develop their application without needing to build everything from scratch. An example of library include graphics API like OpenGL that lets you render 2D or 3D computer graphics.
2525

26-
- **OS API** : Operating system APIs is considered as low-level API, this includes accessing necessary function or classes that interact directly with OS component such as file system, memory management, task manager, process management, and etc. Example of OS level API can be a class that access internal storage in Android OS.
26+
- **OS API**: Operating system APIs is considered as low-level API, this includes accessing necessary function or classes that interact directly with OS component such as file system, memory management, task manager, process management, and etc. Example of OS level API can be a class that access internal storage in Android OS.
2727

28-
- **Web API** : Web API is an API accessed over the internet using protocols like [HTTP](/computer-networking/http-https#http). Web APIs can be used if the code we are interacting to is stored on the internet. Common Web APIs include Google Maps API that let you know about geolocation information, Spotify API that allows developers to search for songs, albums, and artists, retrieve user playlists.
28+
- **Web API**: Web API is an API accessed over the internet using protocols like [HTTP](/computer-networking/http-https#http). Web APIs can be used if the code we are interacting to is stored on the internet. Common Web APIs include Google Maps API that let you know about geolocation information, Spotify API that allows developers to search for songs, albums, and artists, retrieve user playlists.
2929

30-
Here is an example of API in Kotlin :
30+
Here is an example of API in Kotlin:
3131

3232
```kotlin
3333
logOutput("Calling an API")
@@ -43,7 +43,7 @@ val logs = mutableListOf<String>()
4343
fun logOutput(out: String) {
4444
val currentTime = LocalTime.now()
4545
logs.add(out)
46-
println("Log : $out - at $currentTime")
46+
println("Log: $out - at $currentTime")
4747
}
4848
```
4949

@@ -66,7 +66,7 @@ The website provides some endpoint including `/posts`, `/comments`, `/albums`, a
6666
Overall, routing and endpoint determines how the server should respond to different requests by mapping them to specific endpoints or routes. The behavior of accessing specific endpoints will depend on the web API.
6767

6868
![Endpoint example](./endpoint.png)
69-
Source : https://apipheny.io/api-endpoint/
69+
Source: https://apipheny.io/api-endpoint/
7070

7171
### Middleware
7272

@@ -75,29 +75,29 @@ In backend, **Middleware** is a software that bridges between application and se
7575
The purpose of middleware is to pre-process incoming request before passing it into server to make the server can focus only on the actual logic. For example, middleware in the context of backend can be used check if user has logged in or not, checking for cookies (file that stores basic user information), add additional data or configuration, and handling request error.
7676

7777
![Middleware that acts as a bridge between application and server](./middleware.png)
78-
Source : https://medium.com/@seymarslan/what-ismiddleware-fdb2ad163388
78+
Source: https://medium.com/@seymarslan/what-ismiddleware-fdb2ad163388
7979

8080
### API Gateway
8181

8282
Middleware general definition is a software that bridges between one system to another, an **API gateway** is a type of middleware focused to bridges between the client and the backend system. It is a centralized entry point to access the server, a unified interface for APIs consumer.
8383

84-
An API gateway may provide some functionality including :
84+
An API gateway may provide some functionality including:
8585

86-
- **Routing & Endpoint Management** : API gateway handles the routing of requests to the appropriate backend services based on predefined rules. It manages the endpoints and exposes a unified interface for API consumers.
86+
- **Routing & Endpoint Management**: API gateway handles the routing of requests to the appropriate backend services based on predefined rules. It manages the endpoints and exposes a unified interface for API consumers.
8787

88-
- **Protocol Translation** : API Gateways can translate between different protocols. For example, it can handle requests in [RESTful](/backend-system/rest-api) format from clients and convert it into another format such as [GraphQL](/backend-system/graphql), [WebSockets](/backend-system/websocket), or another API protocol.
88+
- **Protocol Translation**: API Gateways can translate between different protocols. For example, it can handle requests in [RESTful](/backend-system/rest-api) format from clients and convert it into another format such as [GraphQL](/backend-system/graphql), [WebSockets](/backend-system/websocket), or another API protocol.
8989

90-
- **Security & Authentication** : API Gateways provide security mechanisms to protect APIs, they can handle [authentication](/backend-system/authentication) and [authorization](/backend-system/authorization).
90+
- **Security & Authentication**: API Gateways provide security mechanisms to protect APIs, they can handle [authentication](/backend-system/authentication) and [authorization](/backend-system/authorization).
9191

92-
- **Request & Response Modifier** : API Gateways can modify, validate, or transform requests and responses as they pass through, this can include validating or filtering requests.
92+
- **Request & Response Modifier**: API Gateways can modify, validate, or transform requests and responses as they pass through, this can include validating or filtering requests.
9393

94-
- **Rate Limiting** : API Gateways can limit the number of requests made by a client in a period of time.
94+
- **Rate Limiting**: API Gateways can limit the number of requests made by a client in a period of time.
9595

96-
- **Caching** : API Gateways may store its previous response from previous API request, this is called **caching**. If the further request requested the same data, the API gateway doesn't need to forward it to the server, instead it responds with the data stored in the cache.
96+
- **Caching**: API Gateways may store its previous response from previous API request, this is called **caching**. If the further request requested the same data, the API gateway doesn't need to forward it to the server, instead it responds with the data stored in the cache.
9797

98-
- **Monitoring & Analytics** : API Gateways may log or monitor incoming request, API usage and performance. This allows administrators to gain insights into the traffic patterns, identify potential issues, and make optimal decision for optimization problem.
98+
- **Monitoring & Analytics**: API Gateways may log or monitor incoming request, API usage and performance. This allows administrators to gain insights into the traffic patterns, identify potential issues, and make optimal decision for optimization problem.
9999

100-
- **Load Balancing** : Load balancing is the technique to distribute incoming request across multiple backend server to balance the load.
100+
- **Load Balancing**: Load balancing is the technique to distribute incoming request across multiple backend server to balance the load.
101101

102102
![API Gateway illustration](./api-gateway.png)
103-
Source : https://stackoverflow.com/questions/53477140/asp-net-core-api-gateway-middleware
103+
Source: https://stackoverflow.com/questions/53477140/asp-net-core-api-gateway-middleware

Diff for: docs/backend-system/03-rest-api/rest-api.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,25 @@ title: REST API
55
description: REST API
66
---
77

8-
**Main Source :**
8+
**Main Source:**
99

10-
- **[What Is A RESTful API? - AWS](https://aws.amazon.com/what-is/restful-api/)**
11-
- **[RESTful APIs in 100 Seconds - Fireship](https://youtu.be/-MTSQjw5DrM?si=mGOKWYNFT7H6yl_m)**
10+
- **[What Is A RESTful API? AWS](https://aws.amazon.com/what-is/restful-api/)**
11+
- **[RESTful APIs in 100 Seconds Fireship](https://youtu.be/-MTSQjw5DrM?si=mGOKWYNFT7H6yl_m)**
1212

1313
**Representational State Transfer API (REST API)** is an architectural style for designing an API.
1414
Web services that implement REST architecture are called RESTful web services.
1515

1616
REST works by leveraging or extending HTTP concepts. The underlying architecture of REST API follows the [HTTP protocol](/computer-networking/http-https#http) to perform specific types of operation such as accessing resource.
1717

18-
Every resource in the server are uniquely identified by Uniform Resource Identifiers (URI), basically a unique address. An example of URI : `file:///C:/Users/username/Documents/file.txt`, `https://www.example.com/index.html`. In the case of REST API, the URI used typically uses the concept of [routing and endpoint](/backend-system/apis-server-logic#routing--endpoint).
18+
Every resource in the server are uniquely identified by Uniform Resource Identifiers (URI), basically a unique address. An example of URI: `file:///C:/Users/username/Documents/file.txt`, `https://www.example.com/index.html`. In the case of REST API, the URI used typically uses the concept of [routing and endpoint](/backend-system/apis-server-logic#routing--endpoint).
1919

20-
REST includes another HTTP concepts like :
20+
REST includes another HTTP concepts like:
2121

22-
- **[HTTP methods](/computer-networking/http-https#http-request--method)** : Such as GET, POST, DELETE, PUT followed with the endpoint (e.g. GET /books).
23-
- **[HTTP format and syntax](/computer-networking/http-https#http-format--syntax)** : Including header, request line, request body, response format, and version.
24-
- **[HTTP Responses](/computer-networking/http-https#http-response)** : Codes to indicate the result of the response, for example, 200 OK signifies a successful response, 404 Not Found denotes that the requested resource does not exist.
22+
- **[HTTP methods](/computer-networking/http-https#http-request--method)**: Such as GET, POST, DELETE, PUT followed with the endpoint (e.g. GET /books).
23+
- **[HTTP format and syntax](/computer-networking/http-https#http-format--syntax)**: Including header, request line, request body, response format, and version.
24+
- **[HTTP Responses](/computer-networking/http-https#http-response)**: Codes to indicate the result of the response, for example, 200 OK signifies a successful response, 404 Not Found denotes that the requested resource does not exist.
2525

26-
Example of REST API GET request :
26+
Example of REST API GET request:
2727

2828
```
2929
GET /books HTTP/1.1

Diff for: docs/backend-system/04-soap/soap.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ title: SOAP
55
description: SOAP
66
---
77

8-
**Main Source : [Wikipedia SOAP](https://en.wikipedia.org/wiki/SOAP)**
8+
**Main Source:**
9+
10+
- **[SOAP — Wikipedia](https://en.wikipedia.org/wiki/SOAP)**
911

1012
**Simple Object Access Protocol (SOAP)** is a protocol to exchange information or message using [XML](/digital-media-processing/xml). It follows XML standard such as schema to define message in a structured way. Specifically, XML uses the WSDL (Web Services Description Language), a standard used for XML-based services on the web.
1113

1214
It still uses [HTTP](/computer-networking/http-https#http) as the transport protocol over the network. When SOAP messages are transmitted over HTTP, they are typically encapsulated within the payload of an HTTP request (POST) or response. The HTTP headers and body are used to transport the SOAP message between the client and the server.
1315

14-
Here is an example of SOAP request encapsulated in HTTP POST method :
16+
Here is an example of SOAP request encapsulated in HTTP POST method:
1517

1618
```xml
1719
POST /exampleWebService HTTP/1.1

Diff for: docs/backend-system/05-graphql/graphql.md

+14-14
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ title: GraphQL
55
description: GraphQL
66
---
77

8-
**Main Source :**
8+
**Main Source:**
99

10-
- **[GraphQL Explained in 100 Seconds - Fireship](https://youtu.be/eIQh02xuVw4?si=NZATScKXA3s8jYv9)**
11-
- **[What is GraphQL? GraphQL introduction - Apollo Blog](https://www.apollographql.com/blog/graphql/basics/what-is-graphql-introduction/)**
10+
- **[GraphQL Explained in 100 Seconds Fireship](https://youtu.be/eIQh02xuVw4?si=NZATScKXA3s8jYv9)**
11+
- **[What is GraphQL? GraphQL introduction Apollo Blog](https://www.apollographql.com/blog/graphql/basics/what-is-graphql-introduction/)**
1212

1313
**GraphQL** is a query language specifically designed for querying APIs data, GraphQL accesses resource on server in a similar way we query a database. Compared to [REST API](/backend-system/rest-api) that accesses resource in a fixed way (e.g., GET /books endpoint), GraphQL allows clients to request specific data from the server in a flexible way by defining the structure of the response they need.
1414

@@ -18,7 +18,7 @@ GraphQL typically uses [HTTP](/computer-networking/http-https#http) as the trans
1818

1919
We need to define schema, it serves as contract for the client and the server for querying and manipulating data.
2020

21-
Here is an example of schema in GraphQL :
21+
Here is an example of schema in GraphQL:
2222

2323
```graphql
2424
type User {
@@ -56,24 +56,24 @@ The type name and its field has no actual meaning, they are just random word. Th
5656

5757
### GraphQL Request
5858

59-
GraphQL consist of the following structure :
59+
GraphQL consist of the following structure:
6060

61-
1. **Operation Type** : GraphQL has 2 type of operation :
61+
1. **Operation Type**: GraphQL has 2 type of operation:
6262

63-
- **Query** : Request data from a server (read operation)
64-
- **Mutation** : Modify data on the server such as create, update, or delete (write operation)
63+
- **Query**: Request data from a server (read operation)
64+
- **Mutation**: Modify data on the server such as create, update, or delete (write operation)
6565

66-
2. **Operation Name (optional)** : Text specified to describe the action.
66+
2. **Operation Name (optional)**: Text specified to describe the action.
6767

68-
3. **Variables (optional)** : We can include our variable and it will be defined with `$`
68+
3. **Variables (optional)**: We can include our variable and it will be defined with `$`
6969

70-
4. **Query Fields** : The main part of a GraphQL request, these fields represent the data that the client wants to retrieve from the server. The client can specify the fields it needs, including nested fields and relationships which mean the data are related.
70+
4. **Query Fields**: The main part of a GraphQL request, these fields represent the data that the client wants to retrieve from the server. The client can specify the fields it needs, including nested fields and relationships which mean the data are related.
7171

72-
5. **Arguments (optional)** : Arguments are used to filter or provide additional information to the server to customize the response. Arguments are passed using the variable we defined before.
72+
5. **Arguments (optional)**: Arguments are used to filter or provide additional information to the server to customize the response. Arguments are passed using the variable we defined before.
7373

74-
6. **Directive (optional)** : Directives enable clients to modify the execution behavior of a GraphQL query. They provide additional instructions to the server about how to handle certain parts of the query. Directive can only modify functionality of an operation compared to argument that capable of modifying the data received.
74+
6. **Directive (optional)**: Directives enable clients to modify the execution behavior of a GraphQL query. They provide additional instructions to the server about how to handle certain parts of the query. Directive can only modify functionality of an operation compared to argument that capable of modifying the data received.
7575

76-
Here is an example of a GraphQL query (different from the schema above) :
76+
Here is an example of a GraphQL query (different from the schema above):
7777

7878
```graphql
7979
query ($userId: ID!, $withPosts: Boolean!) {

0 commit comments

Comments
 (0)