Here are the steps to get this set up in your own environment:įollow the appropriate JRebel Quickstart steps to get the JRebel agent installed and set up – either standalone or in your IDE. If you want to see my example for yourself, I’ve checked in a Java EE 7 version of my demo in to GitHub, with rebel.xml files already generated. To really get an idea of how useful JRebel can be when developing microservices, it really needs to be experienced. For a single server, there is a -nocluster option to disable this but a major part of my demo is to show off the CDI Event Bus, whereby CDI events can be pushed over the network to be handled by other JVMs in the same cluster. This comes with an unavoidable startup cost because of the need for discovery of other cluster members. Payara Micro uses Hazelcast for automatic clustering. What this meant for my development process was that I needed to start Microservices A and B – wait for them to initialise, and then start a second instance of Microservice A to show that the singleton bean would only run on one instance. My demo had just two microservices, though part of that demo was intended to demonstrate an early implementation of a clustered singleton bean. Starting multiple instances on the same machine Even with very lightweight demo apps, the pain of a couple of seconds to rebuild, followed by another couple of seconds to start is made much worse when several dependent services are involved!įor Payara Micro, there are a few ways this can result in time wasted: Now, using the Maven plugin made such a difference, I thought this was as good as it gets! Build a project in a couple of seconds and start it in a couple more – how much faster could it possibly get?Įven though the use of the new plugin had managed to get rid of a huge amount of time wasted during build, developing my JavaOne demo allowed me to experience some more “real world” pain of rapid minor changes with an application spread over a couple of microservices. I had found this to be so time consuming in the past, that I never bothered during development. Previously, if you wanted a single deployment unit, you would need to use the Maven Exec plugin to launch Payara during the build and output an Uber JAR. One thing that I was very keen to demonstrate – aside from some nice new features in Java EE 8 – was how quick and easy it is to develop and build MicroServices packaged as Uber JARs with our new Payara Micro Maven plugin. Way back at the start of October, I was feeling the familiar sensation of panic and dread that only happens right before I need to give a presentation that includes a demo! In the end, there were major problems with the AV setup in the room I was allocated, so even arriving as early I could to set up didn’t give the techs enough time to hook up my laptop successfully. Just recently, I have had to admit being wrong.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |