O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

How to develop your first cloud-native Applications with Java

3.486 visualizações

Publicada em

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

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

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

Demo 1: Resiliency - https://youtu.be/IVd8pxDP8p8?t=5
Demo 2: Traffic management - https://youtu.be/IVd8pxDP8p8?t=41
Demo 3: Authorization - https://youtu.be/IVd8pxDP8p8?t=81
Demo 4: Logging - https://youtu.be/IVd8pxDP8p8?t=153

Publicada em: Software
  • Seja o primeiro a comentar

  • Seja a primeira pessoa a gostar disto

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 github.com/nheidloff/cloud-native-starter
  3. 3. “Microservices are a software development technique [...] that structures an application as a collection of loosely coupled services.” Wikipedia @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter
  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 github.com/nheidloff/cloud-native-starter
  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 github.com/nheidloff/cloud-native-starter
  7. 7. “Kubernetes (K8s) is an open- source system for automating deployment, scaling, and management of containerized applications.” kubernetes.io @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter
  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.” github.com/istio/istio @nheidloff @Harald_U
  9. 9. “Optimizing Enterprise Java for a Microservices Architecture. [...] by innovating [...] with a goal of standardization.” microprofile.io @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter
  10. 10. How to use all Pieces together? Kubernetes Java Enterprise Edition Istio Eclipse MicroProfile @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter
  11. 11. Leverage platforms as much as possible. @nheidloff @Harald_U Use frameworks for app specific logic. #IBMDeveloper github.com/nheidloff/cloud-native-starter
  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 github.com/nheidloff/cloud-native-starter
  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 18.0.0.4 MicroProfile 2.1 Dockerfile #IBMDeveloper github.com/nheidloff/cloud-native-starter
  16. 16. Exposing REST APIs @nheidloff @Harald_U JAX-RS Java API for RESTful Web Services GetArticles.java
  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 AuthorsService.java AuthorsServiceDataAccess.java
  19. 19. Resiliency @nheidloff @Harald_U Timeouts and retries Circuit breaking Fallback Fault injection Service.java
  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 CoreService.java
  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 github.com/nheidloff/cloud-native-starter
  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 github.com/nheidloff/cloud-native-starter
  30. 30. Distributed Tracing
  31. 31. Metrics @nheidloff @Harald_U Prometheus Monitoring system and time series database GetArticles.java #IBMDeveloper github.com/nheidloff/cloud-native-starter
  32. 32. Metrics
  33. 33. LogDNA
  34. 34. Sysdig
  35. 35. Healthchecks @nheidloff @Harald_U MicroProfile Health Liveness probes and readiness probes HealthEndpoint.java Service.yaml
  36. 36. Try out the end-to-end microservices example cloud-native-starter! @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter
  37. 37. Deploying Sample Services @nheidloff @Harald_U As easy as ’cf push’ scripts ibm-scripts iks-scripts sh scripts/deploy-authors-nodejs.sh
  38. 38. Running the Example App @nheidloff @Harald_U Script displays all relevant URLs sh scripts/show-urls.sh
  39. 39. IBM Cloud Kubernetes Service including Istio and Knative
  40. 40. 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 github.com/nheidloff/cloud-native-starter @nheidloff @Harald_U #IBMDeveloper github.com/nheidloff/cloud-native-starter

×