 Hi, everybody. Welcome back on the Porkus demo. In this demo, I'm going to showcase and talk a little bit about Porkus 3 natively integrated edge-of-functions. Let's get started. As you probably know, and you have some experience with Porkus 4.0, since the very beginning of the day of the Porkus community, Porkus offered edge-of-function extensions for developers to write deployable cloud-neighbor market services with various endpoints, such as REST-AGE Reactive and Undertow and Reactive Rows and Funky HTTP on edge-of-function runtime. And that journey didn't end, but we just arrived in the new era of the Porkus 3. A new edge-of-function class is you want to write with the CDI vins, like context-dependence injection with arc vins, automatically integrated Porkus, which means when developer wanted to write some code for edge-of-functions using inject annotation with the Porkus, the Porkus will be automatically bootstrapped in the end. Developer can also select the function's lifecycle scope, such as application and request, but select normal Java vins. So you might have one question if I'll just talk a little bit about Porkus 3, the native edge-of-function. So here's the question I just expected. What is the difference between Porkus Funky and the edge-of-function is? And why do I need to use the new edge-of-function with the Porkus rather than the Porkus Funky? So here's the answer. The Porkus Funky can be only invoked by edge-of-function triggers at this moment. However, edge-of-function has various different types of events, which can be invoked, such as edge-of-function trigger, and then Rob trigger, and then CosmoDB trigger. And there are more many triggers, so edge-of-function provides both triggering and binding capability. In the end, the developer have more flexibility to implement your function application of edge-of-function, which allows you to invoke that function by many different edge-of-services on top of the cloud. And one more thing, Porkus Funky was designed with the most common denominator to be portable and simple function layer across multiple suppress platforms, such as not only edge-of-function, but also for AWS Lambda, Google Cloud Function, and Kubernetes KNM, et cetera. Okay, let's get right into demo how it works, how to develop new edge-of-function on top of the Porkus. So I'm going to use Quarkus CLI, as always, and I'm going to try to add a new extension like Quarkus dash edge-of-function. It automatically generates a bunch of files, for example, Maven project, and then Maven wrapper, and configuration, backup file, et cetera. Let me try to change my directory, open the working folder. So today I'm going to try the cloud IDE. Sometimes you don't have enough time to install a bunch of the tools, for example, the Java, Maven, et cetera. The cloud IDE, which is a good option for you, just gets done in day one. So here is my Quarkus project, like a Porkus edge-of-function, it's a project name. When you go to Palm XML, you can take a look at that, which version you're going to use right now. So when I created this demo, we just write for release Quarkus 3. That's why you can see the CR2 version I'm going to use for this demo. And when you scroll down a little bit, you can find it's already installed, your Maven dependency, we can say Quarkus extension. The Quarkus edge-of-function, which allows me to run my application locally and deploy my application edge-of-function and the Quarkus CDI injection capability and also edge-of-function Java library going to be used for packaging application. So here's the edge-of-function Maven plugin, which allows the packaging application as well. And you can say the configuration for a function name and the resource group on edge-of-cloud and then your sub-supply plan. And then here's the one interesting you need to understand. You may be already using more than a Java 11 version, like a higher version, like a 17, 19, et cetera. But at this moment, Quarkus and edge-of-function integration only support Java 11. And also we're going to use edge-of-function core to the race version four. So you're going to install locally when you deploy this application. Okay, let's go to generate sample application, which is a function Java file. As you can see, it's very simple. The function name, this is a super interesting part. If you have some experience to develop Quarkus Funkey to deploy your application to edge-of-function previously, you just need to use your phone annotation, which allows your function method more make it portable and then not only edge-of-function to other serverless platform. However, when you go to just edge-of-function implementation as an example, Bigstar and the blog post, they already ask you if you need to use a function name annotation, which you make your method and the class as an edge-of-function. We're going to do the same thing, but we automatically start as a bootflip server as a Quarkus runtime with your function application. So first of all, we're going to add, we already add edge-of-function name, method, annotation. And then we're going to use the trigger edge-of-function trigger. You can change that like a custom edge-of-function to bunch of the other trigger and by the edge-of-function provide. We have a one interesting part. We're going to add a new content is body context using CGI injection, which is already specified in this example with the Quarkus CGI injection. As long as we're going to use this Quarkus injection in your function, automatically Quarkus runtime bootstrap in the end, which is a really convenient way for developers. Let's take a look at that, how to implement greeting service. It's a pretty simple just return like a hello world. Let me try to change that more pre-proper way. So welcome to edge-of-function with the Quarkus with your name with a parameter in the URL program. Now back to my function name. And then let me try to function name like a greeting, just like a service name. And then once you change there, you're going to ask the endpoint already start with the API slash your function name. In this case, I just changed to my function name greeting, which means I'm going to need to access my endpoint API slash the end. So how to run my application to the local text? Well, experience Quarkus, you probably expecting, okay, I'm going to run Quarkus demo, which you give me a live coding capability, which is super awesome. However, as an integration with this kind of stuff, you cannot use a Quarkus live coding capability at this moment. So that's why you're going to use your Mabel packaging tool and then edge-of-function Mabel problem in the run. It literally simulated your function capability on your local machine. So this is another cool feature in Quarkus 3. So we have a bunch of steps to packaging jar and then just simulated local environment. Now you can see that your endpoint with the 7071 port and the API slash your endpoint like a greeting. And then I'm going to try to run using Quarkman, the Daniel and the local host API greeting. And just break up the edge-of-function with Quarkus and Daniel. And then when you go back to actually runtime row, you can find which trigger you just invoke your function. As you can see, the edge-of-trigger just plus edge-of-function. That's really happening in the edge-of-cloud in the production environment. Okay, so before I deploy this function to my edge-of-cloud, which is edge-of-function apps, I need to load in edge-of-cloud from my local cloud using edge-of-command line, edge-of-loving. And then you're going to select which account. I'm not showing my super password. Okay, so here's my edge-of-portal. You can see a function in apps. I'm just request and make sure there's nothing in there. And I'm going to deploy new function using same edge-of-maven plugin. I'm going to use it called long deploy. It's pretty simple. And then it's the same packaging job file, which is your faster and Quarkus. And then deploy this application to that file with the task unit case. And then once I see, I'm going to deploy this application. If you're going to get the logs in runtime, you can find it's interesting just starting creating a function M, just create it. And then the your function M should be unique. That's why there's a random, rather than just attending at the function name. And then you're going to be started in the soonest moment. It depends on how big your application function is. Now we got to deploy and then HP trigger URL here. And then the URL is automatically generated. You are the edge-of-cloud URL. I'm just a copy of this URL when you testify by application. Then back to the edge-of-portal, now we can have a new function here. So when you select the function name, you can find the detail page here. For example, data bunching separation, edge-of-example URL. And then here is interesting, the edge-of-modular actually observable your metric data. Let me try to invoke the new parameter like a Daniel on edge-of-cloud and then the new URL in actual edge-of-cloud. And now you can see, welcome to edge-of-function with the partners Daniel on edge-of-cloud. So this is a literary function. So if you don't have any incoming natural traffic in this function, that function will be hibernated, just like an ideal mode. And then you invoke that function again, it automatically starts just based on query to start strategy. It takes us a couple of seconds to start up. But in this case, I just invoke that endpoint right after deploying my function. That's why you can see immediately the find-out return code. Welcome to edge-of-function with the partners Daniel on edge-of-cloud. We go back to the function app. There are realizations like a memory for free and a number of count of a function. It takes some time together of formation. And then you can invoke several times. It will put together and scrap all information in your monitor, which is really helpful for the developer to figure out, okay, how many resources are you actually using for this function and vocation in that. I hope you enjoyed this video. And thanks for watching this video again. And please let me know if you have any question. I'm more than happy to address. And thanks all. Have a good rest of the day.