Skip to content

Commit

Permalink
Describe side effects in protocol (#84)
Browse files Browse the repository at this point in the history
  • Loading branch information
slinkydeveloper authored Apr 15, 2024
1 parent 29b28f9 commit d43de04
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions service-invocation-protocol.md
Original file line number Diff line number Diff line change
Expand Up @@ -405,3 +405,15 @@ A possible implementation could be the following. Given a user requests a state

In order for the aforementioned algorithm to work, set, clear and clear all state operations must be reflected on the
local `state_map` as well.

### Side effect/Run

The side effect/run feature allows users to execute arbitrary non-deterministic code within their service and record the
result, such that on re-executions the stored value will be used instead of replaying the given code.

SDKs MAY implement the side effect feature by storing the result using a custom entry message, as described in
[Custom entry](#custom-entry-messages). By convention, the SDKs SHOULD use the entry type `FC01` for side effects.

When storing side effects, SDKs MAY need to wait for the
[acknowledgment of the stored entry](#acknowledgment-of-stored-entries) before continuing the execution of the
invocation.

0 comments on commit d43de04

Please sign in to comment.