docs

Context

protoactor docs
Context Proto.Actor provides two forms of Context, a RootContext and an ActorContext. These contexts are composed from various functionality provided by distinct facets. Both types of context implement Spawner, Stopper, Info and Sender facets, while the ActorContext implements additional facets. Root Context Facets Spawner Stopper Info Sender Actor Context Facets Spawner Stopper Info Sender Receiver Invoker Supervisor Context Facets Spawner Implemented by RootContext, ActorContext Read more...

Local Affinity Placement

protoactor docs
Local Affinity Virtual Actors with locality to Kafka consumer Local Affinity placement enables us to place virtual actors in the locality to some other resource. In this example, we place the virtual actors close to an Apache Kafka consumer. The actors on the same cluster member, will only be actors that consume messages from the partitions of this specific Kafka consumer. Scale up or down In case there is a scale up or down scenario, some of these actors will now be on the original node where they first spawned. Read more...

Actors

protoactor docs
Actors An actor is a container for State, Behavior, a Mailbox, Children and a Supervisor Strategy. All of this is encapsulated behind a process ID (PID). PID - Process ID As detailed below, an actor object needs to be shielded from the outside in order to benefit from the actor model. Therefore, actors are represented to the outside using PID’s, which are objects that can be passed around freely and without restriction. Read more...

Books

protoactor docs
Related material Manning Publications Co. Akka in action Functional and Reactive Domain Modeling Functional Reactive Programming Reactive Application Development Reactive Design Patterns

Design Principles

protoactor docs
Design principles Proto.Actor was born in the Go ecosystem, these design principles was set on day one to conform to the Go mindset. Constraints Minimalistic API Don’t bloat the API, avoid enterprisey JVM like containers and configurations. Offload features like logging, configuration, scheduling and dependency injection to 3rd party libraries. they are not part of the core problems solved by the framework. The API should be small and easy to use Read more...

Durability

protoactor docs
Message Delivery Reliability Proto.Actor helps you build reliable applications which make use of multiple processor cores in one machine (“scaling up”) or distributed across a computer network (“scaling out”). The key abstraction to make this work is that all interactions between your code units—actors—happen via message passing, which is why the precise semantics of how messages are passed between actors deserve their own chapter. In order to give some context to the discussion below, consider an application which spans multiple network hosts. Read more...

Fault Tolerance

protoactor docs
Fault Tolerance Each actor is the supervisor of its children, and as such each actor defines fault handling supervisor strategy. This strategy cannot be changed afterwards as it is an integral part of the actor system’s structure. Fault Handling in Practice First, let us look at a sample that illustrates one way to handle data store errors, which is a typical source of failure in real world applications. Of course it depends on the actual application what is possible to do when the data store is unavailable, but in this sample we use a best effort re-connect approach. Read more...

Features

protoactor docs
Actor Features Create actor from function/method Create actor from object factory Spawn actor with automatic/prefixed/specific name Props Settings Actor producer Mailbox producer Supervisor strategy Dispatcher Actor spawner Middleware Context Data Parent PID Self PID Sender PID Children PIDs Current message Current Actor Features Respond to sender Stash current message pending restart Spawn child actor with automatic/prefixed/specific name Stop/restart/resume children Set/push/pop actor behaviors (become/unbecome) Watch/unwatch actors Receive timeout ProcessRegistry Get Process by PID Add local Process with ID Remove Process by PID Generate next Process ID Process Send user message to Process Send system message to Process Stop Process Supervision Directives Resume Restart Stop Escalate Strategies OneForOneStrategy applies directive to failed child PID Features Holds address (nonhost or remote address) and ID Send user message Send system message Request Request future Stop Future process Auxiliary process used to provide an awaitable future containing the response to a request Dead letter process Auxiliary process used to collect messages sent to non-existing processes Routers Group routers route message to a specified set of routees Pool routers route messages to a set of routees of a specified size, and are created/managed by the router Broadcast routers routes a message to all routees Random routers routes a message to a random routee Consistent-hash routers routes a message to a routee deterministically Round-robin routers routes messages to routees in a round-robin fashion Consistent hash routers Routing is deterministic based on a hash computed by the message Uses a hash ring so that if a routee is unavailable, another will be chosen automatically, and when the routee is back it will be used again Broadcast routers Uses a special message RouterBroadcastMessage to route messages more efficiently when the routees are remote (? Read more...

Grains

protoactor docs
Proto.Cluster Virtual Actors, aka. Grains Proto.Cluster leverages the “Virtual Actor Model”, which was pioneered by Microsoft Orleans. Unlike the traditional Actor Model used in Erlang or Akka, where developers must care about actor lifecycles, placement and failures. The virtual actor model instead focus on ease of use, high availability where most of the complexity have been abstracted away from the developer. The Microsoft Orleans website describes this as A straightforward approach to building distributed, high-scale applications in . Read more...

Location Transparency

protoactor docs
Location Transparency The previous section describes how actor PIDs are used to enable location transparency. This special feature deserves some extra explanation, because the related term “transparent remoting” was used quite differently in the context of programming languages, platforms and technologies. Distributed by Default Everything in Proto.Actor is designed to work in a distributed setting: all interactions of actors use purely message passing and everything is asynchronous. This effort has been undertaken to ensure that all functions are available equally when running within a single actor system or on a cluster of hundreds of machines. Read more...
1 of 2 Next Page
Icon