protocol.proto
path eigr/functions/protocol/actors/protocol.proto
package eigr.functions.protocol
Messages
ActorInvocation
ActorInvocation is a translation message between a local invocation made via InvocationRequest
and the real Actor that intends to respond to this invocation and that can be located anywhere in the cluster.
Params:
actor_name: The name of the Actor handling the InvocationRequest request, also called the target Actor.
actor_system: The name of ActorSystem registered in Registration step.
command_name: The function or method on the target Actor that will receive this request
and perform some useful computation with the sent data.
current_context: The current Context with current state value of the target Actor.
That is, the same as found via matching in %Actor{name: target_actor, state: %ActorState{state: value} = actor_state}.
In this case, the Context type will contain in the value attribute the same `value` as the matching above.
value: The value to be passed to the function or method corresponding to command_name.
ActorInvocationResponse
The user function's response after executing the action originated by the local proxy request via ActorInvocation.
Params:
actor_name: The name of the Actor handling the InvocationRequest request, also called the target Actor.
actor_system: The name of ActorSystem registered in Registration step.
updated_context: The Context with updated state value of the target Actor after user function has processed a request.
value: The value that the original request proxy will forward in response to the InvocationRequest type request.
This is the final response from the point of view of the user who invoked the Actor call and its subsequent processing.
Context
Context is where current and/or updated state is stored
to be transmitted to/from proxy and user function
Params:
* state: Actor state passed back and forth between proxy and user function.
InvocationRequest
The user function when it wants to send a message to an Actor uses the InvocationRequest message type.
Params:
* system: See ActorStstem message.
* actor: The target Actor, i.e. the one that the user function is calling to perform some computation.
* command_name: The function or method on the target Actor that will receive this request
and perform some useful computation with the sent data.
* value: This is the value sent by the user function to be computed by the request's target Actor command.
* async: Indicates whether the command should be processed synchronously, where a response should be sent back to the user function,
or whether the command should be processed asynchronously, i.e. no response sent to the caller and no waiting.
InvocationResponse
InvocationResponse is the response that the proxy that received the InvocationRequest request will forward to the request's original user function.
Params:
status: Status of request. Could be one of [UNKNOWN, OK, ACTOR_NOT_FOUND, ERROR].
sytem: The original ActorSystem of the InvocationRequest request.
actor: The target Actor originally sent in the InvocationRequest message.
value: The value resulting from the request processing that the target Actor made.
This value must be passed by the user function to the one who requested the initial request in InvocationRequest.
ProxyInfo
Name | Type | Description |
---|
protocol_major_version | int32 | |
protocol_minor_version | int32 | |
proxy_name | string | |
proxy_version | string | |
RegistrationRequest
RegistrationResponse
RequestStatus
Name | Type | Description |
---|
status | Status | |
message | string | |
ServiceInfo
Name | Type | Description |
---|
service_name | string | The name of the actor system, eg, "my-actor-system". |
service_version | string | The version of the service. |
service_runtime | string | A description of the runtime for the service. Can be anything, but examples might be:
- node v10.15.2
- OpenJDK Runtime Environment 1.8.0_192-b12 |
support_library_name | string | If using a support library, the name of that library, eg "spawn-jvm" |
support_library_version | string | The version of the support library being used. |
protocol_major_version | int32 | Spawn protocol major version accepted by the support library. |
protocol_minor_version | int32 | Spawn protocol minor version accepted by the support library. |
Enums
Status
Name | Number | Description |
---|
UNKNOWN | 0 | |
OK | 1 | |
ACTOR_NOT_FOUND | 2 | |
ERROR | 3 | |