Skip to content

Durable Actors - explore actor framework integration #29

Description

@affandar

Overview

⚠️ The ideas here have not been vetted in detail yet. They are meant to get the creative juices flowing and serve as a starting point for deeper exploration.

Explore integrating duroxide with actor frameworks to create durable actors — actors with persistent state, reliable message delivery, and crash recovery semantics.

Why Durable Actors?

Traditional actor frameworks are in-memory:

  • Actor state is lost on crash
  • Messages in flight are lost
  • Supervision restarts actors from scratch
  • No replay of message history

Combining duroxide's durability with the actor model could provide:

  • Persistent state that survives crashes
  • Durable mailbox with exactly-once delivery
  • Replay recovery from message history
  • Durable supervision decisions

Concepts to Explore

Concept 1: Actor as Orchestration

  • Each actor is a long-running orchestration with continue_as_new
  • Messages via external events
  • Simple mapping to existing duroxide primitives

Concept 2: Actor System as Provider Extension

  • Extend provider with actor-specific operations (mailboxes, state storage)
  • Dedicated actor dispatcher

Concept 3: Hybrid Model

  • In-memory actor runtime for performance
  • Event sourcing to backing orchestration for durability
  • Checkpointing to avoid full replay

Concept 4: Virtual Actors (Orleans-style)

  • Actors addressable by ID, no explicit lifecycle
  • Activate on demand, deactivate after idle
  • Location transparent

Concept 5: Supervision Trees with Durable Recovery

  • Erlang/Akka-style supervision (OneForOne, OneForAll, RestForOne)
  • Supervision decisions recorded in history
  • Durable supervision tree structure

Recommended Starting Point

Start with Actor as Orchestration to prove the concept with minimal effort, then evolve based on learnings.

See: proposals/durable-actors.md

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    explorationExploratory ideas and concepts

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions