Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Cloud Native Java Microservices

In this talk, Kenny Bastani will introduce you to Spring Cloud, a set of tools for building cloud-native JVM applications. We will take a look at some of the common patterns for microservice architectures and how to use Cloud Foundry to deploy multiple microservices to the cloud. We will also dive into a microservices example project of a cloud-native application built using Spring Boot and Spring Cloud. Using this example project, I'll show you how to use Cloud Foundry to spin up a microservice cluster. We will then explore what a cloud-native application looks like when using self-describing REST APIs that link multiple microservices together.

  • Inicia sesión para ver los comentarios

Cloud Native Java Microservices

  1. 1. © 2016 Pivotal Software, Inc. All rights reserved. Cloud Native Java Microservices Kenny Bastani Spring Developer Advocate 1
  2. 2. Kenny Bastani @kennybastani Spring Developer Advocate
  3. 3. Agenda Agenda 1 Microservices & Cloud Native 2 Spring Boot 3 Spring Cloud 4 RESTful Microservices 5 Push to Cloud Foundry
  4. 4. © 2016 Pivotal Software, Inc. All rights reserved. Microservices 4
  5. 5. Monolithic Architecture
  6. 6. SOA - Service Oriented Architecture
  7. 7. Microservice Architecture • Each team gets one database and one service • Shared caches are platform provided services that are shared for consistency
  8. 8. Monolithic Architecture
  9. 9. Monolith to Microservice
  10. 10. Monolith to Microservice
  11. 11. © 2016 Pivotal Software, Inc. All rights reserved. Cloud Native Apps 11
  12. 12. Cloud Native & Microservices • Microservices are only a small part of a larger picture Cloud Microservices
  13. 13. Twelve-factor Application Configuration
  14. 14. Twelve-factor Application Deployment
  15. 15. © 2016 Pivotal Software, Inc. All rights reserved. Cloud Native Ops 15
  16. 16. Application Server Deployment - Monolith • Load balancing requires provisioning of new VMs and app server installations • Poor resource isolation; memory leaks can cause other applications to become unavailable • Runtime environment is driven by the operator Virtual Machine
 App Linux Kernel App App Hardware Infrastructure
  17. 17. Linux Container Deployment - Microservice • Development team drives the application runtime of a container • Containers are resource isolated, allowing efficient scheduling onto a grid of VMs • Containers take seconds to start, VMs take minutes • It’s not a rule that there is one microservice per container Virtual Machine
 Container Linux Kernel App App App App Container App App App App Container App App App App Hardware Infrastructure
  18. 18. Microservices - Container Deployment • Each microservice can be containerized with their application dependencies • Containers get scheduled on virtual machines with an allotted resource policy
  19. 19. Auto-scaling • Minutes to start a VM, but seconds to start a container • An elastic runtime handles auto-scaling of VMs with cloud providers
  20. 20. Orchestration • Each microservice needs to communicate outside containers • Service discovery provides an automatic method for finding other service dependencies
  21. 21. © 2016 Pivotal Software, Inc. All rights reserved. Cloud Native Java 21
  22. 22. © 2016 Pivotal Software, Inc. All rights reserved. Spring Boot A JVM micro-framework for building microservices 22
  23. 23. What is Spring Boot?
  24. 24. spring boot Spring Initializr for boostraping your applications supports rapid development of production-ready applications and services
  25. 25. Spring Boot Roles
  26. 26. Automatic Configuration • An application class is annotated with @SpringBootApplication • Additional annotations are added to indicate the role of the Spring Boot application
  27. 27. Spring Boot for Microservices
  28. 28. © 2016 Pivotal Software, Inc. All rights reserved. Spring Cloud A toolset designed for building distributed systems 28
  29. 29. spring cloud Apache Zookeeper these logos are all trademark/copyright their respective owners (T-B, L-R): 
 Netflix,, Apache Software Foundation, Cloud Foundry, Hashicorp they are ALL great organizations and we love their open-source and their APIs!! *
  30. 30. What is Spring Cloud? ✴ Service Discovery ✴ API Gateway ✴ Config Server ✴ Circuit Breakers ✴ Distributed Tracing
  31. 31. What is Spring Cloud? • Spring Cloud provides a way to turn Spring Boot microservices into distributed applications
  32. 32. Service Discovery & Intelligent Routing
  33. 33. Client-side load balancing
  34. 34. Configuration Service
  35. 35. API Gateway
  36. 36. © 2016 Pivotal Software, Inc. All rights reserved. RESTful Microservices 36
  37. 37. © 2016 Pivotal Software, Inc. All rights reserved. HATEOAS Hypermedia as the Engine of Application State (REST APIs that self-describe) 37
  38. 38. It’s pronounced hawt-ee-oh-as
  39. 39. Richardson Maturity Model Photo credit: Packt Publishing
  40. 40. REST API Gateway • API gateway downloads routes from services exposing REST APIs • Each route of other microservices will be hosted on the API gateway • API gateway will automatically reverse proxy to backend services • Hypermedia allows traversing entire REST API description of microservices
  41. 41. Browsing REST APIs
  42. 42. ©2015 Apigee. All Rights Reserved. Each API call provides links
  43. 43. © 2016 Pivotal Software, Inc. All rights reserved. Cloud Foundry “To always be shipping, you need a shipyard.” 43
  44. 44. © 2016 Pivotal Software, Inc. All rights reserved. Application-centric opinionated platform Cloud Foundry 44
  45. 45. Push to Cloud Foundry • • Go to Spring Initializr, select Web • Name the artifactId hello-world • Add a @RestController named Hello • Return “Hello World” at the root endpoint • mvn clean install & cf push
  46. 46. © 2016 Pivotal Software, Inc. All rights reserved. Thanks! @kennybastani