 Hello everyone, thanks for joining us here today. Here we have Daniel O for our first session, who will speak about hybrid server development using Quarkus. This is a pre-recorded session, and we will post a YouTube link in the track chat, just in case there are issues with the platform. So you can still watch the video and then come back for the live Q&A session. And if you have any questions, you can post them in the track chat, and we will try to answer as many of those questions as we can. Also? Cool. Right, I'll share the video then. A practical example, technical tips, and application development demo. Just feel free, enjoy, watch, definitely. Alright, move on. So in order to understand why we needed Quarkus in Java to develop a hybrid serverless application development, just take a look at that, where it came from, and then... Welcome to join hybrid serverless development using Quarkus session. So my name is Daniel O. I'm working for RedHead as a technical marketing major. I'm a special writer, a cloud developer at that, and as I develop some practice with lots of regular technology and open source project. I'm also responsible for CNCF ambassador, as well as DevOps Institute ambassador, in order to evangelize lots of cloud-never architecture and the practice and application reference with many enterprise developers and also IT operation. I recently published a practical answer to give some guidelines on how to automate the IT operation team's task and also developer activity for their daily work. Just feel free to follow my Twitter and subscribe to my YouTube channel, Vinny slash Daniel OTV. There are lots of practical, technical tips and application development demo. Just feel free, enjoy, watch, definitely. Alright, move on. So in order to understand why we needed the purpose in Java to develop a hybrid serverless application department, just take a look at where it came from and then where Java came from here. So back in 1995, Java was born and then a lot of things came up at some moment. And just a few years later in 1999, there are perfect time to sell a software hardware by many vendors to build up and spin up your infrastructure and to run the Java application on top of that. So for example, we needed to have a million to start with the infrastructure preparation. Also, we need to spend more than $80,000 for each year to maintain application server and web server and database, including hardware, infrastructure layer, CPU, memory, et cetera. And architecture perspective, there are one monolith application architecture which includes all functionality in a single application artifact also known as wall file and EF file. And then the architecture pre-focus on density, I mean high density to how many applications can be running on the number of applications server with the state of ability. It doesn't matter the consumption of the number of the CPU memory and disk storage, et cetera, like a research perspective. In the meantime, the IT trend and technology kept evolving from 1995 and recently in the back in 2006, we were seeing Amazon serve the first public instance like a virtual machine, which means that the startup company or even in a project company really looking to Amazon provide a service without purchasing new infrastructure software, infrastructure hardware stuff. In 2009, Java 6 was came up with a lot of big changes to develop the application quickly easily like EJB, VIN, et cetera. In 2013, Docker container and Kubernetes 2014 came up to change the world. The people totally moving forward to new immutable infrastructure to run your Microsoft's application and cloud-native application. So according to new technology and IT trend, so an infrastructure layer also changed that, which means enterprise doesn't need to purchase a new hardware to run your business application with Java. But instead, they just consume and use a public instance like Amazon, like Google, Microsoft, and then they just need to pay as the amount of the resource consumption just like pay as you go policy. And then this is the reason why more and more enterprise company looking for the resource management with a small memory buffering and a fast start of time. If you don't need it to your application, they should be terminated automatically, which means you reduce your cost at the end. But with this change in IT technology and let's take a look at that the Java architecture perspective. So we have got the Microsoft's architecture with a 12-factor, which means you can run your application functionality with a single application package and you have a short time to change your application like from months to days and the small memory buffering like 100 megabytes and a start of just a couple of seconds to start off like a spring with the application. The problem is the setup piece of this architecture, still Java has dynamic behavior and then you can run it on JVM. This is not a perfect architecture to optimize immutable architecture like a Kubernetes and Linux container. There's no change at all. The reason why is the design perspective of Java. So Java is designed for high buffering, running on your application. There's no stop, no terminating, except for some hardware or software upgrade of patchwork, which means your application should be running on all the time, like 24-7, even if the application doesn't need it to serve all the time. So memory buffering, which means you need to spend lots of money to have that kind of buffering like a heavy resource management, like a CPU memory, you need to spend a lot of money to do that. And also, the design to be long learning process in 24-7 and no exception to that and scalability, no scalability, but a little bit more scaled up and high scalability. It's also much expense of start-up speed. Sometimes you need to spend about five minutes to start your application. Maybe that can be happened once a month or once in six months. It doesn't matter. But now we change the market service application and cloud network application architecture and the technology stack. You could deploy application feature and buff fees for improvement and enhancement every single day or even ten times maybe per day. So start-up time and long learning process is a good benefit or feature of this era. And one more thing, Java was really great for the back-end decades ago with the rich dynamic behavior, beautiful, mutable system. You can package your immediate file also known as by-code and then you can run that by-code any application server across a web architecture like a worldwide web in a web browser and et cetera. But this is not perfectly matched to immutable infrastructure like a container technology and Kubernetes. So just imagine that. You have one same application and one time packaging, but you need to deploy a thousand times on your cluster and Kubernetes will probably manage this platform. Same application, high scalability and high performance and you just start-up fast and a small memory put free. There's another requirement feature to run immutable infrastructure. So it's a Java with a container technology that is not good enough to meet the developer and IT operation team requirement. That's the reason why Node.js and Go is a more good high density in the same work node in the Kubernetes cluster. So let's take a look at that the Java with lots of using in-memory, but Node.js Go is maybe twice in a triple time high density rather than Java application with the same research capacity. Another reason why more people move to develop Node.js Python to implement the serverless application and the function on time of the Amazon Lambda. This is a recent survey from the serverless benchmark report, Amazon Lambda 2020. So more than 50% is Node.js popular language framework and the platform to develop your serverless application. And also as the serverless landscape standpoint, there are a lot of tool framework and platform is manageable or managed the platform. So the big concern from developer and operation team like a DevOps team to find out the appropriate tools framework. For example there are more than 7 to 10 million Java developers to develop an approach application from existing one and new Microsoft application with the Java technology out there and then they needed to optimize existing Java application to deploy fast platform or serverless platform in order to do that they need to own tool and they need to make a choice which tool should be perfect for their Java technology. So as a result it's too many choices but Java has tried to improve itself like try to fill in more Linux container technology in terms of the memory realization and CPU realization also there are new garbage algorithm like Shannon Doher and then there are new process compiler for like Derby for Android operation. There are lots of these huge to enhance Java technology to fill in the new IT train like a immutable infrastructure in the Linux container and the microservices and it's a public cloud et cetera but still that's not good enough so that's why we needed something different with the Java so Quarkus released up in the world just one year ago and Quarkus a little bit more focused on enable Java developer to develop cloud-related application and microservices and serverless with the event driven architecture as well as the traditional Microsoft architecture so Quarkus really focused on optimizing the center part so microservices serverless and just start a millisecond with the native comparation and then just under less than 10 memory put between like a 30-time less than or even 100-time less than memory put between compared to using a cloud-level Java stack and you can also have two different runtime like a JVM also Graviac so how does your framework start in the meantime so Java application in a build time they needed to create the bytecode comparation also known as the the immediate code and then intermediate code and a packaging using some tools like a Mabel, Gradle and there I spent a lot of time in this step the build application for developer and then what happened when you run that application on your production environment even your local machine try to load your configuration file and enable or disable some feature and also try to parse annotation and processing descriptor and the build framework metamodal and proxy etc in the end you're going to start the actual application with the thread and pool so from one to five step it's not related to actual application style so how does Quarkus change that and so Quarkus makes a scene job rather than the fetcher and then and also you can have a native comparation feature with Quarkus which means that you print the old necessary task you can do that at build time rather than runtime so take a look at the right side of the runtime you just need to style your application actually so just like is a cartoon wait so you just save it and your code is running and it's still Java yeah that's cool it's a super something Java and that is Quarkus so Quarkus enable comparation a little bit narrowed down so first thing you need to compile to create a the thin jar and the provision is created and then you can run the JDA hotspot runable image and also you can have native comparation along with the ahead of time strategy and in the end you can have a native executable file like the Go program language platform and then you just run that application without JVM so today I'm going to showcase Quarkus Funkey to develop subless application and you can write function with the standard portable Java API so there are a lot of choices I already mentioned earlier so you can develop Java and you need to change some configuration even some annotation to deploy specific subless or fast platform so this is a really big burden for developers so they are maybe really prepared to subspecify subless platform like KNA with Kubernetes or Amazon Lambda or Google Function or Azure Function or any other subless platform so Quarkus allows Java developer to have a portable Java API that can be deployable any subless and fast platform this is a new strategy of the Quarkus application framework so you can see here you can just deploy Quarkus application with the Funkey using HTTP protocol and also deploy Amazon Lambda and Amazon Lambda and KNA event and also HTTP with the Azure Function and Google Cloud platform I'm going to talk a little bit more about in the demo all right let's jump in the demo how Quarkus have developer to write the function for multiple subless platform including on plan let's get started okay let's create a new application project using Quarkus to an ID tool and first of all we're going to add the project group ID and artifact ID and I'm going to leave it by default and just generate the application code and this on my 10th directory and let's take a look at that the generated application code here so this is a Raspberry API just endpoint hello and a return hello with a simple application let's try to make sure this application works properly and just run the main command line and Quarkus is dead mode and it takes couple of seconds for the Quarkus application here let's take a look at that you have a CDI in the rest easy by default and Quarkus provide one of the functionality to develop Microsoft's application here and when you add access to the hello endpoint you have the hello return code and let's try to add another endpoint as your function here in order to that we're going to add a new CDI bin here the name is a greater service class name and we're going to define new method the name is gritty we have some one parameter like a name and return the text message such as welcome with the dead name as a parameter and then for hybrid serverless development with the Quarkus just a simple text message with the parameter name and it's a simple just the CDI bins I think it looks good and go back to resource file here and inject the CDI bin using inject annotation and the greater service here the instance name is service and then just copy existing endpoint and then we're going to just try to tweak what we need so path annotation try to have a new endpoint gritting and with the parameter name this will be a new function method here but before we do that we're going to just implement a new microsoft application endpoint using rest API on Quarkus and then just invoke the service with the gritting using parameter name it's good and just try to access a new endpoint here the hello.gritting and the name let's say Daniel and the Quarkus automatically repackage rebuild and restart your application automatically it will be fantastic for developer okay that's really cool so let's try to convert this application in order to do that we're going to use a fun key one of the Quarkus extension so just add a fun key annotation here and then but you are Quarkus in one time still running on top of that and then we just use a fun key annotation here once you use a fun key annotation you don't need to use the path annotation any longer and then the function name is a method named by people but you can also define your specific function name such as a hybrid in this case so and you can still use the parameter and cdi beans here and we're going to delete the unnecessary import here your application code is pretty simpler than previous one and let's try to access the hello end point to invoke your function so now you're going to be hello the same result here and then let's try another function like greeting as a possible method here and the parameter Daniel O in this case so h2tp and the method and we're going to use 8080 port and end point is a hybrid okay so we're going to result hello Daniel for hybrid serverless development with a partners pretty awesome so you can package this application deploy Kubernetes native the K-nave serverless but for that we're going to package this application as a native native executable file using native compilation this is one of the beauty of the partners to packaging your application to fitting a serverless platform or a platform because super fast small tiny memory buffering is a pre-effective way to manage your serverless application or function on top of the Kubernetes cluster even managing the fast or serverless platform it takes normally a little bit longer than general made good packaging to create the fin jar because you packaging fin jar and then you need to add all dependency to create the executable file and after that you don't need to execute this executable file on the JVN but instead you just run this executable file on the JVN so this is the using ahead of time strategy I already mentioned earlier in the slides there so this you have a still option to deploy your corpus application and Microsoft's application on top of the corpus using fin jar or running on top JVN also executable file on private app so run this application just executed with that file but here is we just need 34 millisecond to start it's super awesome just imagine when you run this application as a function of a serverless platform it's pretty awesome and then let's try to deploy this application I already packaging the container image like a docker and also push it into external registry in order to deploy this application I'm going to use the container platform for and create a new sample project hybrid serverless and I'm going to pull down external registry such as Daniel O and hybrid serverless and raise care and the one thing you need to do is to select container service which means deploy this application as serverless using container project and then the your application will be started oh it's already started you just needed to seven millisecond to start and just so you can change the label like an application I run time equal which means you can show this part is based on the purpose compared to the other application part alright let's try to access the endpoint as a function endpoint hello okay we have the same result as a liquid and then the next the other function is greeting but for today I'm going to readjust the browser size to show the same time to call endpoint here from my ID tool here I'm going to create a new terminal here and just using same HTTP command line but in this case I'm going to use URL in the container platform just copy there from the browser and paste here and let's try to make sure endpoint hybrid here and let's try to wait to scale down to zero automatically as a part of the feature of the serverless operator and it will goes down in a second by default all the second will be scaled down to zero okay it's scaled down and then just invoke endpoint and the part is automatically start up and then we got the same result but it takes just one or two seconds that's why the big comparison is a really cool option to build and deploy your Java application alright next step is let's try to deploy the same application different serverless platform such as Amazon Lambda you know to that we're going to add another form key extension here so add a new extension and try to search in form key and here is a form key Amazon Lambda and there is a Google Cloud function as well in this case we're going to use Amazon Lambda form key extension here so once you add your extension here and then we're going to add one property file the part as the form key export is a function name so for example hybrid in order to deploy to Amazon Lambda we're going to deploy the one function at one time let's try the packages application I'm going to skip the unit test because the unit test expect the return code hello but we're going to change that multiple endpoints at a moment and once you package your application and you go to target D3 there are generated some YAML file you can run that on your local machine using SAM CLI and also there are batches quick to deploy your application using Amazon Lambda CLI to remote Amazon Lambda let's try to go to Amazon management console here and we're going to use the IDM the Amazon name and I actually already created one low to deploy this function focus application here I just copy my arrow here and then just go back to Amazon Lambda and then just make sure there's no function at this moment and then just edit that Amazon low ARM name in an energy batch script here just to run this batch script with a parameter create or delete so in this case we're going to create the new function based on this application and onto Amazon Lambda here it takes a couple of seconds to deploy your application okay we got a successful return here let's go back to Amazon the web amazing console and reload okay we got a new function here let's try to test this application and in order to that we're going to configure test event let's say event name greeting and the parameter name like my name Dan Oh in this case and it created the test event and it involved the test just expand the detail okay welcome Dan Oh for hybrid subrest environment with a same result and then let's try to delete this function once you test and you don't need to use that function in order to just the same batch script just delete and your function will be automatically deleted which means you don't need to worry about the name and let's try to call a different function like hello and we change that but when we re-package this application the managing batch script will be generated once again which means the Ar and the Ar name will be deleted we define previously so you can also parameter that low name when you run the batch script here and try to delete once again to deploy this application as a function on top of the Amazon Lambda okay it takes a couple of seconds to deploy new function hello to Amazon Lambda alright we just got successful message here go back to here and reload page and we got a new function here in order to test the function let's say hello and then the parameter as you know parameter just be nothing parameter and create that thing and just click on test and the detail result and here is a hello just like we did in the local environment and also there are more Quarkus extension with a fun key here go to Quarkus.io and then click on guide and fun key and you can find that here is a fun key HTTP application and you can have a multiple extension to deploy Quarkus application as a function use a fun key extension here Amazon Lambda and the google cloud function and azure function using HTTP and also you can deploy Quarkus application as a function using fun key and can event you can integrate can event like a backend post up top message etc. alright let's go back to slide there to recap the Quarkus aka Kubernetes native Java stack that enables Java developer to develop Kubernetes native Java application because Quarkus will be more focused on container first technology which means container Quarkus optimizes Java stack and make it very efficient for container and cloud and server less with tiny memory footprint consumption and super fast start up time and response time and also as you already saw Quarkus provides live cooling functionality which means you don't need to rebuild, package and restart your application runtime during your code. This is really awesome for developer in the end, this feature includes developer's productivity and also Quarkus enables developer to have imperative and reactive application at the same time using different annotation for example you can add Inject or CDIB or pass annotation to explore the RESTful API just like the traditional Microsoft application development but also you can add streaming or incoming outgoing annotation to interact with backend Kafka messaging server and there are a lot of extensions you already saw, funky extensions but also there are lots of extensions like here but still Quarkus is the Java which means you don't need to worry about the still learning curve to catch the technology to develop new Microsoft's application or serverless application on top of the Quarkus there are lots of extensions you can easily add a new extension such as metrics like department deals and a Yeager and Kiari and then there are key clock and for single sign on and micro profiles, some Java jacara EE capability and there are more and more and the open source community project is qualified to use for developer and Quarkus actually is part of Render and Luntime portfolio so Render and Luntime provide the cloud of Luntime such as Spring Boot and Node.js and Quarkus as well with the fully support so if you are looking for the project grade support when you use Quarkus to run your application in production feel free to reach out to Reddit sales representative to discuss more details so if you are really more interested about how to get started Quarkus application development on your local machine or even your enterprise companies there are three great resources here the first one IDC web validation to compare the performance with the other cloud of Java stack and also their interactive service portal training website just go to Bidney try dash Quarkus there are lots of practical scenario you can go through by yourself and once again Quarkus I.O is a starter to generate any application from scratch and put any extension to have your application capability alright thank you for joining this session and now if you have any question and any curiosity of the Quarkus and server lesson please put your question on the chat box and I can ask that and have a good rest of the day alright any question please thank you Daniel for that talk and we will now take a few Daniel will now answer a few questions here sure yeah thanks for that we cannot hear you I think you are muted can you try speaking again yeah can you hear me hello can you hear me okay yeah perfect yeah so thanks for your call and then please feel free to ask any question around that I mean the demo or Quarkus or some cloud-related stuff just a couple of things maybe you might have interested about Quarkus-led comparations people sometimes ask me around when Red Hat supports fully the Quarkus-led comparations based on GraVM so actually we have a plan to support Navel Comparations based on Manjaro project around the middle of October actually next month so Manjaro is downstream project of GraVM and then Red Hat built that project will be based on OpenJDK11 after Red Hat built Quarkus-led 1.7 middle of October you have fully support of Navel Comparations as well as the OpenJDK11 build environment alright it's pretty quiet which means pretty good or pretty bad I'm not sure about that but yeah I hopefully I hope I think it's I know there are more than 90% Java developers love to spring boot or even some new Java stack and actually I've been there more than 10-15 years and this is really pretty awesome because we have lots of customer success stories which means they reduce the number of codes so for example we have reduced 30% of the amount of the application Java codes which means we save a lot of time to develop and implement same application functionality with Quarkus rather than the other Java stack and specifically in COVID-19 and then we needed to work from home and we tried to find the more effective way or a productive way to have the same result but still needed to provide the same functionality or capability with the same application so maybe Quarkus is a pretty good option to make that happen with less Apple but will maximize your result so yeah just briefly subscribe to my YouTube channel there are a lot of Quarkus demo as well as cloud application what even Kubernetes stuff and also you have some kind of technical issue or problem you can add the question on my YouTube channel or my Twitter that's all I got thank you again I thought that was really good