Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Added an embeddings service, that has three endpoints:
Connect, for registering an embedding:
An embedding is an extension of a projection (only allowed on the default scope), that also handles compare requests.
When the external state of an embedding changes, the embedding will be called to compare the externally provided state and the current state of the projection that has the same key. The method is expected to return a set of events that move the projection state closer to the external state. These events are committed and used to update the projection. This process will be repeated until the external and projection states are equal.
Update, for asking the runtime to start an update process:
At any time, the runtime can be called with a state for a given embedding id and key. If the state is not equal to the current state, the process described above will kick in. When the states are equal, the runtime will reply with the projected state. If it is not possible to reach the provided state for the specified embedding, the runtime will reply with a failure and not commit any events.
Delete, for asking the runtime to start an update process that results in a deletion:
This endpoint triggers the same behaviour as the Update endpoint, but where the desired state is that the given embedding id and key should not exist.
Added