Today, stateful serverless functions are chained together through a message-based infrastructure and store their durable state in a separate database. This separation between storage and compute creates serious challenges that may lead to inconsistency and application crashes.
A unified consistency model for message passing and shared memory is required to avoid such errors. The model should ensure that multiple pieces of data remain mutually consistent whether data is sent using messages or shared in a distributed memory.
Based on a well-known message-based model (actors) and a state model (transactional shared memory), we propose a unified communication and persistence model called Transactional Turn Causal consistency (TTCC). TTCC is asynchronous, preserve isolation, and ensures that the message and memory view are mutually causally consistent.