Skip to main content

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.

NameTypeDescription
actor_namestring
actor_systemstring
command_namestring
current_contextContext
valuegoogle.protobuf.Any

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.

NameTypeDescription
actor_namestring
actor_systemstring
updated_contextContext
valuegoogle.protobuf.Any

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.

NameTypeDescription
stategoogle.protobuf.Any

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.

NameTypeDescription
systemactors.ActorSystem
actoractors.Actor
command_namestring
valuegoogle.protobuf.Any
asyncbool

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.

NameTypeDescription
statusRequestStatus
systemactors.ActorSystem
actoractors.Actor
valuegoogle.protobuf.Any

ProxyInfo

NameTypeDescription
protocol_major_versionint32
protocol_minor_versionint32
proxy_namestring
proxy_versionstring

RegistrationRequest

NameTypeDescription
service_infoServiceInfo
actor_systemactors.ActorSystem

RegistrationResponse

NameTypeDescription
statusRequestStatus
proxy_infoProxyInfo

RequestStatus

NameTypeDescription
statusStatus
messagestring

ServiceInfo

NameTypeDescription
service_namestringThe name of the actor system, eg, "my-actor-system".
service_versionstringThe version of the service.
service_runtimestringA 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_namestringIf using a support library, the name of that library, eg "spawn-jvm"
support_library_versionstringThe version of the support library being used.
protocol_major_versionint32Spawn protocol major version accepted by the support library.
protocol_minor_versionint32Spawn protocol minor version accepted by the support library.

Enums

Status

NameNumberDescription
UNKNOWN0
OK1
ACTOR_NOT_FOUND2
ERROR3