Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices and Docker Containers for Cloud-N...

Microservices and Docker Containers for Cloud-Native Middleware Architectures

Microservices are the next step after SOA: Services implement a limited set of functions. Services are developed, deployed and scaled independently. Continuous Integration and Continuous Delivery automate deployments. This way you get shorter time to results and increased flexibility. Containers improve these even more offering a very lightweight and flexible deployment option.

In the middleware world, you use concepts and tools such as an Enterprise Service Bus (ESB), Complex Event Processing (CEP), Business Process Management (BPM) or API Gateways. Many people still think about complex, heavyweight central brokers here. However, Microservices and containers are relevant not just for custom self-developed applications, but they are also a key requirement to make the middleware world more flexible, agile and automated.

This session discusses the requirements, best practices and challenges for creating a good Microservices architecture in the middleware world. A live demo with the open source PaaS framework CloudFoundry shows how technologies and frameworks such as Java, SOAP / REST Web Services, Jenkins and Docker are used to create an agile software development lifecycle to realize “Middleware Microservices”. It also discusses other modern cloud-native alternatives such as Kubernetes, Docker, Mesos, Mesosphere or Amazon ECS / AWS.

Keywords: Microservices, Containers, Docker, CoreOS, Cloud, Cloud-Native, Middleware, PaaS, IaaS, SaaS, TIBCO, BusinessWorks, BWCE, BusinessWorks Container Edition, TIBCO Cloud Integration, Cloud Foundry, Garden, Warden, Pivotal, IBM Bluemix, Amazon Web Services, AWS, Google, Google Cloud Platform, Kubernetes, Mesos, Mesosphere, Marathon, DevOps, Cluster Management, Orchestration, Choreography, JPoint, Conference, Java, Java EE

Kai Waehner

April 22, 2016
Tweet

More Decks by Kai Waehner

Other Decks in Technology

