microservices and ibm bluemix meetup presentation

Download Microservices and IBM Bluemix meetup presentation

Post on 12-Apr-2017




6 download

Embed Size (px)


PowerPoint Presentation

Microservices and IBM BluemixTony ErwinBluemix UI ArchitectIBM Cloud Bluemixaerwin@us.ibm.com@tonyErwin

Carlos FerreiraPrinciple Technical Product ManagerIBM Cloud BluemixCarlos.Ferreira@us.ibm.com@carlosTweets

2015 IBM Corporation


AgendaThe motivation for when to use or not use MicroservicesElements of a Microservice architecture Why DevOps is critical to the success of Microservices?Key capabilities required to develop Microservices in BluemixRe-architecting the Bluemix UI with a microservices architecture



What are microservices?Is an architecture style, in which large complex software applications are composed of one or more services.Can be deployed independently of one another and are loosely coupledSmall and focused on completing one taskCommunication typically done through language-neutral APIs, typically an Hypertext Transfer Protocol (HTTP)-based resource API using REST2


Comparing monolithic and microservices architectures3


Benefits of microservices for developersEnables you to avoid large code base & easier to maintain or add to featuresUse existing skills, or the most optimal languageImproves deployment times and load times for IDEMakes debugging easierEnables teams to work more independently of each otherSimplifies tracking code dependenciesEnables complete ownership by a self-contained single team, from definition through development, deployment, operations, and sunsettingMakes it easier to scale bottlenecks4


Benefits of microservices for businessAgility easier to respond to new customer and market needs Allows for more frequent delivery and faster delivery times which means quicker feedback cycles and pivotingSmaller focused teams that align with business revenue and cost centers means:Improved productivityBetter visibility to where resources are allocatedUsage enables movement from low impact business areas to new or higher impact business areasBetter user experienceResponse times enabled by scaling individual microserviceAvailability enabled by resiliencyuser experienceEnables new business models API Economy5


Example business drivers6

See interview with Stefan Piesche CTO to see Constant Contacts motivation for adopting microservices: https://www.youtube.com/watch?v=oKMGObPMvBw


Moving from monolithic applications to microservices7

Monolithic appMicro services


Benefits from microservices for operationsFewer reviews and approvals versus monolith applicationsEnables service management teams to more easily support multiple product and service teamsEnables automating deployment, logging, and monitoring practices across multiple microservice project teamsEasier to identify problems and get supportApplications become more resilient as you adopt a microservices architectural style8


Customers interviewed expect to realize a cost savings of 3 to 1 by automating much of the infrastructure and platform as a service (PaaS)


What to avoid9


Dontforget about DevOpsmanage your own infrastructurecreate too many microservicesmake services too granular or require too many dependencies10


Dont even think about microservices without DevOpsMicroservices cause an explosion of moving parts. It is not a good idea to attempt toimplement microservices without serious deployment and monitoring automation. You shouldbe able to push a button and get your app deployed. In fact, you should not even do anything.Committing code should get your app deployed through the commit hooks that trigger thedelivery pipelines in at least development. You still need some manual checks and balancesfor deploying into production. See Chapter 3, Microservices and DevOps on page 39 tolearn more about why DevOps is critical to successful microservice deployments.1.3.3 Dont manage your own infrastructureMicroservices often introduce multiple databases, message brokers, data caches, and similarservices that all need to be maintained, clustered, and kept in top shape. It really helps if yourfirst attempt at microservices is free from such concerns. A PaaS, such as IBM Bluemix orCloud Foundry, enables you to be functional faster and with less headache than with aninfrastructure as a service (IaaS), providing that your microservices are PaaS-friendly.1.3.4 Dont create too many microservicesEach new microservice uses resources. Cumulative resource usage might outstrip thebenefits of the architecture if you exceed the number of microservices that your DevOpsorganization, process, and tooling can handle. It is better to err on the side of larger services,and only split when they end up containing parts with conflicting demands for scaling,lifecycle, or data. Making them too small transfers complexity away from the microservicesand into the service integration task. Dont share microservices between systems.10

AgendaThe motivation for when to use or not use MicroservicesElements of a Microservice architecture Why DevOps is critical to the success of Microservices?Key capabilities required to develop Microservices in BluemixHow Microservices are utilized to design and implement Bluemix



Design and test for failureMind-set shift: acceptance of the fact that isolated failures are inevitableDesign and test to keep the system functioning for as long as possiblePatterns:Circuit breaker - Fall back logic ensures failures do not adversely affect the entire systemBulkhead Partitioning to isolate other software and hardware based system failures12


Circuit Breaker pattern13


Bulkhead pattern14


Netflix Application Architecture

EdgeServicesHTTP APIAuthA/B TestsMember DataRecommendationsMovie DataRatingsSimilar MoviesNetwork BoundaryXBOXWeb SiteCall CentreAndroidIPhoneWiiPS3Client CodeClient Adapter CodeServer CodeDecompose application into many calls to microservicesDevice makes only one call to the API to minimise WAN latency

API Gateway pattern16


Interprocess communicationSynchronous HTTP-based mechanisms, such as Representational State Transfer (REST) or WebSockets, which enable keeping a communication channel between browser and server for request/responseAsynchronous messaging using a message broker or event driven17


Synchronous messaging is a simple and familiar mechanism, which is firewall-friendly. Thedisadvantage is that it does not support other patterns, such as a publish/subscribe model.The publish/subscribe messaging style is more flexible than point-to-point queuing, because itenables multiple receivers to subscribe to the flow of messages. This enables moremicroservices to be easily added on to the application.It also does not allow queuing of requests, which can act as a kind of shock absorber.Asynchronous messaging decouples the services from each other in time, enabling thesending thread to get on with work while the messaging system takes responsibility for themessage, keeping it safely until it can be delivered to the destination.With synchronous applications, both the client and server must be simultaneously available,and the clients always need to know the host and port of the server, which is not alwaysstraightforward when services are auto-scaling in a cloud deployment. In such scenarios, oneof the service discovery mechanisms described previously is required.Alternatively, an asynchronous mechanism uses a message broker, which decouples themessage consumers and producers. The message broker buffers messages until theconsumer is able to process them.A further benefit of messaging is that the back-end applications behind the queue candistribute workload among several clients. This type of worker offload scenario enablesdevelopers to build scalable, responsive applications. Implementing one or more instances ofa back-end worker application enables the putting application to continue its work without theneed to wait for the back-end application to complete.There are pros and cons to both approaches. Most applications use a combination of the twoapproaches to suit their needs.17

Focused business capability

Cross-functional teams

Communication via API ONLY!!

Decoupled & asynchronous using messaging / events to remove peer-to-peer dependencies

REST communication

Decentralized & isolated data

Designed and tested for failure

Evolutionary design with pluggable architecture

Enabled by continuous delivery & DevOpsSummary of a microservice architecture



How is this different than service-oriented architecture?Are not discovered at run timeDo not require mediationBusiness motivation is focused on immediate ROI and not enterprise business tranformational or driven primarily by reuse



AgendaThe motivation for when to use or not use MicroservicesElements of a Microservice architecture Why DevOps is critical to the success of Microservices?Key capabilities required to develop Microservices in BluemixRe-architecting the Bluemix UI with a microservices architecture



DevOpsIs the set of concepts, practices, tools, and team organizational structures that enable organizations to more quickly release new capabilities to their clients. Organizations that adopt DevOps are more easily able to release and monitor their microservicesCommonly includes the following processes:Agile practices (http://agilemanifesto.org/principles.html)Continuous integrationRelease automationFunctional un