Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add section on how to identify Workflows #1699

Merged
merged 1 commit into from
Jun 27, 2023

Conversation

octonato
Copy link
Member

No description provided.

@github-actions github-actions bot added Documentation Improvements or additions to the documentation kalix-runtime Runtime and SDKs sub-team labels Jun 23, 2023

In order to interact with a Workflow in Kalix, we need to assign an *type id* and one or more instance *ids*:

* *type id* is a unique identifier to the workflow. To define the workflow type id, the workflow class must be annotated with `@TypeId` and have a unique and stable identifier assigned.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aludwiko, here is the point I realised that workflows are sharing the same space as ES entities in the Proxy.

It will be better if we prefix the persistence id for workflows internally (in the proxy) so we are sure that they never conflict (until a user prefixes their own entity type id themselves with the same prefix 🤦 ).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, a prefix and a quick deployment are possible, because I'm the only one using this entity on prod (confirmed based on metrics). On the other hand, maybe we should not prefix it and create a separate table for events from workflows. I think it's possible, but I'm not sure about the overall ops cost of such a change.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another table would be nicer but increases of ops cost on our side with no real benefit for users. Not only we will need to manage another table, but there are also other things to put in place, like tracking usage, billing, etc.

Copy link
Member

@efgpinto efgpinto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@octonato octonato merged commit ab5c9ef into main Jun 27, 2023
@octonato octonato deleted the octonato/document-how-to-identify-workflows branch June 27, 2023 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to the documentation kalix-runtime Runtime and SDKs sub-team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants