mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-08-21 08:26:16 +00:00
docs: updates to several patterns
This commit is contained in:
@@ -24,7 +24,7 @@ The API Gateway design pattern aims to provide a unified interface to a set of m
|
||||
|
||||
## Explanation
|
||||
|
||||
Real world example
|
||||
Real-world example
|
||||
|
||||
> In a large e-commerce platform, an API Gateway is used as the single entry point for all client requests. When a user visits the site or uses the mobile app, their requests for product information, user authentication, order processing, and payment are all routed through the API Gateway. The gateway handles tasks such as user authentication, rate limiting to prevent abuse, and logging for monitoring purposes. This setup simplifies the client interface and ensures that all backend microservices, like the product catalog service, user service, order service, and payment service, can evolve independently without affecting the client directly. This also enhances security by providing a centralized point to enforce policies and monitor traffic.
|
||||
|
||||
@@ -125,10 +125,6 @@ public class ApiGateway {
|
||||
}
|
||||
```
|
||||
|
||||
## Class diagram
|
||||
|
||||

|
||||
|
||||
## Applicability
|
||||
|
||||
* When building a microservices architecture, and there's a need to abstract the complexity of microservices from the client.
|
||||
|
||||
Reference in New Issue
Block a user