You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: sdk-core/src/main/service-protocol/service-invocation-protocol.md
+11-25Lines changed: 11 additions & 25 deletions
Original file line number
Diff line number
Diff line change
@@ -11,8 +11,8 @@ The system is composed of two actors:
11
11
- SDK, which contains the implementation of the Restate Protocol
12
12
- User business logic, which interacts with the SDK to access Restate system calls (or syscalls)
13
13
14
-
Each invocation is modeled by the protocol as a state machine, where state transitions can be caused
15
-
either by user code or by _Runtime events_.
14
+
Each invocation is modeled by the protocol as a state machine, where state transitions can be caused either by user code
15
+
or by _Runtime events_.
16
16
17
17
Every state transition is logged in the _Invocation journal_, used to implement Restate's durable execution model. The
18
18
journal is also used to suspend an invocation and resume it at a later point in time. The _Invocation journal_ is
@@ -103,7 +103,9 @@ protocol mandates the following messages:
103
103
104
104
### Message stream
105
105
106
-
In order to execute an invocation, service deployment and restate Runtime open a single stream between the runtime and the service deployment. Given 10 concurrent invocations to a service deployment, there are 10 concurrent streams, each of them mapping to a specific invocation.
106
+
In order to execute an invocation, service deployment and restate Runtime open a single stream between the runtime and
107
+
the service deployment. Given 10 concurrent invocations to a service deployment, there are 10 concurrent streams, each
108
+
of them mapping to a specific invocation.
107
109
108
110
Every unit of the stream contains a Message serialized using the
109
111
[Protobuf encoding](https://protobuf.dev/programming-guides/encoding/), using the definitions in
@@ -145,26 +147,21 @@ For example:
145
147
146
148
An arbitrary path MAY prepend the aforementioned path format.
147
149
148
-
In case the path format is not respected, or `serviceName` or `handlerName` is unknown, the SDK MUST close the stream replying back with a `404` status code.
150
+
In case the path format is not respected, or `serviceName` or `handlerName` is unknown, the SDK MUST close the stream
151
+
replying back with a `404` status code.
149
152
150
153
In case the invocation is accepted, `200` status code MUST be returned.
151
154
152
-
Additionally, the header `x-restate-user-agent` MAY be sent back, with the following format:
155
+
Additionally, the header `x-restate-server` MAY be sent back, with the following format:
0 commit comments