-
Notifications
You must be signed in to change notification settings - Fork 61
Core Application Logic
Wuyi Chen edited this page Jun 25, 2019
·
7 revisions
-
When a client makes a call to the licensing service for getting a license record associated with the organization record:
- If the client type is "feign", the licensing service will make a call to organization service for retrieving the organization record directly.
- If the client type is "discovery", the licensing service will make a call to organization service for retrieving the organization record directly.
- If the client type is "rest":
- Check Redis to see the matched organization record already cached or not:
- If it cached, retrieve the matched record from Redis directly.
- If it is not cached:
- Make a call to the organization service to retrieve the matched organization record.
- Cache the matched organization record into Redis.
- Check Redis to see the matched organization record already cached or not:
-
When the licensing service gets a new message from the Kafka message queue:
- Delete the organization record cached in Redis by the organization ID (because of a client updated an organization record, so the corresponding organization record cached in Redis is out of date. We need to delete that record from Redis so that the licensing service will get the organization record next time).
-
When a client makes a call to the organization service for modifying (add, update or delete) an organization record:
- Insert a new message into the Kafka message queue to notify the licensing service that there is an update for the organization record.
- There are 2 types of records:
- License
- Organization
- One or multiple licenses can belong to one organization.
- Overview
- Getting Started
-
Technical Essentials
- Autowired
- SpringData JPA
- Configuration File Auto-loading
- Configuration Encryption
- Service Discovery with Eureka
- Resiliency Patterns with Hystrix
- Configure Hystrix
- Service Gateway with Zuul
- Zuul Filters
- Protect Service with Spring Security and OAuth2
- Use JWT as Access Token
- Store Clients and Users' Credentials to DB
- Integrate with Message Queue (Kafka)
- Integrate with Redis
- Tune Logging
- Log Aggregation
- Send Trace to Zipkin
- Build Runnable Jar
- Core Application Logic
- Components