Beldi
Beldi is a research library and runtime that combines replay-safe storage operations with optional transactions across stateful serverless functions.
Replay: Stable instance IDs and operation steps identify prior work. Logged read results are reused; nondeterministic application values must also be recorded. The intent collector restarts unfinished invocations. The contract concerns equivalent effects, not executing function code only once. [1]
Storage: The linked data-and-log structure places a write and its deduplication record in one atomicity scope. A read and its logging need not be atomic. The paper's synchronous invocation callbacks save the result at the caller before the callee marks completion. [1]
Transactions: The paper combines two-phase locking, wait-die and distributed commit to target opacity, including consistent observations by transactions that abort. Transactional state must not also be accessed outside the locking protocol. [1]
Cleanup: The paper assumes a maximum function-instance lifetime T. Its collector timestamps completed intents, waits T before recycling their logs, and retains disconnected rows for another T before deletion. This safety bound differs from the garbage collector's trigger interval. [1]
Implementation: At the pinned revision, PrepareEnv generates an ID when none is supplied. In the non-baseline path, SyncInvoke logs the callee ID under the caller's instance and step; Wrapper stores the callee's result in the caller's log before marking the callee done. Retrying a top-level request without preserving its identity is not the same logged invocation. [2]
Relations
- related
- Boki, Retry deduplication, Two-phase locking, Opacity
Limitations
- The design requires strongly consistent, fault-tolerant storage with atomic updates and filtered, projected scans; an unavailable backing store can block progress. [1]
- The transaction API excludes asynchronous invocations and independently abortable nested transactions. [1]
- Replay safety covers participating operations and preserved identities, not arbitrary external effects or re-execution after the required history has been reclaimed. [1]
Citations
- Zhang et al. Fault-tolerant and transactional stateful serverless workflows. OSDI 2020, pp. 1187-1204, sections 2.2-6.2 and 7.5-8.
- Beldi controlflow.go: PrepareEnv, SyncInvoke and Wrapper; revision 91280e1cfcadb5343c8d9320e0942414c06ce706.
Sources & caveats
- Primary-source synthesis of OSDI 2020 sections 2.2-6.2 and 7.5-8 plus pinned control-flow code; no cloud workload, failure experiment or benchmark replication was run.
- The 2023 repository revision is not assumed identical to the 2020 paper: the paper describes callbacks, while Wrapper directly updates the caller log in this code. [1] [2]