Transcript

  1. Kai Wähner Technology Evangelist [email protected] LinkedIn / Xing @KaiWaehner www.kai-waehner.de

    April 2016 – JPoint Moscow, Russia Microservices and Containers in the Middleware World
  2. © Copyright 2000-2016 TIBCO Software Inc. •  A cloud-native architecture

    enables flexible and agile development •  Modern middleware leverages containers and Microservices •  Just using Jenkins and Docker is not enough Key Takeaways
  3. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  4. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  5. © Copyright 2000-2016 TIBCO Software Inc. Evolving Demands from the

    Business AGILITY & SPEED REDUCED CYCLE TIMES WEB SCALE LOWER COST FAIL FAST
  6. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  7. © Copyright 2000-2016 TIBCO Software Inc. “Middleware is computer software

    that provides services to software applications beyond those available from the operating system. It can be described as "software glue”. Middleware makes it easier for software developers to implement communication and input/output, so they can focus on the specific purpose of their application.” Wikipedia ( https://en.wikipedia.org/wiki/Middleware) Middleware
  8. © Copyright 2000-2016 TIBCO Software Inc. •  Keywords PAST: Application

    Integration, EAI, Broker, Process, Application, Integration, Enterprise, Hub and Spoke, Backbone, Scalability, Platform, Batch •  Keywords PRESENT: Service Integration, Bus, SOA, BPM, Service, ESB, Flexibility, Distribution, Events, EDA, Real Time, Event Correlation, Open, Standards, Extensibility •  Keywords FUTURE: Integration of Everything, Gateway, iBPMS, Cloud, IoT, Microservice, API, Continuous Delivery, Self-Service, Prediction Middleware - Buzzwords
  9. © Copyright 2000-2016 TIBCO Software Inc. „... ESB frameworks are

    generally characterized as heavyweight – complex, centralized and difficult...“ “Electronic Services: Concepts, Methodologies, Tools and Applications, Information“ - Science Reference (15. Juli 2010) Middleware – The Double Burden?
  10. © Copyright 2000-2016 TIBCO Software Inc. Middleware Example: Enterprise Service

    Bus (ESB) An enterprise service bus (ESB) is a software architecture model used for designing and implementing communication between mutually interacting software applications in a service- oriented architecture (SOA). Its primary use is in enterprise application integration (EAI) of heterogeneous and complex landscapes. http://en.wikipedia.org/wiki/Enterprise_service_bus (Wikipedia, 2016)
  11. © Copyright 2000-2016 TIBCO Software Inc. Is the ESB dead?

    #NoESB Gartner https://www.gartner.com/user/registration/webinar?resId=2855231&commId=128383&channelId=5500&srcId=null Akana (former SOA Software) https://blog.soa.com/noesb/
  12. © Copyright 2000-2016 TIBCO Software Inc. •  Integration •  Orchestration

    and Choreography •  APIs and Business Services •  Messaging •  Independent Deployments •  Scalable Platform •  Automation ESB in 2016
  13. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  14. © Copyright 2000-2016 TIBCO Software Inc. Microservices •  Suite of

    small services running in its own process •  Communication via lightweight mechanisms •  Built around business capabilities •  Independently deployable, written in different languages and using different data stores •  Bare minimum of centralized management à Shorter time to results and increased flexibility
  15. © Copyright 2000-2016 TIBCO Software Inc. Various Forms of Microservices

    Integration Service Monolith application SOA Integration Service Service Service Service Service API Gateway SaaS Service BPM Service
  16. © Copyright 2000-2016 TIBCO Software Inc. == The Momentum of

    Containers How to deploy independent Microservices? Garden / Warden
  17. © Copyright 2000-2016 TIBCO Software Inc. A [Docker] container, unlike

    a virtual machine, does not require or include a separate operating system. Container use the resource isolation features of the Linux kernel such as kernel namespaces (isolates an application's view of the operating environment including process trees, network, user IDs and mounted file systems) and cgroups (provides resource limiting, including the CPU, memory, block I/O and network), and a union-capable filesystem such as aufs and others to allow independent "containers" to run within a single Linux instance, avoiding the overhead of starting and maintaining virtual machines. Key advantage for middleware: Lightweight and flexible development and deployment. Container 101
  18. © Copyright 2000-2016 TIBCO Software Inc. “Build, Ship, and Run

    Any App, Anywhere” http://www.slideshare.net/ andersjanmyr/ docker-the-future-of-devops
  19. © Copyright 2000-2016 TIBCO Software Inc. An Open Standard for

    Containers... https://www.opencontainers.org/
  20. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  21. © Copyright 2000-2016 TIBCO Software Inc. •  scalable services • 

    resiliency •  automatic load balancing and failover •  DevOps •  usage public cloud platforms, but also private or hybrid •  vendor-agnostic deployment •  shorter time to results and increased flexibility à Focus on business problems Cloud Native enables...
  22. © Copyright 2000-2016 TIBCO Software Inc. •  Microservices and Containers

    [as discussed…] •  Continuous Integration and Continuous Delivery •  Scripting / Automatic Test and Deployment •  Service Discovery •  Dynamic Distributed Configuration Management •  Scalability and Failover •  Cluster Management (Scheduling and Orchestration) •  Load Balancing (Server-side and Client-side) •  Resilience Design Patterns •  Cloud Native Platform •  Self-Service Agile Infrastructure •  Private / Public / Hybrid PaaS Requirements for a Cloud-Native Architecture
  23. © Copyright 2000-2016 TIBCO Software Inc. Continuous Integration and Continuous

    Delivery http://en.wikipedia.org/wiki/Continuous_delivery BENEFITS •  Accelerated Time to Market •  Building the Right Product •  Improved Productivity and Efficiency •  Reliable Releases •  Improved Product Quality •  Improved Customer Satisfaction Build Management •  Ant, Maven, Gradle, … Continuous Integration •  Jenkins, Bamboo, … Continuous Delivery •  Chef, Puppet, Salt, … Scripting / Automatic Test and Deployment
  24. © Copyright 2000-2016 TIBCO Software Inc. Continuous Integration and Continuous

    Delivery Internal Service Discovery for a Scalable Runtime https://docs.pivotal.io/spring-cloud-services/service-registry/ Service Registry •  Eureka •  Apache Zookeeper •  Consul •  Etcd Cluster Frameworks with implicit Service Registry •  Kubernetes •  Mesos Marathon •  Amazon AWS ELB PaaS Cloud Platforms reusing an existing Service Registry •  Pivotal Cloud Foundry is based on Eureka
  25. © Copyright 2000-2016 TIBCO Software Inc. Continuous Integration and Continuous

    Delivery External Service Discovery for an “Open API” Examples for API Management: JBoss apiman, Apigee, Akana, Layer7, TIBCO Mashery
  26. © Copyright 2000-2016 TIBCO Software Inc. Continuous Integration and Continuous

    Delivery But: “BfF can become an anti-pattern if you have too many distinct consumers to please, especially if you’ve got only a small team to take care of all those front ends. Be sure to do the math! http://www.infoq.com/articles/api-facades, Guillaume Laforge http://samnewman.io/patterns/architectural/bff , Sam Newman API Management – Backends for Frontends (BfF)
  27. © Copyright 2000-2016 TIBCO Software Inc. Continuous Integration and Continuous

    Delivery Dynamic Distributed Configuration Management Features •  Effect changes dynamically at runtime •  Change multi-dimensional properties based on a complex request or deployment context •  Enable / disable features based on request context Examples •  Netflix’ Archaius •  Spring Cloud Config Spring Cloud http://www.infoworld.com/article/2925047/application-development/ build-self-healing-distributed-systems-with-spring-cloud.html
  28. © Copyright 2000-2016 TIBCO Software Inc. Scalability and Failover Cluster

    Management (Scheduling and Orchestration) Features •  Orchestrate container scheduling and managing hosts •  Applying rules and constraints to hosts •  Designed to be fault-tolerant and scalable Examples •  Swarm (Docker-native) •  Fleet (CoreOS’ low-level framework) •  Kubernetes (open source’d by Google) •  Adopted by others (IBM, Red Hat, Microsoft …) •  Mesos’ Marathon (powerful, but complex) •  For large scale; multi-use (e.g. Containers, Hadoop) https://www.oreilly.com/ideas/swarm-v-fleet-v-kubernetes-v-mesos https://www.digitalocean.com/community/tutorials/the-docker-ecosystem-an-introduction-to-common-components
  29. © Copyright 2000-2016 TIBCO Software Inc. Scalability and Failover Server-side

    and Client-side Load Balancing (LB) Features •  Distributes network or application traffic across a number of servers •  Increase capacity and reliability of applications •  Why Client-Side LB? à Inter-Service-Communication (1 instead of 2 hops) Examples •  F5 (Server-side LB) •  AWS ELB (Server-side LB) •  Netflix’ Ribbon (Client-side LB) www.devcentral.f5.com http://www.javaworld.com/article/2927920/cloud-computing/build-self-healing-distributed-systems-with-spring-cloud.html Server-Side LB (for “Edge Services”) Client-Side LB (for “Mid-Tier Services”)
  30. © Copyright 2000-2016 TIBCO Software Inc. Scalability and Failover Resilience

    Design Patterns Features •  Fail fast and rapidly recover •  Prevent cascading failures •  Latency tolerance logic •  Fault tolerance logic •  Fallback Options Examples •  Netflix’ Hystrix •  Akka http://martinfowler.com/bliki/CircuitBreaker.html https://github.com/Netflix/Hystrix/wiki Circuit Breaker maxFailures = 5 resetTimeout = 1min callTimeout = 10s à maxFailures++
  31. Cloud Native Platform (Infrastructure-as-a-Service) Choose your IaaS Private or Hybrid

    Cloud Reduced costs of Infra Self-hosted & Controlled Env Servers Storage Network IaaS
  32. Cloud Native Platform (Platform-as-a-Service) Choose your PaaS / Container Cloud-Native

    App Dev Self-service agile infrastructure Elasticity & Scalability OS & Containers Scalability Routing Logging / Monitoring PaaS
  33. © Copyright 2000-2016 TIBCO Software Inc. Cloud Native Platform Choose

    your IaaS Choose your PaaS / Container Private or Hybrid Cloud Cloud-Native App Dev Reduced costs of Infra Self-service agile infrastructure Self-hosted & Controlled Env Elasticity & Scalability Servers Storage Network OS & Containers Scalability Routing Logging / Monitoring PaaS IaaS
  34. © Copyright 2000-2016 TIBCO Software Inc. PaaS Platforms on top

    of IaaS in 2016 What container and PaaS tools are used to manage OpenStack applications? OpenStack Survey, April 2016: http://www.openstack.org/assets/survey/April-2016-User-Survey-Report.pdf
  35. © Copyright 2000-2016 TIBCO Software Inc. SaaS – “The Other”

    Cloud Native Alternative https://www.linkedin.com/pulse/saas-vs-paas-iaas-ultimate-guide-when-use-what-sonia-patel … you have no control! You “just” use the service!
  36. © Copyright 2000-2016 TIBCO Software Inc. “Containers as a service

    (CaaS) is a form of container-based virtualization in which container engines, orchestration and the underlying compute resources are delivered to users as a service from a cloud provider. The basic resource for CaaS is a container, rather than a virtual machine (VM) or a bare metal hardware host system” http://searchcloudcomputing.techtarget.com/definition/Containers-as-a-Service-CaaS Container-as-a-Service
  37. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  38. © Copyright 2000-2016 TIBCO Software Inc. Some Middleware examples Integration

    Services / APIs, Integration, Orchestration Log Management Monitor distributed Microservices in a central way API Management Publish and Monetize Microservices (internal, partner, public) Event Processing Correlation of Microservices events in real time All the above Middleware components … •  require agility and flexiblity •  control and leverage other Microservices •  have to support Microservice characteristics itself (Containers, CI / CD, Elastic Scalability, etc.) to fit into a cloud-native architecture Microservices and Containers in the Middleware World
  39. © Copyright 2000-2016 TIBCO Software Inc. PaaS Integration Middleware Backend

    Legacy Apps ESB & Common Services Integration Apps & Services Functional Microservices Omnichannel client apps Microservices (Node/Java/Python) Microservices (Node/Java/Python) Microservices (Node/Java/Python) API
 Choreography Integration PaaS Functional Microservices Build focused business functionality-oriented apps without getting into code complexity API Choreography Visually choreograph APIs leveraging the PaaS Integration Tooling (e.g. data mapper, connectors) Integration Apps & Services Build consumable Web APIs out of backend web services like SOAP, SAP, Oracle, IBM MQ, etc.
  40. © Copyright 2000-2016 TIBCO Software Inc. Log Management Middleware Opera'onal

    Intelligence Pla1orm ü  Centralize and Store of Record ü  Search, Auto-id, OOTB Parsing, Correla'on ü  Forensics and Alerts ü  Reports Sensors Applica'on Logs Transac'ons Monitoring Configura'on Messaging Streaming Analy'cs Data Discovery WEB UI WS API Analysis Tools
  41. © Copyright 2000-2016 TIBCO Software Inc. API Management Middleware TRAFFIC

    MANAGEMENT API PACKAGER SECURITY ANALYTICS API Gateway TRAFFIC MANAGEMENT ADVANCED SECURITY TRANSFORM PORTAL APIs API Packaging and Distribution API Creation API Management
  42. © Copyright 2000-2016 TIBCO Software Inc. Event Processing Middleware Voltage

    Temperature Vibration Device history Temporal analytic: “If vibration spike is followed by temp spike then voltage spike [within 12 minutes] then flag high severity alert.” Correlation of Microservice Events in Real Time
  43. © Copyright 2000-2016 TIBCO Software Inc. 1)  Digital Transformation 2) 

    Middleware 3)  Microservices and Containers 4)  A Cloud-Native Architecture 5)  Cloud Native Middleware 6)  Live Demo Agenda
  44. © Copyright 2000-2016 TIBCO Software Inc. Cloud Native Middleware Architecture

    for the Live Demo TIBCO ESB Gateway App BW CE App BW CE App Cloud Foundry BW6 Node App Spring App Gateway App Partner App .com Web App Android App iPhone App EMS MongoDB ROUTER CONTROLLER HEALTH MGR NATS LOGGING SVC BROKER BW CE App Java App eFTL SaaS PaaS “Legacy”
  45. © Copyright 2000-2016 TIBCO Software Inc. Live Demo •  Cloud

    (PaaS, Microservices, Container) •  IDE (REST, APIs, Integration) •  Administration (Deployment, Versioning) •  Operations (Failover, Scalability, Log Management) •  Log Management (Distributed Search and Correlation) •  Open API (Packaging, External Discovery) Cloud-Native Middleware with Pivotal Cloud Foundry, Docker, Kubernetes, TIBCO BusinessWorks Container Edition, TIBCO Mashery and Papertrail
  46. © Copyright 2000-2016 TIBCO Software Inc. •  A cloud-native architecture

    enables flexible and agile development •  Modern middleware leverages containers and Microservices •  Just using Jenkins and Docker is not enough Key Takeaways