diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2014-08-31 21:52:06 -0300 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2014-08-31 21:52:06 -0300 |
commit | 0d7fa6333c7d6e865575522a0015c93ff3fbbe1b (patch) | |
tree | 2bf4c6b31305f516f2576b2e82f2496bb73e5eac /kamon-core/src/main/protobuf/WireFormats.proto | |
parent | c058e1b8f459f134f2409c06a57d01febfa0dc84 (diff) | |
download | Kamon-0d7fa6333c7d6e865575522a0015c93ff3fbbe1b.tar.gz Kamon-0d7fa6333c7d6e865575522a0015c93ff3fbbe1b.tar.bz2 Kamon-0d7fa6333c7d6e865575522a0015c93ff3fbbe1b.zip |
+ core: initial support for akka remoting/cluster, related to #61
Diffstat (limited to 'kamon-core/src/main/protobuf/WireFormats.proto')
-rw-r--r-- | kamon-core/src/main/protobuf/WireFormats.proto | 132 |
1 files changed, 132 insertions, 0 deletions
diff --git a/kamon-core/src/main/protobuf/WireFormats.proto b/kamon-core/src/main/protobuf/WireFormats.proto new file mode 100644 index 00000000..98a954cc --- /dev/null +++ b/kamon-core/src/main/protobuf/WireFormats.proto @@ -0,0 +1,132 @@ +/** + * Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com> + */ + +// Extracted from https://github.com/akka/akka/blob/master/akka-remote/src/main/protobuf/WireFormats.proto + + +option java_package = "akka.remote"; +option optimize_for = SPEED; + +/****************************************** + * Remoting message formats + ******************************************/ + + +message AckAndEnvelopeContainer { + optional AcknowledgementInfo ack = 1; + optional RemoteEnvelope envelope = 2; +} + +/** + * Defines a remote message. + */ +message RemoteEnvelope { + required ActorRefData recipient = 1; + required SerializedMessage message = 2; + optional ActorRefData sender = 4; + optional fixed64 seq = 5; +} + +message AcknowledgementInfo { + required fixed64 cumulativeAck = 1; + repeated fixed64 nacks = 2; +} + +/** + * Defines a remote ActorRef that "remembers" and uses its original Actor instance + * on the original node. + */ +message ActorRefData { + required string path = 1; +} + +/** + * Defines a message. + */ +message SerializedMessage { + required bytes message = 1; + required int32 serializerId = 2; + optional bytes messageManifest = 3; +} + +/** + * Defines akka.remote.DaemonMsgCreate + */ +message DaemonMsgCreateData { + required PropsData props = 1; + required DeployData deploy = 2; + required string path = 3; + required ActorRefData supervisor = 4; +} + +/** + * Serialization of akka.actor.Props + */ +message PropsData { + required DeployData deploy = 2; + required string clazz = 3; + repeated bytes args = 4; + repeated string classes = 5; +} + +/** + * Serialization of akka.actor.Deploy + */ +message DeployData { + required string path = 1; + optional bytes config = 2; + optional bytes routerConfig = 3; + optional bytes scope = 4; + optional string dispatcher = 5; +} + + +/****************************************** + * Akka Protocol message formats + ******************************************/ + +/** + * Message format of Akka Protocol. + * Message contains either a payload or an instruction. + */ +message AkkaProtocolMessage { + optional bytes payload = 1; + optional AkkaControlMessage instruction = 2; +} + +/** + * Defines some control messages for the remoting + */ +message AkkaControlMessage { + required CommandType commandType = 1; + optional AkkaHandshakeInfo handshakeInfo = 2; +} + +message AkkaHandshakeInfo { + required AddressData origin = 1; + required fixed64 uid = 2; + optional string cookie = 3; + +} + +/** + * Defines the type of the AkkaControlMessage command type + */ +enum CommandType { + ASSOCIATE = 1; + DISASSOCIATE = 2; + HEARTBEAT = 3; + DISASSOCIATE_SHUTTING_DOWN = 4; // Remote system is going down and will not accepts new connections + DISASSOCIATE_QUARANTINED = 5; // Remote system refused the association since the current system is quarantined +} + +/** + * Defines a remote address. + */ +message AddressData { + required string system = 1; + required string hostname = 2; + required uint32 port = 3; + optional string protocol = 4; +} |