Skip to content

Commit 293bb2e

Browse files
committed
Setup Devops content
1 parent 8b5c20c commit 293bb2e

6 files changed

Lines changed: 2455 additions & 16 deletions

File tree

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
logseq/
2-
journals/
3-
futuremake.txt
2+
journals/

pages/Api.md

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ displayTitle: API Development
1111
- # Architecture & Communication Flow
1212
collapsed:: true
1313
- ## Client-Server Sequence
14+
collapsed:: true
1415
- ```mermaid
1516
sequenceDiagram
1617
autonumber
@@ -31,6 +32,7 @@ displayTitle: API Development
3132
```
3233
-
3334
- ## API Styles Comparison
35+
collapsed:: true
3436
- | Feature | REST | SOAP | GraphQL | gRPC |
3537
|---|---|---|---|---|
3638
| **Protocol** | HTTP / HTTPS | HTTP, SMTP, TCP, etc. | HTTP / HTTPS | HTTP/2 |
@@ -39,7 +41,7 @@ displayTitle: API Development
3941
| **Operations** | CRUD via HTTP Methods | Remote Procedure Call (RPC) | Query, Mutation, Subscription | Remote Procedure Calls |
4042
| **Speed & Size** | Medium / Large (JSON text) | Heavy (verbose XML overhead) | Medium (Client-selected payload) | Extremely fast (packed binary) |
4143
| **Use Case** | General Web APIs, CRUD | Enterprise integrations, banking | Complex web frontends, mobile | Microservices communication |
42-
44+
-
4345
- # RESTful API Design Principles
4446
collapsed:: true
4547
- **REST (Representational State Transfer)** is an architectural style designed by Roy Fielding in 2000. For an API to be considered RESTful, it must adhere to these core constraints:
@@ -50,10 +52,11 @@ displayTitle: API Development
5052
- 3. **Cacheability**: Responses must declare themselves as cacheable or non-cacheable to improve performance.
5153
- 4. **Layered System**: The client cannot tell whether it is connected directly to the end server or to an intermediate (e.g., load balancer, gateway).
5254
- 5. **Uniform Interface**: Resources are identified by URIs. Interaction with resources is performed using standard representations (e.g., JSON) and HTTP methods.
53-
55+
-
5456
- # HTTP Methods & Status Codes
5557
collapsed:: true
5658
- ## HTTP Request Methods
59+
collapsed:: true
5760
- | Method | Purpose | Safe | Idempotent | Description |
5861
|---|---|---|---|---|
5962
| **`GET`** | Retrieve resource | Yes | Yes | Fetches data from server. Should never modify data. |
@@ -63,6 +66,7 @@ displayTitle: API Development
6366
| **`DELETE`** | Remove resource | No | Yes | Deletes the specified resource. |
6467
-
6568
- ## Standard HTTP Status Codes
69+
collapsed:: true
6670
- ### 🟢 2xx Success
6771
collapsed:: true
6872
- `200 OK`: Request succeeded. Response body contains the fetched data.
@@ -84,24 +88,26 @@ displayTitle: API Development
8488
- `500 Internal Server Error`: Generic fallback for unexpected backend crashes.
8589
- `502 Bad Gateway`: Server acting as a gateway received an invalid response from upstream.
8690
- `503 Service Unavailable`: Server is overloaded or down for maintenance.
87-
91+
-
8892
- # API Security & Traffic Control
8993
collapsed:: true
9094
- ## Authentication & Authorization
95+
collapsed:: true
9196
- **API Keys**: Simple tokens sent in request headers or queries. Easy to implement but lack security granularity and expiration dates.
9297
- **JWT (JSON Web Token)**: Cryptographically signed tokens encoding user details and claims. Stateless, allowing servers to verify identity without database queries.
9398
- **OAuth 2.0**: The industry-standard authorization framework. Utilizes access tokens, refresh tokens, and authentication servers to grant restricted access to third-party clients.
9499
-
95100
- ## Traffic Management
101+
collapsed:: true
96102
- **Rate Limiting & Throttling**: Restricting the number of requests a client can make in a given timeframe (e.g., 60 requests/minute). Solves Denial of Service (DoS) attacks and ensures fair usage. Response headers typically include:
97-
- `X-RateLimit-Limit`: Maximum requests allowed.
98-
- `X-RateLimit-Remaining`: Remaining request count in current window.
99-
- `X-RateLimit-Reset`: Time when the limit window resets.
103+
- `X-RateLimit-Limit`: Maximum requests allowed.
104+
- `X-RateLimit-Remaining`: Remaining request count in current window.
105+
- `X-RateLimit-Reset`: Time when the limit window resets.
100106
- **Caching**: Storing API responses in cache layers (e.g., Redis or CDN) to reduce database load. Managed using HTTP headers:
101-
- `Cache-Control: max-age=3600`
102-
- `ETag`: Token identifying the version of the resource.
107+
- `Cache-Control: max-age=3600`
108+
- `ETag`: Token identifying the version of the resource.
103109
- **Webhooks**: Event-driven API patterns where the server pushes real-time data to a client's pre-configured URL endpoint upon event triggers.
104-
110+
-
105111
- # Consuming APIs (Code Examples)
106112
collapsed:: true
107113
- :::code-tabs
@@ -308,7 +314,7 @@ displayTitle: API Development
308314
```
309315
310316
:::
311-
317+
-
312318
- # API Backend Frameworks
313319
collapsed:: true
314320
- | Framework | Language | Architecture Style | Pros | Cons |
@@ -318,7 +324,7 @@ displayTitle: API Development
318324
| **Spring Boot**| Java | REST, SOAP, GraphQL | Enterprise-ready, dependency injection, robust security framework, highly scalable. | Heavy runtime footprint, steep learning curve. |
319325
| **ASP.NET Core**| C# | REST, gRPC | Blazing fast execution, strongly typed, excellent dependency injection support. | Relies heavily on Microsoft's .NET ecosystem. |
320326
| **Flask** | Python | REST | Extremely simple, lightweight microframework, perfect for tiny backends/prototypes. | Lacks native async features, requires extensions for enterprise use. |
321-
327+
-
322328
- # Learning References
323329
collapsed:: true
324330
- ## Documentation & Guidelines

0 commit comments

Comments
 (0)