1
1
syntax = "proto3" ;
2
2
3
- package eigr.actors ;
3
+ package eigr.functions.protocol. actors ;
4
4
5
5
import "google/protobuf/any.proto" ;
6
6
@@ -75,19 +75,56 @@ message Metadata {
75
75
map <string , string > tags = 2 ;
76
76
}
77
77
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
+
78
109
message ActorSettings {
79
110
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 ;
82
113
83
114
// Indicates whether an actor's state should be persisted in a definitive store.
84
- bool persistent = 2 ;
115
+ bool stateful = 2 ;
85
116
86
117
// Snapshot strategy
87
118
ActorSnapshotStrategy snapshot_strategy = 3 ;
88
119
89
120
// Deactivate strategy
90
121
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 ;
91
128
}
92
129
93
130
message ActorId {
@@ -96,6 +133,10 @@ message ActorId {
96
133
97
134
// Name of a ActorSystem
98
135
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 ;
99
140
}
100
141
101
142
message Actor {
0 commit comments