microservices architecture enables devops: migration to a cloud-native architecture
TRANSCRIPT
Microservices ArchitectureEnablesDevOps:MigrationtoaCloud-NativeArchitecture
ArminBalalaie,AbbasHeydarnooriSharifUniversityofTechnology
Pooyan JamshidiImperialCollegeLondon
Trend(DevOps-Microservices)
A. Balalaie, A. Heydarnoori, P. Jamshidi, Microservices Architecture Enables DevOps: Migration to a Cloud-Native Architecture, IEEE Software, will appear in May/June 2016 special issue on Software Engineering for DevOps. Please drop me an email for the pre-print.
2 IEEE SOFTWARE | PUBLISHED BY THE IEEE COMPUTER SOCIETY 0 7 4 0 - 7 4 5 9 / 1 6 / $ 3 3 . 0 0 © 2 0 1 6 I E E E
Microservices Architecture Enables DevOpsMigration to a Cloud-Native Architecture
Armin Balalaie and Abbas Heydarnoori, Sharif University of Technology
Pooyan Jamshidi, Imperial College London
// This article reports on experiences and lessons learned during incremental migration and architectural refactoring of a commercial mobile back end as a service to microservices architecture. It explains how the researchers adopted DevOps and how this facilitated a smooth migration. //
A LOOK AT the searches related to the term “microservices” on Google Trends revealed that the top searches are now technology driven. This im-plies that the time of general search terms such as “What is microser-vices?” has now long passed. Not only are software vendors (for ex-ample, IBM and Microsoft) using microservices and DevOps practices,
but also content providers (for exam-ple, Netflix and the BBC) have ad-opted and are using them.
In addition, Google Trends re-veals that both DevOps and mi-croservices are growing concepts, with an equal rate of growth after 2014 (see Figure 1). Although Dev-Ops can also be applied to mono-lithic software systems, microservices
enable effective implementation of DevOps by promoting the impor-tance of small teams.1 (For more on DevOps and Microservices, see the related sidebar.)
A microservices architecture is a cloud-native architecture that aims to realize software systems as a package of small services. Each ser-vice is independently deployable on a potentially different platform and technological stack. It can run in its own process while communicat-ing through lightweight mechanisms such as RESTful or RPC-based APIs—for example, Finagle. (REST stands for Representational State Transfer.) In this setting, each ser-vice is a business capability that can utilize various programming lan-guages and data stores and is devel-oped by a small team.2
Migrating monolithic architec-tures to microservices brings in many benefits. In particular, it pro-vides adaptability to technological changes to avoid technology lock-in and, more important, reduced time-to-market and better development team structuring around services.3
Here we explain our experiences and lessons learned during incre-mental migration of Backtory (www.backtory.com), a commercial mo-bile back end as a service (MBaaS), to microservices in the context of DevOps. Microservices help Back-tory in various ways, especially in shipping new features more fre-quently and providing scalability for the collective set of users from differ-ent mobile-app developers.
Furthermore, we report on migra-tion patterns we developed on the basis of our observations in migra-tion projects. Practitioners can use these patterns to migrate monolithic software systems to microservices. In addition, system consultants can use
FOCUS: DEVOPS
PopularSearchTermsonGoogle
buildingmicroservicesdocker microservicesjavamicroservicesmicroservicemicroservices architecturemicroservices examplemicroservices fowlernetflixmicroservicessoamicroservicesspringmicroservices
agiledevopschefdevopsclouddevopsdevopsawsdevopsengineerdevops jobsdevops puppetdevopsreactionsdevops tools
MicroservicesAcloud-nativearchitecture
Developingasingleapplicationasasuiteofsmallservices
Source:http://martinfowler.com/articles/microservices.html
Thereisabareminimumofcentralizedmanagementoftheservices(Polyglot-ness)
Source:http://martinfowler.com/articles/microservices.html
SSaaS (ServerSideasaService)Aplatformthatmakesmobileapplicationdevelopmenteasier
FeaturesofSSaaS
• Mobileapplicationdeveloperscanuseserver-sidecapabilitieswithoutknowinganyserver-sideprogramminglanguages• RDBMSasaService• DefinedatamodelsinSSaaS dashboard• Usethemodels’objectsinmobileapplicationdevelopment• Built-inusermanagement
• ChatasaService• IntegrationwithRDBMSaaS userauthentication
ArchitectureofSSaaS beforethemigration
Reasonsformigration
• On-demandcapabilityofChatasaService• Theneedforareusableresourcemanager• Managementofresourceslikerelationaldatabaseinstances,e.g.MySQL.
• Theneedfordecentralizeddatagovernance• Chatservice’smetadataneededadedicatedplace
• Theneedforautomateddeployment• Theneedforbuilt-inscalability
TargetArchitectureofSSaaS
MigrationStepsIncrementalsteps
PreparingtheContinuousIntegrationPipeline
TransformingDeveloperData toaService
IntroducingContinuousDelivery
IntroducingEdgeServer
IntroducingDynamicServiceCollaboration
IntroducingResourceManager
IntroducingChatServices andDeveloperInfoServices
Clusterization
Monitoring
DeliveryPipeline
TeamFormation
LessonsLearnedExperiencesinmigratingtomicroservices
Deploymentinthedevelopmentenvironmentisdifficultfora
typicaldeveloper
Servicecontractsaredoubleimportant
Distributedsystemdevelopmentneedsskilleddevelopers
Creatingservicedevelopmenttemplatesisimportant
TheresearchonMicroservices hasstartedonlyin2015,Plentyofopportunitiesahead!
1. Kratzke,N.:Aboutmicroservices,containersandtheirunderestimatedimpactonnetworkperformance, CLOUD(March2015).
2. Levcovitz,A.,Terra,R.,Valente,M.T.:Towardsatechniqueforextractingmicroservices frommonolithicenterprisesystems, VEM(September2015).
3. Rahman,M.,Gao,J.:Areusableautomatedacceptancetestingarchitectureformicroservices inbehavior-drivendevelopment, SOSE(March2015).
4. Stubbs,J.,Moreira,W.,Dooley,R.:Distributedsystemsofmicroservices usingdocker andserfnode, IWSG(June2015).
5. Viennot,N.,L´ ecuyer,M.,Bell,J.,Geambasu,R.,Nieh,J.:Synapse:Amicroservices architectureforheterogeneous-databasewebapplications, EuroSys (April2015).
6. Knoche,H.,SustainingRuntimePerformancewhileIncrementallyModernizingTransactionalMonolithicSoftwaretowardsMicroservices,ICPE(2016).
More details? http://arxiv.org/abs/1507.08217
MigrationTransitionGraph
CloudMigrationthroughPatternComposition
• Themigrationpatternscanbeseenasasequenceofactivitiesbywhichanapplicationisgraduallymigratedtothemicro-services.
• Themigrationpatternscanbecomposed(i.e.,executedsequentially)tomoveamonolithicapplicationtomicro-services.
MigrationPatternSelection
Objective MP1 MP2 MP3 MP4 MP5 MP6 MP7 MP8 MP9 MP10 MP11 MP12 MP13 MP14 MP15
Timetomarket -- -- -- -- --
Newcapabilities -- -- -- --
Reduceoperationalcost -- -- -- -- -- --
Leverageinvestments -- -- --
Freeupon-premise resources
Scalability -- -- -- -- -- -- --
Operationalefficiency -- -- -- -- -- -- -- --
Re-h
ost
Clou
dific
atio
nRelocation
RefactorRebinding
Replacement
Mod
erni
zatio
n
Assembly-basedSituationalMigration
Objective MP1 MP2 MP3 MP4 MP5 MP6 MP7 MP8 MP9 MP10 MP11 MP12 MP13 MP14 MP15
Time to market -- -- -- -- --
New capabilities -- -- -- -- --
Reduce operational cost -- -- -- -- -- -- --
Leverage investments -- -- -- -- -- --
Free up on premise resources
Scalability -- -- -- -- -- -- --
Operational efficiency -- -- -- -- -- -- -- --
Assembly-basedMigrationPlanConstruction
Objective MP1 MP2 MP3 MP4 MP5 MP6 MP7 MP8 MP9 MP10 MP11 MP12 MP13 MP14 MP15
Time to market -- -- -- -- --
New capabilities -- -- -- -- --
Reduce operational cost -- -- -- -- -- -- --
Leverage investments -- -- -- -- -- --
Free up on premise resources
Scalability -- -- -- -- -- -- --
Operational efficiency -- -- -- -- -- -- -- --
MigrationPatternMeta-Model
MigrationPatternsinthecontextofCloud-RMM
P. Jamshidi, A. Ahmad, C. Pahl, "Cloud Migration Research: A Systematic Review", IEEE Transactions on Cloud Computing, 2013, DOI:10.1109/TCC.2013.10.
Migration patterns Primarily facilitate
planning
Enable Auto-Deployment of Multi-Tier Systems in Hybrid Cloud Environment
Developing a single application as a suite of small services
Source:http://martinfowler.com/articles/microservices.html
Architecture of SSaaSbefore the migration
Target Architecture of SSaaS
Clusterization
Services are built around business capabilities
Source:http://martinfowler.com/articles/microservices.html
Services are independently deployable by fully automated deployment machinery
Source:http://martinfowler.com/articles/microservices.html
There is a bare minimum of centralized management of the services (Polyglot-ness)
Source:http://martinfowler.com/articles/microservices.html
Transforming DeveloperData to a Service Introducing Continuous Delivery
Introducing Edge Server Introducing Dynamic Service Collaboration Introducing Resource Manager
Deployment in the development environment is difficult for a
typical developer
Service contracts are double important
Distributed system development needs skilled developers
Creating service development templates is important