Prerelease v5.4.0-embeddings.0
Pre-releaseSummary
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.
Note: for getting the current state of embeddings, the projections endpoint can be used with the embedding id as the state of embeddings are stored using projections.
Added
- Service for registering an embedding, and for updating and deleting the state