Skip to content

minimal & lock-free implementation of the actor model in Go

License

Notifications You must be signed in to change notification settings

solodynamo/go-actors

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Actors

Super lightweight implementation of the Actor Model in Go, inspired by frameworks like Akka in Scala. This library provides a simple and efficient way to build concurrent and distributed systems using the actor paradigm.

Features

What This Library Provides

  • Actor Model Basics:

    • Actors as independent units of computation.
    • Message-passing between actors for communication.
    • Asynchronous and non-blocking message processing.
  • Concurrency:

    • Each actor runs in its own goroutine, enabling high concurrency.
    • Actors process messages sequentially, ensuring thread-safe state management.
  • Supervision:

    • Parent actors can supervise child actors.
    • If a child actor panics, the parent actor is notified and can take appropriate action.
  • Lifecycle Hooks:

    • preStart and postStop hooks for custom initialization and cleanup logic.
  • Child Actor Management:

    • Actors can spawn child actors dynamically.
    • Parent actors manage the lifecycle of their children.
  • Simple API:

    • Easy-to-use API for creating actors, sending messages, and managing their lifecycle.

What This Library Does Not Provide (Compared to Akka in Scala)

  • Distributed Actors:

    • This library does not support distributed actors (actors running on different machines). Akka provides built-in support for clustering and remote actors.
  • Persistence:

    • There is no built-in support for actor state persistence. Akka provides Akka Persistence for saving and recovering actor state.
  • Advanced Routing:

    • This library does not include advanced message routing strategies (e.g., round-robin, consistent hashing) like Akka's Router feature.
  • Event Sourcing:

    • No support for event sourcing, which is a key feature of Akka Persistence.
  • Streams:

    • Akka Streams provide a powerful API for stream processing. This library does not include any streaming capabilities.
  • Advanced Supervision Strategies:

    • Akka allows defining custom supervision strategies (e.g., OneForOneStrategy, AllForOneStrategy). This library provides basic supervision but lacks advanced strategies.
  • Type Safety:

    • Akka leverages Scala's type system for type-safe messaging. This library uses interface{} for messages, which lacks type safety.
  • Backpressure Handling:

    • Akka Streams and Actors provide backpressure handling. This library does not handle backpressure explicitly.

Getting Started

TBD

Installation

go get github.com/solodynamo/go-actors

About

minimal & lock-free implementation of the actor model in Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages