Background Tasks and Thread Pools in Microservices
(skipping earlier sections of the chapter)
Actix
The main types & traits of actix:
SystemType: Maintains the actors system. Must be created before any other actors are spawned.Systemis itself an actor.ActorTrait: Anything that implementsActorcan be spawned.ArbiterType: AnArbiteris an event loop controller. Can only have one per thread.ContextType: EveryActorworks in aContext, which, to the runtime, represents an actor's environment. Can be used to spawn other tasks.AddressType: Every spawnedActorhas anAddress, which can be used to send things to and from a targeted actor.MessageTrait: Types that implementMessagecan be sent thorugh a type that implementsAddress'ssendmethod.Messagehas an associated type,Result, which is the type of value that will be returned after the message is processed.HandlerTrait: Implemented onActors and enables/facilitates the actor' message-handling functionality.