2. Discovering the Service
Fabric’s actor model!!
Massimo Bonanni
Paranormal Developer, with the head in the Cloud and all the REST in microservices!
massimo.bonanni@microsoft.com
@massimobonanni
5. Creates more actors
Sends messages to other actors
Designates what to do with the next message
Elaborates only one message at time
Receives messages
Stores data internally
https://aka.ms/HewittActor
6. Virtual Actor (not explicit create or destroy)
C# class (inherited from ActorBase)
Lifecycle, garbaging
Single-thread by design
Exposes interface (object oriented approach)
Stores serializable objects in a reliable dictionary
(with replica)
7. The Actor Runtime manages lifecycle, garbage
collection, and enforces single-threaded access.
An actor service remoting listener accepts remote
access calls to actors and sends them to a
dispatcher to route to the appropriate actor
instance
The Actor State Provider wraps state providers
(such as the Reliable Collections state provider) and
provides an adapter for actor state management.
16. Reminders
A mechanism to trigger persistent callbacks
on an actor at specified times.
Triggered under all circumstances until the
actor explicitly unregisters them or the actor
is explicitly deleted
Triggered across actor deactivations and
failovers because the Actors runtime persists
information about the reminders using actor
state provider.
Timers
Provide a simple wrapper around a .NET or
Java timer
Ensure that the callback methods respect the
turn-based concurrency
Are executed only if the actor is alive
17.
18. Store large objects in a single State
Manager item (eg list of objects)
Long-term operations can block any
calls to the actors (use "disposable"
actors with "fire and forget" patterns)
Avoid multiple calls to the same actor in
the same method.
19.
20. Service Fabric provides “out-of-the-box" all the orchestration features needed
for your actors.
You can run your application both in Cloud and on Premise.
Run on Linux and Windows and you can use Java or .NET.
Will become Open Source.
Understand if the actor model is the ideal model for your requirements before
implementing the application !!