Skip to content

Commit 4de7bfe

Browse files
Squashed 'sdk-core/src/main/service-protocol/' changes from a4a8596e..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
1 parent a5c1c11 commit 4de7bfe

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

sdk-core/src/main/service-protocol/deployment_manifest_schema.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,18 @@
1717
"type": "integer",
1818
"maximum": 0
1919
},
20-
"components": {
20+
"services": {
2121
"type": "array",
2222
"items": {
2323
"type": "object",
24-
"title": "Component",
24+
"title": "Service",
2525
"properties": {
26-
"fullyQualifiedComponentName": {
26+
"name": {
2727
"type": "string",
2828
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9._-]*$"
2929
},
30-
"componentType": {
31-
"title": "ComponentType",
30+
"ty": {
31+
"title": "ServiceType",
3232
"enum": ["VIRTUAL_OBJECT", "SERVICE"]
3333
},
3434
"handlers": {
@@ -41,7 +41,7 @@
4141
"type": "string",
4242
"pattern": "^([a-zA-Z]|_[a-zA-Z0-9])[a-zA-Z0-9_]*$"
4343
},
44-
"handlerType": {
44+
"ty": {
4545
"title": "HandlerType",
4646
"enum": ["EXCLUSIVE", "SHARED"],
4747
"description": "If unspecified, defaults to EXCLUSIVE for Virtual Object. This should be unset for Services."
@@ -125,11 +125,11 @@
125125
}
126126
}
127127
},
128-
"required": ["fullyQualifiedComponentName", "componentType", "handlers"],
128+
"required": ["name", "ty", "handlers"],
129129
"additionalProperties": false
130130
}
131131
}
132132
},
133-
"required": ["minProtocolVersion", "maxProtocolVersion", "components"],
133+
"required": ["minProtocolVersion", "maxProtocolVersion", "services"],
134134
"additionalProperties": false
135135
}

sdk-core/src/main/service-protocol/dev/restate/service/protocol.proto

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ message ErrorMessage {
7878

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

8888
// Type: 0x0000 + 4
@@ -222,9 +222,9 @@ message SleepEntryMessage {
222222
// Completable: Yes
223223
// Fallible: Yes
224224
// Type: 0x0C00 + 1
225-
message InvokeEntryMessage {
225+
message CallEntryMessage {
226226
string service_name = 1;
227-
string method_name = 2;
227+
string handler_name = 2;
228228

229229
bytes parameter = 3;
230230

@@ -245,9 +245,9 @@ message InvokeEntryMessage {
245245
// Completable: No
246246
// Fallible: Yes
247247
// Type: 0x0C00 + 2
248-
message BackgroundInvokeEntryMessage {
248+
message OneWayCallEntryMessage {
249249
string service_name = 1;
250-
string method_name = 2;
250+
string handler_name = 2;
251251

252252
bytes parameter = 3;
253253

@@ -300,7 +300,7 @@ message CompleteAwakeableEntryMessage {
300300
// Fallible: No
301301
// Type: 0x0C00 + 5
302302
// Flag: RequiresRuntimeAck
303-
message SideEffectEntryMessage {
303+
message RunEntryMessage {
304304
oneof result {
305305
bytes value = 14;
306306
dev.restate.service.protocol.Failure failure = 15;

sdk-core/src/main/service-protocol/service-invocation-protocol.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,15 +310,15 @@ descriptions in [`protocol.proto`](dev/restate/service/protocol.proto).
310310
| `GetStateEntryMessage` | `0x0800` | Yes | No | Get the value of a service instance state key. |
311311
| `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`. |
312312
| `SleepEntryMessage` | `0x0C00` | Yes | No | Initiate a timer that completes after the given time. |
313-
| `InvokeEntryMessage` | `0x0C01` | Yes | Yes | Invoke another Restate service. |
313+
| `CallEntryMessage` | `0x0C01` | Yes | Yes | Invoke another Restate service. |
314314
| `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. |
315-
| `BackgroundInvokeEntryMessage` | `0x0C02` | No | Yes | Invoke another Restate service at the given time, without waiting for the response. |
315+
| `OneWayCallEntryMessage` | `0x0C02` | No | Yes | Invoke another Restate service at the given time, without waiting for the response. |
316316
| `CompleteAwakeableEntryMessage` | `0x0C04` | No | Yes | Complete an `Awakeable`, given its id. See [Awakeable identifier](#awakeable-identifier) for more details. |
317317
| `OutputEntryMessage` | `0x0401` | No | No | Carries the invocation output message(s) or terminal failure of the invocation. |
318318
| `SetStateEntryMessage` | `0x0800` | No | No | Set the value of a service instance state key. |
319319
| `ClearStateEntryMessage` | `0x0801` | No | No | Clear the value of a service instance state key. |
320320
| `ClearAllStateEntryMessage` | `0x0802` | No | No | Clear all the values of the service instance state. |
321-
| `SideEffectEntryMessage` | `0x0C05` | No | No | Run non-deterministic user provided code and persist the result. |
321+
| `RunEntryMessage` | `0x0C05` | No | No | Run non-deterministic user provided code and persist the result. |
322322

323323
#### Awakeable identifier
324324

0 commit comments

Comments
 (0)