-
Notifications
You must be signed in to change notification settings - Fork 366
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
Request for example with multiple versioned processes #1331
Comments
@tokarenko Thanks for sharing. The purpose of Kogito is cloud-oriented so the different processes/versions should be handled by different applications. Would that fit ? |
To add on top of the excellent @radtriste reply. Ideally, you should focus on only one workflow per Kogito application. So you have a straightforward interface, a single instance of a workflow running on your architecture. For example, you can move faster and have a clean CI/CD process this way. Versioning a process, I'd recommend a service mesh/routing operator to have multiple versions of the same application running at the same time, as @radtriste mentioned. Without a mesh, you can try to do something similar to a Canary deployment, as exemplified here: https://blog.gurock.com/implement-ab-testing-using-kubernetes/. Or even use NGINX ingress to have different request loads to different versions of the same services. There are many ways of implementing this. Long story short, I'd recommend leaving the application versioning to the Kubernetes platform. |
Thank you Tristan and Ricardo for your quick and valuable replies that I will use for guidance. I would be grateful if you could answer my further questions. Question 1: How to provide for persistence with versioned processes?From the examples I understood that process version control should be done through the "Version" property in BPMN diagram and Maven GAV is not relevant. Is ID for persistence generated from BPMN digram name and version? Should I guard persistence storage and Data Index against collisions of process names and versions when deploying multiple Kogito applications? I assume that all Kogito applications use shared infrastructure of Data Index, persistence storage, Kafka, etc. Question 2: What use may be of Data Index in routing and how to do process monitoring with versioned processes?Cristiano Nicolai mentioned in Process versioning protocol that Data Index is also a sort of Gateway API:
Question 2.1: What use may be of Data Index in routing with service mesh or Canary deployment? Question 2.2: How to do process monitoring and analysis for the whole versioned process? Should I write mutations on Data Index GraphQL to join each of the versions data into a single table response? Question 3: How to undeploy versioned process from shared infrastructure?Assuming that Kogito applications use shared infrastructure of Data Index, persistence storage, Kafka, etc. How to undeploy and clear the infrastructure from versioned process data? |
@tokarenko let me try to answer some of these.
In order to isolate processes or runtimes in the database, you can use two strategies. These are defined via Data Index should be able to handle data from multiple runtimes and different versions. In there, you will see the aggregated data from all.
I mentioned that we would like to expand the Gateway API in that sense, but I think this is probably more advanced that it should do. What I mean is that the GAteway API, and Data Index, in general knows how to contact to specific runtime for a given process instance. This is done via
In Data Index, you will have data from all process instances on different versions. I don't think you need a mutation, you will be able just to query all process instances, and these will have a version attribute that will identify the running version.
At this point I dont think there is much that needs to be done for that. Regarding the runtime itself, it only keeps data of active process instances, if you remove a runtime that has all process instances completed, you shouldn't have any data in db any longer anyway. As for Data Index, it will keep data for as long as you want, so data regarding executed instances will still be there, but Data Index wouldn't redirect any request to that runtime if all process instances are completed. |
Description
Please provide example on how to build single Kogito application serving multiple processes with multiple versions.
Implementation ideas
I suppose that the processes should be configured as Maven modules.
The text was updated successfully, but these errors were encountered: