Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Jakarta Tech Talk: How to develop your first cloud-native Application with Java

138 views

Published on

Slides used in this webinar: https://www.meetup.com/jakartatechtalks_/events/262259197/

Webinar recording: https://youtu.be/kp6tm8gdjTc?t=77

Cloud Native Starter for Java EE based Microservices on Kubernetes and Istio

Code: https://github.com/ibm/cloud-native-starter

Documentation: https://github.com/ibm/cloud-native-starter#documentation

Published in: Software
  • Be the first to comment

  • Be the first to like this

Jakarta Tech Talk: How to develop your first cloud-native Application with Java

  1. 1. How to develop your first cloud-native Applications with Java— Niklas Heidloff Developer Advocate, IBM @nheidloff
  2. 2. How to use all Pieces together? Kubernetes Java Enterprise Edition Istio Eclipse MicroProfile #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  3. 3. “Microservices are a software development technique [...] that structures an application as a collection of loosely coupled services.” Wikipedia #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  4. 4. Continuous delivery → DevOps Elasticity → App stays responsive What are cloud-native Applications? #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  5. 5. New Options → New Challenges
  6. 6. “Kubernetes (K8s) is an open- source system for automating deployment, scaling, and management of containerized applications.” kubernetes.io #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  7. 7. “Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data.” github.com/istio/istio @nheidloff
  8. 8. “Optimizing Enterprise Java for a Microservices Architecture. [...] by innovating [...] with a goal of standardization.” microprofile.io @nheidloff @Harald_U #IBMDeveloper github.com/ibm/cloud-native-starter
  9. 9. How to use all Pieces together? Kubernetes Java Enterprise Edition Istio Eclipse MicroProfile #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  10. 10. Leverage platforms as much as possible. Use frameworks for app specific logic. #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  11. 11. Design principles for the end-to- end example ‘cloud-native- starter’ Use only open- source components for the core services of the application Make the first time experience as simple as possible Be able to run the application in different environments #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  12. 12. Architecture: End-to-End Example ‘cloud-native-starter’ Web-App NoSQL / Cloudant Web-API v1 Articles Web-API v2 Authors Web-App SQL / Db2 OpenID / App ID LogDNASysdig Authentication Browser Kubernetes with Istio Optional Cloud Services Ingress @nheidloff
  13. 13. “A container image is a lightweight, standalone, executable package of software that includes everything needed to run an application.” docker.com #IBMDeveloper github.com/ibm/cloud-native-starter Infrastructure Host Operating System Container Runtime AppA AppB AppC AppD AppE @nheidloff
  14. 14. Portable Containers
  15. 15. Java Image Open source stack OpenJ9 0.14.0 OpenJDK 11.0.3+7 from AdoptOpenJDK Open Liberty 19.0.0.5 MicroProfile 2.2 Dockerfile #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  16. 16. Example Application
  17. 17. Example Application – REST APIs Web-App Web-API Articles Authors Browser Kubernetes with Istio @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  18. 18. Exposing REST APIs JAX-RS Java API for RESTful Web Services GetArticles.java @nheidloff
  19. 19. Exposing REST APIs Open API (formerly Swagger) API description format for REST APIs GetArticles.java @nheidloff
  20. 20. Exposing REST APIs Open API (formerly Swagger) API description format for REST APIs @nheidloff
  21. 21. Consuming REST APIs MicroProfile Rest Client Type-safe approach to invoke RESTful services AuthorsService.java AuthorsServiceDataAccess.java @nheidloff
  22. 22. Consuming REST APIs MicroProfile Rest Client Type-safe approach to invoke RESTful services AuthorsService.java AuthorsServiceDataAccess.java @nheidloff
  23. 23. Example Application – Traffic Management Web-App Web-API v1 Articles Web-API v2 Authors Browser Kubernetes with Istio @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  24. 24. Traffic Management – Web API Version 1
  25. 25. Traffic Management – Web API Version 2
  26. 26. Traffic Management Example: 80% / 20% splitting ingress.yaml @nheidloff
  27. 27. Traffic Management Demo
  28. 28. Example Application – Resiliency Web-App Web-API Articles Authors Browser Kubernetes with Istio @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  29. 29. Resiliency Authors service not available Usage of default values Service.java @nheidloff
  30. 30. Resiliency Articles service not available MicroProfile fallback annotation Service.java @nheidloff
  31. 31. Resiliency Demo
  32. 32. Resiliency Demo
  33. 33. Authentication and Authorization OpenID Connect Identity layer on top of the OAuth 2.0 protocol IBM App ID IBM service to authenticate users and protect APIs policy.yaml @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  34. 34. Example Application – Authentication and Authorization Web-App Web-API Articles Authors OpenID Connect / IBM App ID Authentication Browser Kubernetes with Istio Optional Cloud Services Ingress @nheidloff
  35. 35. Authentication
  36. 36. Authorization
  37. 37. Authorization
  38. 38. Authorization Via MicroProfile server.xml @nheidloff
  39. 39. Authorization Via MicroProfile Manage.java @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  40. 40. Chained invocations Kubernetes → 1 service = N pods Microservices vs monolith → Higher complexity → Ephemeral Tracing Logging Monitoring Metrics Healthchecks Observability @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  41. 41. Example Application – Distributed Logging Web-App Web-API Articles Authors Browser Kubernetes with Istio @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  42. 42. Distributed Logging
  43. 43. Example Application – Distributed Logging Web-App Web-API Articles Authors Browser Kubernetes with Istio @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter
  44. 44. Distributed Logging
  45. 45. Tracing OpenTracing Vendor-neutral APIs and instrumentation for distributed tracing Jaeger and Zipkin Open source distributed tracing systems server.xml #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  46. 46. Distributed Tracing
  47. 47. Metrics Prometheus Monitoring system and time series database GetArticles.java #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  48. 48. Metrics
  49. 49. Healthchecks MicroProfile Health Liveness probes and readiness probes HealthEndpoint.java Service.yaml @nheidloff
  50. 50. Persistence via JPA Web-App Web-API Articles Web-App SQL / Db2 Browser Kubernetes with Istio Optional Cloud Services Ingress @nheidloff
  51. 51. Persistence Via JPA server.xml @nheidloff
  52. 52. Persistence Via JPA ArticleEntity.java #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  53. 53. Configuration Via MicroProfile kubernetes.yaml @nheidloff
  54. 54. Configuration Via MicroProfile CoreService.java #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  55. 55. Try out the end-to-end microservices example cloud-native-starter! #IBMDeveloper github.com/ibm/cloud-native-starter@nheidloff
  56. 56. Documentation
  57. 57. IBM Cloud Kubernetes Service including Istio and Knative
  58. 58. IBM Developer developer.ibm.com IBM Cloud Lite account ibm.biz/nheidloff IBM loves open source Kubernetes and Istio OpenJ9 & AdoptOpenJDK MicroProfile Open Liberty Leverage platforms as much as possible Use frameworks for app specific logic Summary Get the code à @nheidloff #IBMDeveloper github.com/ibm/cloud-native-starter

×