API Reference
MLambda.Actor is one Aleph package, mlambda-actor. Its modules, by what they are for:
Writing actors
| Module |
What it has |
Page |
Actor.Class |
The Actor and Initial traits, Address, Context, settings attributes, actorOf, tell, ask |
Actor |
Actor.Types |
The shapes: Fault, Reply, Turn, Behavior, Ctx, ActorRef, Directive, Strategy, Mailbox |
Actor |
Actor.Behavior |
Steps (continue, stash, stop, failWith) and the engine’s behaviour builders and hooks |
Actor |
Actor.Address |
respond, refuse, and tell/ask on engine references |
Address |
Actor.System |
The actor system, spawning, death watch, stopping, shutdown |
Context |
Actor.Supervision |
Deciders and strategies |
Supervision |
Actor.Route |
Route templates and parameters |
Address |
Actor.Timer |
Messages told later, once or repeatedly |
Context |
Actor.Topic |
A typed event stream in one process |
Topology |
Actor.Breaker |
A circuit breaker as a value |
Address |
Actor.Probe |
The test kit’s probe |
Testing |
Running them
| Module |
What it has |
Page |
Surround.Host |
Hosts in three topologies, askRoute, tellRoute |
Topology |
Surround.Config |
A host’s configuration from the environment |
Topology |
Surround.EventStream |
An event stream across nodes |
Topology |
Cluster.Class |
hostingOf: a class hosted by route |
Topology |
Cluster.Node, Cluster.Satellite, Cluster.Asteroid |
The cluster’s three roles |
Topology |
Payload.Codec |
Codecs: values to bytes and back |
Serialization |
Network.Transport, Network.Envelope |
TCP between nodes; NodeEndpoint |
Topology |
Gossip.Cluster, Gossip.Crdt, Gossip.Detector |
Membership, CRDTs, the phi accrual detector |
Gossip & CRDTs |
Fortress.Guard, Fortress.Cipher |
Frames sealed with the cluster’s secret |
Deployment |
Around them
| Module |
What it has |
Page |
Saga.Saga |
Sagas: steps, compensation, retries, breakers |
Sagas & Monitoring |
Monitoring.Metrics, Monitoring.Tracing, Monitoring.Instrumented |
Prometheus metrics, Zipkin spans, instrumented actors |
Sagas & Monitoring |
Diagnostic.Diagnostic |
Per-request event reports |
Sagas & Monitoring |
Conventions
- Failures are values: an ask answers
Either Fault r, a start Either Fault a.
- A
Fault is a kind and a detail. Kinds the library uses: ActorStopped, Timeout, UnknownRoute,
CircuitBreakerOpen, InsufficientFunds (the examples), and whatever your actors pass to failWith and refuse.
- Time is in milliseconds unless a name says otherwise (
observeMicros).