Deliver AI infused app innovation with Open Liberty on AKS
Bonus: Java on Azure Container Apps
Size: 59.51 MB
Language: en
Added: Sep 11, 2024
Slides: 47 pages
Slide Content
Deliver AI infused app innovation with Open Liberty on AKS Ed Burns @ edburns Principal Architect for Java on Azure Java Champion Bonus: Java on Azure Container Apps
Ed Burns professional biography Client NCSA Mosaic (1994) SGI Cosmo Web Authoring Sun Netscape 6 OJI Server J2EE JSF (2002) Oracle Java EE Servlet, JSF, Bean Validation, etc. Cloud Java Champion Microsoft Azure Cloud (2019) Jakarta EE 11 committer and release coordinator Books
Java SE Activation Java Products and Specifications Tomcat Jetty Undertow Spring Framework Spring Boot WebSocket Concurrency JSON-B Validation Persistence Messaging Transactions Messaging Servlet Pages Tag Libraries Expression Language Annotations Authorization Faces REST JSON-P Interceptors Dependency Injection CDI Jakarta EE Core Profile Batch Connectors Mail EJB Security EJB Lite Authentication Data Debugging Support WebLogic Server WebSphere Liberty Open Liberty JBoss EAP WildFly WebSphere Traditional Quarkus Micronaut Helidon Jakarta EE Platform and Web Profile (aka Java EE/J2EE JEE) A note on Spring and Jakarta EE “Spring /Tomcat profile” (not an official name) “Spring /Tomcat profile” (not an official name) Config Fault Tolerance Metrics Health JWT RBAC Open API REST Client Telemetry MicroProfile Not Cloud Native Older Cloud Native Newer Cloud Native
My plan for your time investment Don’t panic Show the major parts of the demo How to deploy it Possible areas for further exploration Summary Bonus: Java on Azure Container Apps
New to AI?
Don’t panic!
Ed’s fairly obvious observations Recognize the market forces that have always been in play. Vendors want adoption. They’ll make it easy to adopt. This is also true with AI.
James Gosling: I realized if I wanted bankers to use automatic garbage collection, I needed to give them curly braces rather than lots of irritating silly parentheses (LISP). Packaging a new idea for adoption: deliver it on the back of existing ideas.
Java language level idioms you’ll see with AI Builder pattern Streams CompleteableFuture (hopefully virtual threads also) Functions Providing an API on top of existing LLMs
Major parts of the demo
IBM Liberty on AKS offer https://aka.ms/liberty-aks Deploys for you AKS Container Registry Liberty Kubernetes Operator (optional) an app of your choice
IBM Liberty https://openliberty.io/ Implements Jakarta EE MicroProfile Lightweight Modular Perfect for microservices
Specifications Jakarta EE and MicroProfile https://jakarta.ee/ https://microprofile.io/ Implements Jakarta EE MicroProfile CDI dependency injection https://jakarta.ee/specifications/cdi/ Config https://github.com/eclipse/microprofile-config/ Metrics https://github.com/eclipse/microprofile -metrics/
How to deploy it
How I built the demo Started with Grace and Gilbert’s excellent blog post https://openliberty.io/blog/2024/04/01/open-liberty-with-langchain4j-example.html Sprinkled in the Liberty on AKS QuickStart https://learn.microsoft.com/en-us/azure/aks/howto-deploy-java-liberty-app Result is at https://github.com/azure-javaee/langchain4j-examples
How to deploy the demo Build the app Containerize the app Push to Azure Container Registry Start the Liberty on AKS offer: https://aka.ms/liberty-aks Point to the Azure Container Registry containing the app Supply the Docker tag for the image in the registry Look at the outputs
Demo
Where you can go next
Ideas for further exploration Implement GitOps Automate deployments using GitHub Actions. Pass environment variables from CI rather than baking them into the container image. Explore other models See ChatAgent.java for example. Explore the LangChain4J Tools API See fellow Java Champion (and fellow NullPointer ) Ken Kousen’s excellent video: https://www.youtube.com/watch?v=cjI_6Siry-s
Summary
Summary Easily add AI to a Jakarta EE Liberty app https:// aka.ms /java/ ee /langchain4j-example Easily containerize a Jakarta EE Liberty app https://github.com/azure-javaee/langchain4j-examples Easily deploy a Jakarta EE Liberty app to AKS https://aka.ms/liberty-aks Do more with Java on Azure https://aka.ms/java/ee
Bonus to the Bonus Java on Azure Container Apps General Availability on Thursday!
Overcome technology gaps with Java on Azure Container Apps Source to Cloud Java components Monitor and troubleshoot
May to Sept. In preview Java on ACA roadmap Build Consistently build, maintain and update portable OCI images with Java CNCF Buildpacks Boost security and reduce risk from CVE Deployment Deploy from source, artifact or image Operation Leverage managed Java components for your apps without operational hassles Monitoring Get deep insights into your apps with metrics from container, JVM , Tomcat and Sprin g Boot actuator endpoint Diagnostics Easily identify issues with log stream, heap dump and thread dump Generally available
Build and deploy Java apps 1 Deploy from source, Jar, War, or image 2 Consistently build, maintain, and update images 3 Boost security and reduce risk from CVE
Containers built using Dockerfile are hard to productionize and scale Team A FROM ubuntu:20.04 COPY app1 / #install JDK 17 and maven RUN apk add openjdk17 maven CMD [“app1”] Team B FROM centos:stream9 COPY app2 / #install JDK 11 and maven RUN apk add openjdk11 maven CMD [“app2”] Has Openssl CVE
Build Source Code Jar, War ACA Cloud Build process Container Image
JVM memory fit Container memory JVM memory Heap Non-heap Meta space Stack Cache Direct Container memory JVM memory Heap Non-heap Meta space Stack Cache Direct Fit Not used by JVM Throughput 58.95 /s Request rate Throughput 77.05 /s Request rate +30% Before After -59% Garbage Collection
Deploy app CLI experience
Deploy app Portal experience
Monitor Java apps 1 Providing Java Metrics and Logs Deeper insights into the running status of applications Detect/pinpointing specific issues for faster resolution 2 Enhancing Logs and Metrics for Java Apps JVM metrics (memory, GC…) Tomcat 2 Integration with Azure Monitor Azure Container Apps is natively integrated with Azure Monitor
Monitor
Monitor
Diagnostics 1 Challenges in mission critical Java Applications: Availability and performance issues are common Diagnosing root causes consumes significant time Reproducing problems in production environments is challenging 2 Impact on business: Livesite issues that may impact business continuity 3 Key error areas: Memory issues Null pointer exceptions Deadlocks …
Diagnostics: Leverage tools you like and diagnose on demand
Demo Configure number of pet owners displayed in one page
Demo 1 2 3 4 Create an Azure Container App environment Create a managed config service in the Azure Container App environment and connect it to Github Create the Petclinic app and bind to managed config service Select Java in development stack to enable monitoring Azure Container App environment Managed config service for Spring Petclinic app Azure Monitor
Call to action Visit Java on Azure Container Apps documentation page Begin your journey and effortlessly deploy a Java artifact file to Azure Container Apps Explore the complete Java on Azure Container Apps blog series
Thank you Speaker name Speaker contact email Begin your journey and effortlessly deploy a Java artifact file to Azure Container Apps https://aka.ms/ACAJD1 We want your feedback! Participate in a survey and automatically enter to win one of five $100 sweepstake prizes