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.

How to develop your first cloud-native Applications with Java


Published on

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



Demo 1: Resiliency -
Demo 2: Traffic management -
Demo 3: Authorization -
Demo 4: Logging -

Published in: Software
  • Be the first to comment

  • Be the first to like this

How to develop your first cloud-native Applications with Java

  1. 1. How to develop your first cloud-native Applications with Java— Niklas Heidloff Developer Advocate, IBM @nheidloff Harald Uebele Developer Advocate, IBM @Harald_U
  2. 2. Continues delivery → DevOps Polyglot microservices → Interactions via APIs Elasticity → App stays responsive Horizontal scalability → Distributed systems What are cloud-native Applications? @nheidloff @Harald_U #IBMDeveloper
  3. 3. “Microservices are a software development technique [...] that structures an application as a collection of loosely coupled services.” Wikipedia @nheidloff @Harald_U #IBMDeveloper
  4. 4. Run anywhere → Kubernetes Empowered teams → Ownership Fast response times → No cold start Full control → Canary rollouts When to use Microservices? @nheidloff @Harald_U #IBMDeveloper
  5. 5. New Options → New Challenges
  6. 6. Cloud-native applications provide new capabilities, which challenge developers –  New tasks –  Old tasks in new context Service discovery and traffic management Distributed monitoring, logging and tracing Authentication and authorization between services @nheidloff @Harald_U #IBMDeveloper
  7. 7. “Kubernetes (K8s) is an open- source system for automating deployment, scaling, and management of containerized applications.” @nheidloff @Harald_U #IBMDeveloper
  8. 8. “Istio is an open platform for providing a uniform way to integrate microservices, manage traffic flow across microservices, enforce policies and aggregate telemetry data.” @nheidloff @Harald_U
  9. 9. “Optimizing Enterprise Java for a Microservices Architecture. [...] by innovating [...] with a goal of standardization.” @nheidloff @Harald_U #IBMDeveloper
  10. 10. How to use all Pieces together? Kubernetes Java Enterprise Edition Istio Eclipse MicroProfile @nheidloff @Harald_U #IBMDeveloper
  11. 11. Leverage platforms as much as possible. @nheidloff @Harald_U Use frameworks for app specific logic. #IBMDeveloper
  12. 12. 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 @nheidloff @Harald_U #IBMDeveloper
  13. 13. 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 @nheidloff @Harald_U Browser Kubernetes with Istio Optional Cloud Services Ingress
  14. 14. Web Experience in ‘cloud-native-starter’
  15. 15. Java Image @nheidloff @Harald_U Open source stack OpenJ9 0.12.1 OpenJDK 8u202-b08 from AdoptOpenJDK Open Liberty MicroProfile 2.1 Dockerfile #IBMDeveloper
  16. 16. Exposing REST APIs @nheidloff @Harald_U JAX-RS Java API for RESTful Web Services
  17. 17. Exposing REST APIs @nheidloff @Harald_U Open API (formerly Swagger) API description format for REST APIs
  18. 18. Consuming REST APIs @nheidloff @Harald_U MicroProfile Rest Client Type-safe approach to invoke RESTful services
  19. 19. Resiliency @nheidloff @Harald_U Timeouts and retries Circuit breaking Fallback Fault injection
  20. 20. Resiliency
  21. 21. Traffic Management @nheidloff @Harald_U Blue-green deployments Canary rollouts A/B testing ingress.yaml
  22. 22. Traffic Management
  23. 23. Authentication and Authorization @nheidloff @Harald_U 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 .env of authentication service
  24. 24. Authorization
  25. 25. Authorization
  26. 26. Authentication
  27. 27. Configuration @nheidloff @Harald_U MicroProfile Configuration External configuration of microservices Service.yaml
  28. 28. Chained invocations Kubernetes → 1 service = N pods Microservices vs monolith → Higher complexity → Ephemeral Tracing Logging Monitoring Metrics Healthchecks Observability @nheidloff @Harald_U #IBMDeveloper
  29. 29. Tracing @nheidloff @Harald_U OpenTracing Vendor-neutral APIs and instrumentation for distributed tracing Jaeger and Zipkin Open source distributed tracing systems server.xml #IBMDeveloper
  30. 30. Distributed Tracing
  31. 31. Metrics @nheidloff @Harald_U Prometheus Monitoring system and time series database #IBMDeveloper
  32. 32. Metrics
  33. 33. LogDNA
  34. 34. Sysdig
  35. 35. Healthchecks @nheidloff @Harald_U MicroProfile Health Liveness probes and readiness probes Service.yaml
  36. 36. Try out the end-to-end microservices example cloud-native-starter! @nheidloff @Harald_U #IBMDeveloper
  37. 37. Deploying Sample Services @nheidloff @Harald_U As easy as ’cf push’ scripts ibm-scripts iks-scripts sh scripts/
  38. 38. Running the Example App @nheidloff @Harald_U Script displays all relevant URLs sh scripts/
  39. 39. IBM Cloud Kubernetes Service including Istio and Knative
  40. 40. IBM Developer IBM Cloud Lite account 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 @nheidloff @Harald_U #IBMDeveloper