11syntax = "proto3" ;
22
3- package eigr.actors ;
3+ package eigr.functions.protocol. actors ;
44
55import "google/protobuf/any.proto" ;
66
@@ -75,19 +75,56 @@ message Metadata {
7575 map <string , string > tags = 2 ;
7676}
7777
78+ // The type that defines the runtime characteristics of the Actor.
79+ // Regardless of the type of actor it is important that
80+ // all actors are registered during the proxy and host initialization phase.
81+ enum Kind {
82+ // When no type is informed, the default to be assumed will be the Singleton pattern.
83+ UNKNOW_KIND = 0 ;
84+
85+ // Abstract actors are used to create children of this based actor at runtime
86+ ABSTRACT = 1 ;
87+
88+ // Singleton actors as the name suggests have only one real instance of themselves running
89+ // during their entire lifecycle. That is, they are the opposite of the Abstract type Actors.
90+ SINGLETON = 2 ;
91+
92+ // Pooled Actors are similar to abstract actors, but unlike them,
93+ // their identifying name will always be the one registered at the system initialization stage.
94+ // The great advantage of Pooled actors is that they have multiple instances of themselves
95+ // acting as a request service pool.
96+ // Pooled actors are also stateless actors, that is, they will not have their
97+ // in-memory state persisted via Statesstore. This is done to avoid problems
98+ // with the correctness of the stored state.
99+ // Pooled Actors are generally used for tasks where the Actor Model would perform worse
100+ // than other concurrency models and for tasks that do not require state concerns.
101+ // Integration flows, data caching, proxies are good examples of use cases
102+ // for this type of Actor.
103+ POOLED = 3 ;
104+
105+ // Reserved for future use
106+ PROXY = 4 ;
107+ }
108+
78109message ActorSettings {
79110
80- // Indicates if actor´s is abstract or non abstract .
81- bool abstract = 1 ;
111+ // Indicates the type of Actor to be configured .
112+ Kind kind = 1 ;
82113
83114 // Indicates whether an actor's state should be persisted in a definitive store.
84- bool persistent = 2 ;
115+ bool stateful = 2 ;
85116
86117 // Snapshot strategy
87118 ActorSnapshotStrategy snapshot_strategy = 3 ;
88119
89120 // Deactivate strategy
90121 ActorDeactivationStrategy deactivation_strategy = 4 ;
122+
123+ // When kind is POOLED this is used to define minimun actor instances
124+ int32 min_pool_size = 5 ;
125+
126+ // When kind is POOLED this is used to define maximum actor instances
127+ int32 max_pool_size = 6 ;
91128}
92129
93130message ActorId {
@@ -96,6 +133,10 @@ message ActorId {
96133
97134 // Name of a ActorSystem
98135 string system = 2 ;
136+
137+ // When the Actor is of the Abstract type,
138+ // the name of the parent Actor must be informed here.
139+ string parent = 3 ;
99140}
100141
101142message Actor {
0 commit comments