thunguo opened a new issue, #91:
URL: https://github.com/apache/incubator-seata-go-samples/issues/91

   ## Scenario
   
   A user transfers money from Account A to Account B. The two accounts live in 
   separate MySQL databases, simulating two independent banks.
   
   - **bank-a-service** — deducts balance from db_bank_a
   - **bank-b-service** — adds balance to db_bank_b
   
   The debit and credit must be atomic across two databases. A partial result 
   (money deducted but not credited, or vice versa) must never occur.
   
   ## What to implement
   
   A transfer-service initiates the global transaction and calls both bank 
services 
   via HTTP. Each bank service connects to its own MySQL database using 
seata-go's 
   XA driver. Seata coordinates the two-phase commit across both databases.
   
   Include a failure simulation where bank-b-service rejects the credit (e.g., 
   target account is frozen), and demonstrate that the deduction on bank-a is 
   automatically rolled back via XA protocol.
   
   ## Deliverables
   
   - Three runnable Go services (transfer + two banks)
   - docker-compose with two separate MySQL instances and Seata server
   - README explaining the scenario, XA two-phase flow, and how to run


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to