Skip to content

Commit

Permalink
Squashed 'sdk-core/src/main/service-protocol/' changes from a4a8596e.…
Browse files Browse the repository at this point in the history
….552361ef

552361ef handlerType -> ty
f38562fd Rename entries and manifest to have names closer to the concept names we use everywhere else (#88)
57a9437c Make the 3 additional fields about related entry in ErrorMessage optional

git-subtree-dir: sdk-core/src/main/service-protocol
git-subtree-split: 552361ef45340173e8beb361e35fb7b6e5d6effe
  • Loading branch information
slinkydeveloper committed Apr 22, 2024
1 parent a5c1c11 commit 4de7bfe
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@
"type": "integer",
"maximum": 0
},
"components": {
"services": {
"type": "array",
"items": {
"type": "object",
"title": "Component",
"title": "Service",
"properties": {
"fullyQualifiedComponentName": {
"name": {
"type": "string",
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9._-]*$"
},
"componentType": {
"title": "ComponentType",
"ty": {
"title": "ServiceType",
"enum": ["VIRTUAL_OBJECT", "SERVICE"]
},
"handlers": {
Expand All @@ -41,7 +41,7 @@
"type": "string",
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9_]*$"
},
"handlerType": {
"ty": {
"title": "HandlerType",
"enum": ["EXCLUSIVE", "SHARED"],
"description": "If unspecified, defaults to EXCLUSIVE for Virtual Object. This should be unset for Services."
Expand Down Expand Up @@ -125,11 +125,11 @@
}
}
},
"required": ["fullyQualifiedComponentName", "componentType", "handlers"],
"required": ["name", "ty", "handlers"],
"additionalProperties": false
}
}
},
"required": ["minProtocolVersion", "maxProtocolVersion", "components"],
"required": ["minProtocolVersion", "maxProtocolVersion", "services"],
"additionalProperties": false
}
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ message ErrorMessage {

// Entry that caused the failure. This may be outside the current stored journal size.
// If no specific entry caused the failure, the current replayed/processed entry can be used.
uint32 related_entry_index = 4;
// Name of the entry that caused the failure. Empty if no name was set.
string related_entry_name = 5;
// Entry type. 0 if unknown.
uint32 related_entry_type = 6;
optional uint32 related_entry_index = 4;
// Name of the entry that caused the failure.
optional string related_entry_name = 5;
// Entry type.
optional uint32 related_entry_type = 6;
}

// Type: 0x0000 + 4
Expand Down Expand Up @@ -222,9 +222,9 @@ message SleepEntryMessage {
// Completable: Yes
// Fallible: Yes
// Type: 0x0C00 + 1
message InvokeEntryMessage {
message CallEntryMessage {
string service_name = 1;
string method_name = 2;
string handler_name = 2;

bytes parameter = 3;

Expand All @@ -245,9 +245,9 @@ message InvokeEntryMessage {
// Completable: No
// Fallible: Yes
// Type: 0x0C00 + 2
message BackgroundInvokeEntryMessage {
message OneWayCallEntryMessage {
string service_name = 1;
string method_name = 2;
string handler_name = 2;

bytes parameter = 3;

Expand Down Expand Up @@ -300,7 +300,7 @@ message CompleteAwakeableEntryMessage {
// Fallible: No
// Type: 0x0C00 + 5
// Flag: RequiresRuntimeAck
message SideEffectEntryMessage {
message RunEntryMessage {
oneof result {
bytes value = 14;
dev.restate.service.protocol.Failure failure = 15;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,15 @@ descriptions in [`protocol.proto`](dev/restate/service/protocol.proto).
| `GetStateEntryMessage` | `0x0800` | Yes | No | Get the value of a service instance state key. |
| `GetStateKeysEntryMessage` | `0x0804` | Yes | No | Get all the known state keys for this service instance. Note: the completion value for this message is a protobuf of type `GetStateKeysEntryMessage.StateKeys`. |
| `SleepEntryMessage` | `0x0C00` | Yes | No | Initiate a timer that completes after the given time. |
| `InvokeEntryMessage` | `0x0C01` | Yes | Yes | Invoke another Restate service. |
| `CallEntryMessage` | `0x0C01` | Yes | Yes | Invoke another Restate service. |
| `AwakeableEntryMessage` | `0x0C03` | Yes | No | Arbitrary result container which can be completed from another service, given a specific id. See [Awakeable identifier](#awakeable-identifier) for more details. |
| `BackgroundInvokeEntryMessage` | `0x0C02` | No | Yes | Invoke another Restate service at the given time, without waiting for the response. |
| `OneWayCallEntryMessage` | `0x0C02` | No | Yes | Invoke another Restate service at the given time, without waiting for the response. |
| `CompleteAwakeableEntryMessage` | `0x0C04` | No | Yes | Complete an `Awakeable`, given its id. See [Awakeable identifier](#awakeable-identifier) for more details. |
| `OutputEntryMessage` | `0x0401` | No | No | Carries the invocation output message(s) or terminal failure of the invocation. |
| `SetStateEntryMessage` | `0x0800` | No | No | Set the value of a service instance state key. |
| `ClearStateEntryMessage` | `0x0801` | No | No | Clear the value of a service instance state key. |
| `ClearAllStateEntryMessage` | `0x0802` | No | No | Clear all the values of the service instance state. |
| `SideEffectEntryMessage` | `0x0C05` | No | No | Run non-deterministic user provided code and persist the result. |
| `RunEntryMessage` | `0x0C05` | No | No | Run non-deterministic user provided code and persist the result. |

#### Awakeable identifier

Expand Down

0 comments on commit 4de7bfe

Please sign in to comment.