Skip to content

comrade-coop/scynet-proto

Repository files navigation

Protocol Documentation

Top

Component.proto

Used for different filters that can be applied to the query.

Field Type Label Description
uuid string The universal identifier of the agent we want to get.
Field Type Label Description
egg Agent The egg that will be used only when creating the agent. It contains the uuid of the agent
Field Type Label Description
running bool

The list of avalable agents.

Field Type Label Description
agents Agent repeated

The Api whic is implemented by the different components. It is caled by the hatchery to instantiate the agents.

Method Name Request Type Response Type Description
AgentStart AgentStartRequest Void Start running a particular agent
AgentStop AgentRequest Void Stop that agent
AgentStatus AgentRequest AgentStatusResponse Check the status of an agent.
AgentList AgentQuery ListOfAgents Retrieve a list of running agents.

Top

Hatchery.proto

Field Type Label Description
agent Agent
Field Type Label Description
agent Agent
resaon string
code uint64
Field Type Label Description
uuid string The universal id of the component.
address string The place we can connect to the component to call methods on it.
runnerType string repeated The types of eggs this component can run as agents.
Field Type Label Description
uuid string

The interface used by the components to call the hatchery.

Method Name Request Type Response Type Description
RegisterComponent ComponentRegisterRequest ComponentRegisterResponse Register a component so the hatchery knows it is available and can execute eggs.
RegisterAgent AgentRegisterRequest AgentRegisterResponse Gives an egg to the hatchery, this way it knows that a new egg was generated by the queen or the available harvester functions.
UnregisterComponent ComponentUnregisterRequest Void Used in case the whole component dies, or it was turned off in case of an upgrade. Should delete any agents owned by this component.
AgentStopped AgentStoppedEvent Void Notifies that hatchery that an agent has stopped/crashed.

Top

Shared.proto

All the data that defines an agent and is needed for executing it.

Field Type Label Description
uuid string
eggData bytes optional
componentType string
componentId string id of the component in which the agent is running
inputs string repeated

Top

Stream.proto

Field Type Label Description
id string
acknowledgeMessage string
partition uint32
Field Type Label Description
data bytes
index string the thing needed to ack the message.
key uint64
partitionKey string
partition uint32
redelivary bool
Field Type Label Description
agentId string
message DataMessage repeated
Field Type Label Description
index string repeated
Field Type Label Description
id string
returnImmediately bool
maxMessages uint32
Field Type Label Description
messages DataMessage repeated
Field Type Label Description
id string
index string
key uint64
Field Type Label Description
id string
Field Type Label Description
message DataMessage
Field Type Label Description
id string Can be the id of an agent, but also the id of onother hatchery.
agentType string The type of agent we want to subscribe to. Used when subscriing to remote agents that
agetnId string The agent's output that we will subscribe to.
strongOrdering bool Used to determine if we want the order of the messages to be absoulte.
timeout uint64 The subscriber will be deleted after inactivity.
bufferSize uint32 The subscriber will have a buffer to help with backbressure and/or not to overload the client.
Field Type Label Description
agentId string
Field Type Label Description
id string

The publishing api that will be used exclusively by the agents.

Method Name Request Type Response Type Description
Publish PublishRequest PublishResponse

The subscriber api is used both by agents and other hatcheries.

Method Name Request Type Response Type Description
Subscribe SubscriptionRequest SubscriptionResponse Create a subscriber that we will use to listen to the messages produced by the agents.
Unsubscribe UnsubscribeRequest Void Delete
Acknowledge AcknowledgeRequest Void Tell the subscriber that the message was saved or transformed, and we don't want it again.
StreamingPull StreamingPullRequest StreamingPullResponse
Seek SeekRequest Void

Scalar Value Types

.proto Type Notes C++ Type Java Type Python Type
double double double float
float float float float
int32 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. int32 int int
int64 Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. int64 long int/long
uint32 Uses variable-length encoding. uint32 int int/long
uint64 Uses variable-length encoding. uint64 long int/long
sint32 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. int32 int int
sint64 Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. int64 long int/long
fixed32 Always four bytes. More efficient than uint32 if values are often greater than 2^28. uint32 int int
fixed64 Always eight bytes. More efficient than uint64 if values are often greater than 2^56. uint64 long int/long
sfixed32 Always four bytes. int32 int int
sfixed64 Always eight bytes. int64 long int/long
bool bool boolean boolean
string A string must always contain UTF-8 encoded or 7-bit ASCII text. string String str/unicode
bytes May contain any arbitrary sequence of bytes. string ByteString str

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages