Manager and management method for distributed transaction under microservice architecture
A distributed transaction and management method technology, applied in the field of distributed transaction manager and management, can solve the problems of resource waste, performance loss, business logic implementation inconvenience, etc., to achieve the effect of convenient use, avoiding resource waste and performance loss
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0029] refer to figure 1 , Embodiment 1 discloses a distributed transaction manager under a microservice architecture. The transaction manager in this embodiment can integrate Springcloud and Dubbo microservice frameworks to provide distributed transaction management for application development in a cloud environment.
[0030] Specifically, the transaction manager in this embodiment includes a remote interceptor, a service interceptor, and a cache. The remote interceptor is started every time the service is called remotely, and the intercepted information is stored in the cache. The business interceptor starts once each time the service is called, and stores the intercepted information in the cache. The cache can use cache databases such as redis, memcached, or mongodb.
[0031] First, when the business activity starts, the transaction manager intercepts it with its internal business interceptor, generates a transaction context, and stores it in the cache. Transaction conte...
Embodiment 2
[0036] refer to figure 2 , the transaction management method provided by the embodiment mainly includes:
[0037] S100. When a business activity starts, use a business interceptor to intercept, generate a transaction context, and store it in a cache.
[0038] The cache can use cache databases such as redis, memcached, or mongodb. Transaction context includes global transaction id, JVM identifier, persistent historical data status, current transaction status, etc.
[0039] S200. Determine the type of the called service according to the type of the service calling method. If the called service is the main service, create a transaction, use the action of calling the main service as the root of the service call tree, update the transaction context in the cache, and perform the main service When a business exception occurs, the business logic is invoked to perform transaction compensation according to the historical state in the transaction context, and submit the transaction. I...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com