Operations
An operation queries or updates the database state.
There are four operations available to clients:
create_accounts
: createAccount
screate_transfers
: createTransfer
slookup_accounts
: fetchAccount
s byid
lookup_transfers
: fetchTransfer
s byid
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 |