 Well hello and welcome to another Dev nation tech talk as you guys have seen before if you've been to one of our shows before We love talking about all forms of technology And today we're going to deep dive into a technology called called Jito if you're familiar with the drools or JBBM Background in other words if you know about declared a business rule declared a business processes And you've seen those technologies from us an open source before we're gonna have a lot of fun with that today Where it's been super optimized and we have rock star with us right now. So let's turn it over to much a Hello, everyone Yes, and why we think is important in today's business. So first of all, I think that it's as Berset we come from the Background of jewels and JBBM and by that we are trying to Utilize the business knowledge that you can gather throughout the different domains and I believe that in almost Anything almost in almost any domain pretty much anything can be expressed as processes and rules Usually business people already doing that. So that's why you can see a lot of flow charts flow diagrams different decisions They both decisions reason and so on so forth across the organization. So it's just a matter of recognizing those patterns and to be able to Quickly avoid mistakes or minimize and a repetition and by that start automating your business so we've talking about the business automation which comes from and of has origins from BPM or business process management You can start looking at the orchestration versus choreography Is it either is it essentialize a big process engine that needs to orchestrate everything? And you need to start having Everything underneath that single element or you can start distributing that and communicate with messages across the different Participants, but in the recent times we started to look at the microservices way of doing things So then you start having a conversation between either Conductor or reactor part and again either you start centralizing and Orchestrating things or conducting and or you start reacting to things happening in your environment, but I would Ask question why not use whatever actually fits the use case? So it's not that the orchestration and choreography or conductor and reactor are mutated exclusive. They you can actually Combine both if you actually have the use case for that So with that in mind we started to look at the how we can bring in the new Things into the cloud and native Java links and we started a couple of months back with Kojito You might have seen Mario Fusco presentation about the the journey we took to actually End up with with Kojito and how much it took to actually get it quite all the mature projects moving towards the native Java and being ready for the cloud native Deployments So maybe just before we dive into the Kojito itself and the even driven business automation A single centers of what is Kojito and why the name is like that. So you can see the quote under the On the bottom of the screen is the Kojito ergo zoom Which is a Latin which usually translated to I think therefore I am so we started to think that maybe we can take advantage of that as Well with uppercase obviously referring to Kubernetes and the Kojito ergo automate would Simply translate to I think therefore I automate So with that in mind, let's look at the Kojito itself, which we define it as cloud native business automation for Kind of a toolkit that helps you to build Intelligent application because it's way more than just the business a Process or single business rule or bunch of business rules and it's based on battle test capabilities And one of them obviously will be JBPM and Jaws, but it's not only that we take advantage of other already proven technologies like in Finnish pun or Java itself and now Quarkus with Grail VM and substrate VM. So this is what brings us to the next level of the software solutions we can build on top of Java So one of the most important things in the Kojito ergo system or in the way you build With Kojito is the focus on the domain or on your business domain rather than technology itself Even though Kojito provides features build on top of processes and decisions and rules It's not always that you need to take advantage of those But if you start thinking from the business domain point of view, you can start abstracting from the technology Underneath and if needed you can swap the technology later on once you go So one of the most important things we have here is that our services do exchange information based on tailored events that are caring Mainly business relevant information and the defining business in it will mean different things in different context for instance in the case that The demonstration you will start This is a visa application But at the same time all the type of events will fly around the environment as well So those are more produced by the runtime Executions meaning that you can start capturing information what actually happened and Start deriving from it and building up an index of information that can bring you additional information on top of the application themselves So without further delay, let's take a look at the use case we have here So we have a startup travel agency called Kojito travel agency That tries to increase their online presence. So we have a few actors here. So if we have a traveler we have the Visa officer and then the travel assistant and all of those people want to be informed as soon as They need to React on some kind of actions that are waiting for them. So first of all, we start with The overall architecture. So we have two main services. There is a Kojito Travel agency service and then could be the visas and those are two microservices one is the front end for the travelers to request Travels and that is just by specifying information about themselves like the personal details and the travel destination dates and so on so forth The system itself will take advantage of the business rules defined on as a decision table And with that we start pushing information if there is a requirements for visa or not So those and again will be pushed out as events consumed by another service as mentioned before everything that the Application the do will trigger additional additional types of events that will be consumed again through Kafka topics to a third service Which is the sort of a supporting service of Kojito itself that grabs captures the events and exposes them in the index way so it is available for Searches advanced capabilities around the data itself So let's see how it actually works and what how it is build up So first of all we can take a look at the services themselves. So those are Quarkus base application So just simply using take a bunch of extensions like Kojito or reactive messaging rest easy json CDI and so forth The backbone of the application is actually a business process that is Exposed as a service when you look at the process itself it has a bunch of nodes that you need to traverse which defines the Way the application is actually build up and then we use this a cold process composition So we can divide the the actual business process into multiple steps or smaller pieces and in that case we have the book hotel and book flight are actually Separate process definitions which in our case are extremely simple just call a service, which is our on Java CDI bin Those are just returning a very simple static data for anything booking further We will start enhancing that we having additional services that will communicate with you through events with each other instead of having the Call to the local service, but again, it's it shows as well that you can easily integrate with the underlying framework that you can build the services and just invoke them from within The process definition as well The other service that is responsible for visa applications are only initiated with the message event and that message event is connected to a Kafka topic so as soon as an Message arrives at the Kafka topic it will create a new instance of the process again using the business rules to See if it can Automatically approve a particular visa application and if so it simply ends the process Otherwise it asked the visa officer to actually approve it money or approve it or reject it money The rules are extremely simple here. I can just mean a bit. So we have two rules for either visiting Australia on US and it just based on the duration of your trip It can be automatically approved. So if visiting Australia for less than 90 days We get it automatically approved or US if it's less than 15 days, we get it approved as well So we have the VS code extension that actually brings up the modeling capabilities So you can actually do the diagramming within your ID. So this is one of the main messages of Kojita as well Developer on developers we wanted to make their configuration a UI and HTML and JavaScript and so on so forth So over this quick run through, let's see how it actually can be done So let's put in we can just quickly put my Details And we go want to go to us. Let's say Boston We just select some dates And we start the trip so what we got here is that the process has immediately started and go through the Note and it actually said that there is still the requirements for visa Obviously, I want to go to us and I've polished it is and I need to have a visa We can take a look at the details of the trip itself So you can see that no neither hotel or fly has been already the set of booked So we can then take a look at the visa application So visa application we can simply apply for that So again a bit of information who is going where and then just ask for additional Information, let's say that we need to have we want to go for the 30 days. So we will end up with the manual approval process Well, once that is sent out, we get the information that the Flight and hotel has been booked and then if we go to a visa application, we should see My visa application here. So that came through the kafka topic And if you would like to see the details that it's actually through the kafka topic We can take a look at our visa applications Slow the data And here we go. So this is our event that came through kafka And we can then start looking at that From the visa officer point of view. So we have options either to approve or reject again That's the decision to do so we can actually reject. So I'm not going to go there As my visa has been rejected as just to show it quickly here that The process itself at the moment is done on purpose that it does not produce anything The idea later on is to start enhancing it even more. So those events can produce Events as well that are of business relevance and by that we could actually react in this main process That if we have already booked hotel and flights, we can directly start compensating those And since we can compensate we start removing the elements from it All right, so we can actually take a look at the last step and if we complete it We have the traveler request completed But it's not all that we can actually see since everything is domain driven And the business relevant we can actually take advantage of grafana and the metrics that we expose So as you can see here, it's not just that we have the basic information about How many travel requests so many of them are open cancelled or completed The interesting part is actually underneath that. So we have already direct information What services have been involved or what rules have been applied as you can see quite More people wanted to go or policy didn't want to go to us than to australia And then we have another set of information that is actually coming not just from the generic metrics that the engine can expose It's actually based on the actual data that the processes are handling or dealing with So you can directly see that we have a certain countries and certain durations We have either visas approved or we have the visa rejected So based on that information you can start building up More and more insight into your business Being automated so Going back to slides What we could actually see here is that Thanks to the the domain Specific information or the business relevant data that are directly accessible and the and they are not really hidden behind the processes or Task or decision We can actually take advantage of this information directly because the system and the clients connected to it Will talk immediately with the relevant information. It's not going to talk to the system or give me all process instances Now it will ask for give me all travel requests open. So this is the domain But at the same time Start deriving not only the business related information, but the domain specific information as well So let me show you quickly how this looks like because we have the data index service that exposes Its data through the graph ql So for instance from the travel assistant point of view, we wanted to take a look at the Yes travels, right? So we want to see what travels we have and since we want to look at the travels We want to look at who is actually traveling. So let's take a traveler First name last name and let's say nationality You can already start taking that out of the system as you can see we have My travel request being there, but we want to see where people want to go as well So we'll take a look at the trip And since we have the trip we can see the country the city and country for instance, and let's see If we need a visa there or not So as you can see a person named Henry Jones from Germany Do not need to go to do not to have a visa to go to Detroit in us But everyone else that is with policy citizenship and needs to have the visa So this is already showing information Directly on the domain itself, but the domain Information are also capturing the process instances So for instance, we want to see what process instances have been executed there And in what state they are so for instance, I just wanted to see here So we can see that this travel has been Executed by the travels process and it's in state completed Then if we need a visa and we did additional operations, we have the flight booking That is all completed as well same Goes when we want to show for instance the visa applications again all domains all services Push out those events that are captured and indexed so we can actually take advantage of this as well So we want to take a look at the visa application. So let's see who is actually sending the visa And nationality and let's say possible number Yet all of those information come from the index. So it's extremely fast Accessible and you can fine tune start doing searches across the different operations different data and last but not least we have the Technical information so we can for instance want to see process ID And we want to see what kind of nodes have been executed there And here we want to see the name and type for instance All right, so you can see the flight booking process what nodes have been executed If you look at the travels process, which is a bit more complex Then you have this information as well All the information that you need Are there and you can E-oriented so to say behind the driving wheel So you decide what you want and how you want to get delivered to you And since we mentioned that the cogito is the cloud native toolkit for building indigent application We do design it from Very beginning to run at scale. So we target definitely the Open shift kubernetes key native environment and to make sure that we are there as treated as a first-class citizen We build up the operator as well with an intuitive CLI on top of that So what I presented today, you will be able to do with pretty much three commands One that will simply create a new Application for you. So it will set up everything that it's required like for instance provisioning the kafka if not there or infini span for persistence SSO once we start securing the services and so on so forth everything that is required to to run within the cogito ecosystem It will be provision automatically for you So you don't have to find you but at the same time If you have a need to actually do some configuration you will be able to do those configurations over dedicated operators like for instance for instance the the kafka operator infini span Get started, but then you Sorry to those two services You will just have the cogito deploy and just specifying the git location of where the application is And we'll do the source to image for you and deploy that in whatever mode you like if you want to run in a Native image mode for quarkus. Yeah, that's exactly what I'm doing here So let me just quickly show you this. All right Let me just zoom this in So we have our two native image images created for those services and they are Pretty much of 64 megabytes of size that includes all the extensions that we have there Meaning that we have the kafka. We have the infini span of cogito The cdi rest easy jason. So it's quite a lot of things to to power it up. But at the same time it's still of quite small size Right, so wrapping up a bit So if you want to get started I definitely recommend the scan the QR code here to visit our website Where you can find quite a lot of information even though it's still early days for us but uh, yeah, have a look at getting started guide or the community where I encourage you to Join our mailing list to stay up to date and look at the wiki or yeah, just report Share your feedback Or just simply go to quarkus website where we have the cogito guide that Gets you a quick run through what you can do with cogito and how simply you can get started So with that, um, hoping up for questions. Thank you very much. Okay, we're back on Fantastic So there is a question I have right out of the gate and that is I saw what you did with grafana there And I'm used to using grafana in the context of Kubernetes and open shift What is the back end data structure to support that grafana and then of course support the graph ql thing that you did Yeah, so when it comes to grafana, it's all based on the primitives metrics So the services themselves expose the metrics in the primitives format So they are just simply collected and used for building the dashboards from grafana And when it comes to the data index service and the graph ql So this is uh, utilizing if any span with the data index or the lucine index on top of it And then we simply get the data from the index In the domain specific way and exposed to the specific graph ql queries All of that's being served out the single native compiled to native binary that you compiled at quarkus The data index is running in jvm mode. It's still a quarkus application and the reason for that it's It's aimed to be a long running service So it definitely will perform better in jvm mode, but if needed it can be run in the native image mode as well Okay, and there was another question that came up early in the conversation around your use of visual studio code What will that be available to the rest of us? Very soon we are about to Release the first alpha version. So hopefully within a couple of days We will wrap it up and make it available for public consumption Okay, and then alex nicely posted on the chat your url specifically to this travel agency demo application People were very curious about how to get their hands on the demo application. So that's good. We got that covered there Um on your github right in your github repo. That's where that demo application exists Yeah And then the recording will get released. That's another common question We will have a recording out within a day or two It sometimes takes 24 48 hours to get the recording out for the session Another question I though had for you related to cogito in particular. What are the different? Types of modeling languages that you're supporting now. I saw bpmn2 there I saw drl. What other types of modeling languages do you have for rules and processes? Yeah, so right now, as I said, we have bpmn2 for processes drl for the Sort of freehand the rule altering. We are about to add dmn and the decision tables there We're starting to look at the server as a workflow specification as well. So this is the jason representation for processes So there are there will be more coming as well. So If you have anything that You find Interesting. Let us know we definitely wanted to take your feedback and look what is actually in demand for for modeling. So Do we still have support for Craft in your own dsl domain specific language? Oh, we think okay And we broke up a little bit there. So hopefully we get you back Where I can hear you again Can you hear me now? It can be on my end. There we go. That's better Shall I answer the question once again? Yes Yeah, so it comes to dsl. Uh, then again, we wanted to have the cogita to be demand driven So if there is a demand, we definitely want to look at it. Uh, although we're right now. We don't support dsl in In the form that it was in the previous version of rules Although you you might want to you might look at the what we call executable model to be sort of dsl as well. So this is like a java dsl for rules or process Okay, and then there's another question related to how what is the cogita relationship to red hat, you know And of course, it's an open source community project. Alex is chatting with some people there on the chat But what would you say about cogita? What was the design input? What was the theme? What was the emphasis for why we you know came up with this new name new brand new idea? Yeah, so it's definitely the next generation So we would why we started it as a new initiative is to not too much Disrupt the current implementation or the current projects at customers because that that is a big shift right now So it's I usually compare it like eap and quarkus and that is what this jbpm and jewels and cogita So it takes advantage of all the experience we gained throughout the the years that we built the jewels and jbpm But at the same time we wanted to take the opportunity and drop some things that we see are not really Suitable anymore like for instance a relational database, which we had the persistent base on in jbpm But now we are moving towards like key value stores with the default implementation in finis pan that fits much better the cloud native ecosystem so to say Great point. That is that fantastic. I love what you said your one of your opening phrases was it's a cloud native toolkit for building intelligent applications Thank you. Okay. All right. Well, we're basically out of time at this point. Thank you so much for that presentation I love the demonstration And so we we do need to kind of go ahead and wrap things up. Oh, there's one more question from Muhammad Let's see we get to it. I don't get the idea of how cogito relates to Kubernetes can you kind of bring those two worlds together and explain what we did there? Yeah, the whole point of bringing them together is that the business automation is needed everywhere and one of the main themes of cogito is We had like three main themes is cogito ergo domain to focus on the domain aspects of your business cogito ergo powers to Empower developers and business users with all this information I presented today And the third thing is cogito ergo cloud Which means that if you think about your business think about cloud because this is where it actually happens There is no turn back for it. So that's that's why we wanted to bring in the business automation Which are processes decision and rules to be as likely as possible as fast as possible to actually fit the needs of the cloud requirements Okay, definitely ultra fast ultra small running in that context of a linux container Dynamically scaled out across the cloud makes a huge difference. Exactly. All right, again. Thank you so much for your time It was absolutely fantastic. I really enjoyed the demo I'm going to have to find a way to copy it for myself and I do look forward to getting my hands on those visual studio code extensions there Thank you very much. Thank you