 Proste, kako se počutilo? V rovni vse, sva čustavne, da se napravim v ovom letu. Tako, ovo počutim, da se počutim v tako, da se napravim v tako, da se počutim v tako, da se počutim v tako, da se počutim v tako, da se počutim v tako, One is today, and today we will focus on architectural aspect, why micro-profile in Jakarta exist is important together, and why it is important to have both in the same application server, to be able to migrate from a monolith to a micro-service oriented architecture. Because Jakarta EE is the standard monolith architecture, and micro-profile could bring you micro-service architecture, but it's not all or nothing always, but there is something in the middle, and we need to migrate our system. Today is extremely focused presentation on the architectural side, and a reason behind, and what you find in our fly, facilitated this process and so on, is not a lot of example, I have a few, and we will see if we can have a look, but tomorrow I have a workshop at 12 am, and please join me and let's put your hand in the jam, and we will try to migrate quite complex Jakarta EE application, of course we don't have time to migrate a real world application, it's just an example, but an example that could be very useful to understand, which is the steps for migrate from an architecture to the other, and we will do that using Welfly for sure, but anything else that makes sense, if we will have time, I will demonstrate how with micro-service and micro-profile, you can mix things, and for example you can have part of your micro-service on Welfly, and part on Quarkus, and maybe on Node.js, I don't think I will have time also for Node.js, but anyway, just to get you the idea that micro-service architecture is agnostic from technology and web server or application server point of view. So, the presentation has basically three people, me, that's me, and well, I joined that ten years ago in IAPI team and Wildfly team, that formerly was a GeBoss AS, Wildfly born in 2007 as name, but is just a brand of a long, long time working GeBoss AS, started in 1990. And I joined as core developer, and then I switched to the dark side of management three years ago. My micro-focus is exactly on coordinating the effort around micro-profile in Welfly, and it's a lot of fun, both on technology side and the people side, because, you know, different technology and different people coming together with different background, and really a lot of fun, and we are achieving great result, I think. And so, thank you very much for everyone who participate to this effort, a few of them are in the room. You find me everywhere, GitHub, Twitter, LinkedIn, or whatever as my stay, because I'm not so young, so I took the same nickname everywhere before anyone took it. Who is Wildfly? I don't think Wildfly need much presentation. As said, he is a brand of 2007 about GeBoss AS. He is probably one of the most well-known Java EE and then Jakarta EE application server. Open source, first of all is open source, and second, probably it works like a charm. Who is Jakarta EE? Jakarta EE is the open source, the branded version of Java EE. Two years ago, Oracle stepped back from Java EE and donate the specification to the community. Eclipse Foundation took them and founded this effort called Jakarta EE. It is fully compatible with Java EE8. It is as open specification, as open source TCK and process. This is the main difference between that and Java EE. It is no more proprietary and driven by Oracle, even if it was a community with a lot of participation. That was one of them. It is open source, open standard, open process. It could be a new bright future for those kind of specifications. Why is it important? Nowadays, if you talk with a young developer and ask how he wanted to start his new enterprise application, no one or a few of them talk about Java in general. Everyone talk about Node.js or Python or anything else. But Java still matters and is at the time, I think the last steps that I looked at is the second language used in GitHub. And Java EE still matters because there is tons and tons of installed products using Java EE and so compatible to Jakarta EE. And we can ignore how much code is out there written in Java and Jakarta EE. We will see during the presentation that we can throw away everything because it has costs, basically. And with micro profile, micro profile by its own definition aims to optimize enterprise Java for microservice architecture. What does it mean that it means that it provides standardization of best API already present in the community and in the market, driving fast innovation and having a piece, a pace of release much more quick than Java EE or Jakarta EE. Basically, micro profile has three releases per year, minor releases, one major per year, more or less, three minor or major per year. That is quite impressive. I am in the Java world since more than ten years. Ten years as a redactor, but much more than that. And as an old dinosaur of Java EE, three releases per year is quite impressive because it is not a release of a product, it is a release of specification, it is a release of standard and it is really impressive and it is driving innovation throughout them. That is not a joke to keep the pace when you are the implementor but still is interesting. Basically, micro profile is composed by value specification. Java EE, JSON, JAXRS, JSONB and so on are also part of Jakarta EE. So it is exactly what it aims to do. Optimize Java EE for microservice. So using the best part, the more agile part of Jakarta EE and on top of them is starting more. And more is fault tolerance, is metrics, is propagation of token and the rest client and so on. And this is the umbrella, the platform, the last release of micro profile 3.2. But there is also other specification that is part of micro profile effort even if it is not yet part of the umbrella it will be part of the umbrella of the standard. So you can declare to be micro profile compatible just implementing the umbrella part but the other part is interesting too because as a reactive part and not only reactive there is more than those three, I put just three but there is more than those three. Why I am mentioning that because this demonstrates that innovation is always the key point and the driving idea of micro profile effort as standard. I give a slide here to mention who is participating micro profile and who is participating Jakarta EE. Basically is almost the same company, a few more for Jakarta EE but everyone in Java enterprise world is participating the committee. Even if there is a few people in the community more active than others but that's quite normal in any community. I'm saying that just to underline that micro profile has strong support from the market and from the community is not to be considered something less supported than Jakarta EE. Is as almost the same support both are on eclipse foundation but they aims to solve different problem. A question that a lot of people ask me when I talk about them Jakarta EE and micro profile is if and when they will join again because micro profile born as a spin-off of Jakarta EE or Java EE and then there is a lot of discussion around rejoining the effort and bring into Jakarta EE 10, 12, I don't know, almost the same concept. The moment is a discussion that is going on time to time in the community. My personal belief is that will not make much sense to bring them together again because they solve different problem or better they solve the same problem in a different way so make sense to have two different standard even if collaboration and commons specification is right and there. And now and announce because micro profile beta 1 released last week support micro profile 3.2. That is the first release of Wildfly beta but that still release for the community with a full support for micro profile and when it's a success for us but more important it's something that is perceived as needed by the community. This is a comment that I've got back in micro profile community when I announced this and well can be read in a different way but I wanted to read it in the most positive one and well, we covered the gap and we are one of the most used Jakarta EE, Java EE application server and now we support also micro profile and I want to underline also because there is a lot of implementation of pure micro profile or pure Jakarta EE or maybe something in the middle so Jakarta EE just a web profile so a reduced set of specification of Jakarta EE and micro profile. Wildfly support Jakarta EE full profile so all the specification of Jakarta EE and also micro profile and why it's important because architecture evolve in time well, I'm Italian and I love cooking too so this slide is when I see this example I can't resist to put in a slide this slide basically say that in the 90s we wrote spaghetti code spaghetti, well you know what is spaghetti code probably is something that growing up and up and up and become difficult to follow follow the code or interact with the code or even understand the code then so we move to a growing monolater and it's called lasagna architecture lasagna because is layer one up the other so something that separated layer that should be fine but if you are Italian or if you have ever visited just an Italian restaurant and you get a lasagna you easily understand that those layer is not so well separated and should not to have a good lasagna but not a good software so we move to microservice era and the Italian dish that we select is tortellini tortellini basically is pasta with something inside typical is meat but every tortellini every tortellino is separated from the other but the sauce make one dish together and you can have just one tortellini of course you need a dish of tortellini and this is the idea of microservice microservice is single single service doing something but to have a good dish you need a lot of tortellini working together in your dish so what concept do you have in common? reuse or try to reuse? yes spaghetti code spaghetti code born in 90s and is not bad at all is basically what we call a double jet oriented programming that became a spaghetti code but it's object oriented programming so reuse inside the same application or team libraries or team so basically classes and libraries born to use from third party a library what is just a set of object oriented code that you can use from third party and libraries and libraries and inheritance and all the object oriented stuff and become a spaghetti code basically because you lose the control so let's move to layered product and so we want to reuse on different layered team so any team is responsible for a layer so I have the presentation layer the classical MVC model view controller there is someone that is responsible of the model someone of the view and someone of the controller and each team need to reuse what the other team does and component born for reuse from third party that's not be a great success we will see in the next slide so let's switch to microservice reusing different system even geographically distributed so basically is almost the same idea totally different implementation but almost the same idea to reuse something and this time we reuse a component that is maybe geographically distributed and API subscription is born to reuse third party software so why I say try to reuse because of this oriented born to reuse code inheritance and polymorphism defines the boundaries private and public copy define the decoupling and always violated always always in every in every manner that you can imagine and and reuse is violated in any object oriented spaghetti code so layered product born to reuse libraries and layers public code API define boundaries and decoupling and then we invented SPI reflection security stuff and to violate the boundaries and the decoupling that we invented and finally nowadays microservice rest API define boundaries and decoupling we are still working on how creatively violated them but I think we are working on it and we will invent something else in 10 years but today we have microservice so the difference in a slide is quite easy to understand a monolith as a user interface a business layer that interface and a single database this is the classical implementation or definition of it microservice architecture a set of microservice that is distributed and have its own database and the only communication is between microservice and microservice could be geographically distributed there is a lot of definition around there about what is a microservice someone tell you that should be less than 100 line of code I think line of code is always a bad measurement for everything from productivity of people to what is a microservice or not basically is something that define a remote API and is stateless should be stateless defining a remote API not necessary rest but most use this rest and have its own data that could be a database or not but has its own data that is not exposed or is exposed only throughout well defined API so is the microservice the solution for everything well I think the solution for everything is to write good code in general because you can creatively and easily create a sorry well for two reason sorry I forgot this slide for two reason first of all you can throw away everything today and the same the same system working tomorrow there is a lot of investment in a building and you can you can explode some bomb and destruction it but probably is not a good idea because there is a lot of investment maybe it's better to reuse the same and have more beautiful apartment just with less but what I was saying is that you can easily get the microservice spaghetti if you don't write a good code because you can write a lot of microservice every microservice needed to communicate with other microservice well and what I'm saying exactly what we use to do with classes we just moved to the network the same problem and it's not necessary easier to get problem on the network instead of in the code we moved probably responsibility from developer to DevOps that could be good if you are a developer probably not good for people who have to pay DevOps because today DevOps is paid a lot so what you need to do to redesign and monolate to a microservice I identified three steps and they are not the only three steps but probably the most important in my opinion and all of them is not easy step first of all you have to identify services and it's not a joke it's the hardest part probably because when you look at your monolite you have basically two different problem looking in a monolite you have to understand it because again it has become years by years like a monster I perfectly remember my previous job is 10 years ago now but I have a lot of contact with my former colleagues and I started 20 years ago more or less on the first G Boss AS a big monolite producing document and financial document basically and they evolve and evolve and evolve it and they are on the latest version of our product by the way but still is incredible big system and no one really no one of my former colleagues is able to define boundaries boundaries of each layer and so when I asked them I had dinner with them last week and I asked why don't move everything to microservice the funny but real answer is because we don't know where service begin and where service end but they are very good engineers I'm not saying that they are bad they just manage a 20 years old big monolite and so they know that they should move to microservice and we discuss a bit and identify service is the first step and it's something that they have to do then define the API and this is not a joke too because you have to define clear API and clear boundaries with the API and divide things throughout API is not easy is not easy whatever you develop your system you can develop your system as spaghetti code or as layered code but defining API is always the hardest thing and then that was my suggestion in that dinner look at progressive migration is not all or nothing is not like that never in IT at least in serious IT if you have just a quick start or an example you can rewrite it in an hour fine throw away and rewrite it but if you have 20 years old big system moving of million euros you can do that never and so the question is why is important to have a server where jacarta e and micro profile coexist exactly for the reason I mentioned for a progressive migration and to be able to refactor to micro profile migrate step by step is very important but also adding micro profile feature to a monolith is very very important is two different things at first look it seems the same things but progressive migration means splitting a monolith in micro service is one job and the other one is to add cloud native feature to the monolith adding cloud native feature to the monolith micro profile is possible and should be done probably as first step of enemy migration because it will permit you to monitor your monolith and understand better your monolith so I've tried to define ER for use case the first one is the one I was mentioning and is about adding observability adding observability what does it mean basically means to add some cloud native feature to your monolith that will permit you to monitor it those are called metrics alt check tracing we will see what I mean there is a second use case that is adding fault tolerance one of the worst problem that a monolith could suffer is implementing fault tolerance because big monolith built their fault tolerance basically on cluster and cluster is today the easy selection in a cloud native world but if you move your monolith to the cloud you need to have some fault tolerance mechanism because whenever you split monolith into microservice one of the first behavior that you have is that there is much more communication in the network monolith everything is in the same server and if you don't use if you didn't use some strange things like eJB remoting or IOP and everyone has used it but anyway if you refactor it to stay inside the monolith so communicate only between layers all the communication is internal to the server and is easier to track so is all or nothing if the service doesn't work because the monolith is not working when you split in different service there is a lot of communication on the network and each service could fail fail for good reason because you are using a new version of that service but of course if you are in 247 system so you can't stop it and you are moving to the cloud exactly because you don't want to stop it never you need a fault tolerance mechanism whenever a service go down third use case is using other service with REST client when you split everything in service you need some mechanism to invoke easily other services or third party service and REST client and other API in micro profile could be used inside the Jakarta monolith to invoke external service that is very important step because we was talking about a progressive migration but to make a progressive migration you need a clear and easy mechanism to invoke new service or split service from the monolith otherwise everything is too much hard and last but not least use old code as a service what I mean we will use old code as service there is part of code that have been developed years ago and or layer by layer in the last years that you should not throw away and maybe you can't throw away a quick example from my background as engineer I am used to manage the JCA project inside the world fly JCA what is basically JCA is a specification to connect to external system inbound or outbound there is a lot of development around the JCA to connect proprietary external system we have a lot of customer who has written their own resource adapter who has written their own resource adapter and use it to communicate inbound or outbound with the application server and those investment are in a lot of case close the source from some provider that maybe is no more active in the market and so on and so you can't throw away everything but you can isolate this piece of code this JCA part so connection with external system and make it a service and so you keep a little piece of jacarta and you will make service on top of it this is the reason because line of code definition because for sure those kind of service could not be 100 line of code but is very useful in progressive migration because again you can destroy your your building in one bomb so time is always a problem so anyway let talk about those use case if you will join me tomorrow in the workshop we will try to implement those for use case today I will give you just an idea of what does it mean adding observability is very very easy basically you can use trial to adding some feature to any code that you can access also in monolith matrix to measure or count access to air source to to check the old state of service but this old state of service could be better or even a connection to database or whatever you want because is something that you wrote as code and use open tracing to see where the call and where the network API as called and the adding matrix for example is just matter of is a point or no matter of adding a few annotation and adding this annotation this is classical rest API deployed on web fly and deploying this you get you get matrix count for this call and you can use standard tools in cloud native to monitor it, I mean Prometheus or Grafana or both and measure how much time this has been invocated and so on and so adding this is the first step because okay this is a new world application but if it would be some complex stuff in monolith you can adding various step of matrix and understand how much calls are going on in various branch of your code and trying to reverse engineering at some extent your monolith and understand how to split service because remember that one of the hardest things is to understand where you have to split to understand where you have to split sometimes you have to reverse engineer your system because probably you didn't write it a lot of you are too much young to have written a monolith but also because my colleague had lost control of the monolith because too big and the same is about adding full tolerance full tolerance is single specification in micro profile that permit to do something like that for example this is again in a low world with a random a random fail if you invoke it without those two annotation or retry and fall back what happens is that time to time you get a failure and this is not acceptable of course in a distributed micro service application because if you stop your service again what I already told you if you stop your service you need to access it but you can add or wild fly jacarta e application those retry and or fall back annotation that basically retry for three times but is configurable number of times the same method before throwing an exception and fall back in case of exception call another fall back method that is for turning a managed error using other service with rest client using rest client and open api you can add more and more external call to rest api and to many and manage your rest api documenting your api usually called as a service you started to using much more specification and again my example is to reuse a gca or slapter code but adding matrix adding fault tolerance adding some call to rest client and of course is using jaxrs, json b and so on is a bit more complicated example doesn't make sense to show you in a single slide we will try to do that during the workshop tomorrow let me remark again that sometimes throw away old code idea is understandable but company made big investment integrating proprietary external system maybe implementing jca we want to refactor to microservice and make it scalable so what we can do we encapsulate this piece of code that is pure jacarta using a very old specification because jca is one of the oldest specification but providing fault tolerance providing matrix providing all the stuff that make it cloud native hybrid cloud native of course because jca piece of code most probably can't run on open shift or doesn't make sense to run on open shift it will run on a local or set of local machine connecting to the external system but building an hybrid cloud with your local code written in jacarta e but ready for the cloud so we have 10 minutes so maybe for a few questions if you have but just today take away you can use jacarta e in the micro profile together is the first take away is not all or nothing and is even if I would strongly suggest you to use wildfly for that is not mandatory even to use only wildfly you can use wildfly for jacarta e and interacting part but all the other service that you call could be written in corcus if you want to use java but also Node.js whatever the composer monolith is more than using a she source you can take a monolith and try to the composer without thinking you need to identify service boundaries and avoid distributed spaghetti code because distributed spaghetti code is even worse than spaghetti code itself micro service require design Mercury is the smallest planet in our solar system ok but asteroid are not planets design your micro service for being complete for itself at least again 100 line of code is something that I don't like as definition because splitting too much is like using too much inheritance in object oriented to get back to spaghetti code don't overuse any feature that new technology give you never think about that design also code can be cloud ready you can use micro profile to add jacarta code cloud feature like observability and fault tolerance complex system are built on different bricks there is not absolutely right or wrong solution just use the solution that fit your problem design on your problem not on your technology technology is a tool a tool to solve problem do not throw away everything there is case when integrate old code is a good idea because old code is maybe old not elegant or you don't perceive it elegant but maybe if you ask someone from the 60 perceive it elegant but anyway old code is not always the bad could be reused should be reused should be integrated in a more modern architecture and existing jacarta e and micro profile inside wildfly give you all the tool set to make it thank you and see you tomorrow any question we have 5 minutes for the million size what is the challenge well it's yes sure so we will see if I understood the question the question basically is how much effort you need to migrate mid size jacarta e project to a micro profile one the question is in general monolith written in java at least whatever that could be just based on servlet or jacarta e or whatever migrate to a modern system micro profile based well it's almost an impossible answer how much effort depending on the system itself how much is already defined in boundaries a general answer is that progressive migration give you the opportunity to migrate step by step and you decide how much effort to put in this phase of the project because a project that work a project that stay around for 20 years like the one I mentioned of my former colleagues that is a real year from 20 years is continuously evolving and so you decide how much effort you need and you want to spend to evolve your system and how much you want to evolve it that is the reason because something that support hybrid pure java e or pure servlet like wildfly and micro profile together permit you to decide where to cut off you decide when you start and when you finish to have an agile approach so decided to have a few sprints on refactoring it and you see how much you are able to refactor the good news is that if you work well the system continue to work because on a wildfly supporting micro profile from a wildfly 19 beta 1 you have the opportunity to have hybrid things and so mix and match between old and new style and so you can decide just to refactor 20% of your system because you have time for 20% and then you have 80% on a monolith and 20% on micro service and next step is to become 60-40 and the next step is 50-50 ok, again I understand your question but really depends on your system is really tailored on what you have and what you want to get is not about API basically API are just a set of tools maybe I'm not fully understanding if you want we can discuss offline we are out of time so thank you very much for joining