Operations
An operation queries or updates the database state.
There are six operations available to clients:
create_accounts
: createAccount
screate_transfers
: createTransfer
slookup_accounts
: fetchAccount
s byid
lookup_transfers
: fetchTransfer
s byid
get_account_transfers
: fetchTransfer
s bydebit_account_id
orcredit_account_id
get_account_balances
: fetch the historical account balance by theAccount
'sid
.
Events and Results
Each operation has a corresponding event and result type.
- The client sends events to the cluster.
- The client receives results from the cluster (1:1 for each event sent).
- Events and results for the same operation are batched for throughput.
- A batch of an operation's events is called a request.
- A batch of an operation's results is called a reply.
Client implementations provide an API for sending batched events and decoding the corresponding batched results.
Operation | Event | Result |
---|---|---|
create_accounts | Account | CreateAccountResult |
create_transfers | Transfer | CreateTransferResult |
lookup_accounts | Account.id | Account or nothing |
lookup_transfers | Transfer.id | Transfer or nothing |
get_account_transfers | AccountFilter | Transfer or nothing |
get_account_balances | AccountFilter | AccountBalance or nothing |