Table of Contents |
---|
...
Microservices Application Pattern
Please see the example applications developed by Chris Richardson. These examples on Github illustrate various aspects of the microservice architecture.
Resulting Context
Benefits
...
- 2 parties complete an atomic swap of asset 1 for asset 2 without risk
- contract config defines terms of the swap
- if swap can't meet completion criteria, swap transaction is reversed for all parties returning initial states for each
- optionally, a 3rd party notary service may need to approve the transaction
- optionally, a 3rd party observer service may record the transaction
- optionally, the 2 parties may be on different networks
model
a chain manager ( on a chain ) for other chain transactions ?? ( or a configurable chain model ? )
specific validators only for that transaction type and parties are active
- define multi-step transaction types
- create transaction instance using the shared transaction manager with workflow from the contract config for that transaction type
- each transaction has a unique ID
- set the parties who validate the transaction on each ledger
- contract takes control over both assets from each party using locks and confirms locks ( if funds or asset limited, policy may allow partial transactions )
- after each step, the contract instance is updated for both parties and confirmed
- signatures and consents required by all parties for each step
- state changes are validated as complete on each ledger for the current step before moving to next step - 100% endorsement of each update by relevant parties
- if completion criteria for a step not fulfilled by X time, the transaction is cancelled and all parties are restored to initial states
- completion messages recorded and events published on success or failure of the transaction
context
assume 2 different orgs on 2 different blockchains on 2 different platforms want to execute a sale using an order (any type of asset )
a blockchain with 2 parties as nodes each running a ledger copy and a contract
blockchains implement escrow transaction interface services in a smart contract
...