Comparing Service- Based Architectures
Total Page:16
File Type:pdf, Size:1020Kb
Comparing Service- based Architectures @neal4d nealford.com 1 agenda Micro Service-oriented Service-based 2 Service-oriented Architecture 3 origins: hubs System B System A System C 4 origins: hubs System B System A System C System D (ftp only) 5 origins: hubs System E (http only) System B System A System C System D (ftp only) 6 origins: hubs System E (http only) System B System A System C System D (ftp only) 7 origins: hubs System E (http only) System B Integration System A Hub System C System D (ftp only) 8 origins: hubs System E (http only) System B Integration System A Hub System C System D (ftp only) 9 origins: hubs System E (http only) System B Integration System A Hub System C System D (ftp only) 10 origins: hubs looks great, but what about single point of failure and performance bottleneck considerations? 11 orchestration hub intelligent hub service oriented architecture / enterprise service bus pattern 12 service-oriented architecture abstraction service taxonomy shared resources middleware interoperability 13 service-oriented architecture business services BS BS BS BS BS BS message bus process choreographer service orchestrator enterprise services ES ES ES ES ES ES application services AS infrastructure services IS 14 service-oriented architecture business services BS BS BS BS BS BS messageabstract bus enterprise-level coarse-grained process choreographer owned and defined by business users data represented as WSDL, BPEL, XML, etc. service orchestrator no implementation - only name, input, and output enterpriseAre we services in the businessES ES ES of…?ES ES ES ExecuteTrade application services ASPlaceOrder infrastructureProcessClaim services IS 15 service-oriented architecture owned by shared services teams business services BS BS BS BS BS BS concrete message bus enterprise-level coarse-grained process choreographer custom or vendor implementationsservice orchestrator that are one-to-one or one-to-many relationship with business services enterprise services ES ES ES ES ES ES application services AS infrastructure services IS CreateCustomer CalcQuote ValidateTrade 16 service-oriented architecture owned by application teams business services BS BS BS BS BS BS concrete message bus application-level fine-grained process choreographer bound to a specificservice application orchestrator context AddDriver UpdateAddress CalcSalesTax enterprise services ES ES ES ES ES ES application services AS infrastructure services IS 17 service-oriented architecture owned by infrastructure or shared services teams business services BS BS BS BS BS BS concrete message bus enterprise-level fine-grained process choreographer implements non-business functionality to support both enterprise and businessservice services orchestrator WriteAudit CheckUserAccess LogError enterprise services ES ES ES ES ES ES application services AS infrastructure services IS 18 service-oriented architecture business services BS BS BS BS BS BS message bus process choreographer service orchestrator mediation and routing message enhancement enterprise services ES ES ES ES ES ES process choreography message transformation AS IS service application orchestration services infrastructureprotocol transformation services 19 service-oriented architecture mediation and routing business services BS BS BS BS BS BS message bus enterprise services ES ES ES ES ES ES 20 service-oriented architecture process choreography request request business services BS BS BS BS BS BS message bus process choreographer 21 service-oriented architecture service orchestration request request message bus service orchestrator enterprise services ES ES ES ES ES ES 22 service-oriented architecture service registry calcQuote() enterprise service business service servic service registry CreateQuote enterprise saveQuote() service location, name, and CreateQuote implementation calcQuote https://grid1/CalcQuote transparency service saveQuote registry rmi://atlas:1299/saveQuote 23 service-oriented architecture message enhancement cusip, mm/dd/yy sedol, yyyy.mm.dd, symbol client enhance enterprise servic application message service 037833100 037833100 2046251 2046251 04/23/15 04/23/15 2015.04.23 2015.04.23 AAPL AAPL contract decoupling 24 service-oriented architecture message transformation xml java object client transform enterprise servic application message service xml xml java object java object contract decoupling 25 service-oriented architecture protocol transformation SOAP/WS RMI/IIOP client transform enterprise servic application protocol service ATMI enterprise service access decoupling implementation transparency 26 service-oriented architecture business services BS BS BS BS BS BS message bus process choreographer service orchestrator enterprise services ES ES ES ES ES ES application services AS infrastructure services IS 27 service-oriented architecture CreateQuote message bus CreateCustomer CalcQuote message bus message bus AddDriver AddVehicle CheckDMV message bus WriteAudit 28 service-oriented architecture business services BS BS BS BS BS BS message bus process choreographer service orchestrator enterprise services ES ES ES ES ES ES application services AS infrastructure services IS maximize reuse maximize canonicality 29 service-oriented architecture business services BS BS BS BS BS BS message bus process choreographer service orchestrator enterprise services ES ES ES ES ES ES application services AS infrastructure services IS incremental change operationally coupled 30 Microservice Architecture 31 domain driven design 32 bounded context + 33 microservices architecture client requests client requests client requests api layer 34 microservices architecture distributed architecture client requests client requests client requests api layer 35 microservices architecture separately deployed components client requests client requests client requests api layer 36 microservices architecture service component client requests client requests client requests api layer 37 microservices architecture bounded context client requests client requests client requests api layer 38 bounded context ≠ entity checkout shipping 39 prefer duplication over coupling checkout SOA shipping Customer 40 prefer duplication over coupling checkout microservices shipping 41 smart endpoints, dumb pipes <— HTTP —> <— messaging —> 42 standardize on integration, not platform embrace polyglot solutions where sensible too few too many Building languages/platforms Microservices languages/platforms DESIGNING FINE-GRAINED SYSTEMS Have one, two or maybe three ways of integrating, not 20. Sam Newman Building Microservices DESIGNING FINE-GRAINED SYSTEMS Building Microservices Standardize in the gaps between DESIGNING FINE-GRAINED SYSTEMS services - be flexible about what Pick some sensible conventions, happens inside the boxes Sam Newman and stick with them. Sam Newman 43 technical consistency integration metrics service behavior Building downstream Microservices DESIGNING FINE-GRAINED SYSTEMS Consider Service Templates to make it easy to do the right thing! Sam Newman 44 decentralized governance 45 decentralized data management ACID versus BASE 46 d ecentralized data management Building Microservices DESIGNING FINE-GRAINED SYSTEMS Avoid distributed transactions if at all possible Sam Newman 47 infrastructure automation 48 microservices architecture service orchestration process process process claims quotes adjustments update customer notification front orchestrator 49 microservices architecture service orchestration process process process claims quotes adjustments update customer notification 50 microservices architecture service orchestration process process process claims quotes adjustments update customer notification 51 microservices architecture service orchestration process process process claims quotes adjustments update customer notification 52 microservices architecture service orchestration process process process claims quotes adjustments update customer notification 53 consumer driven contracts http://martinfowler.com/articles/consumerDrivenContracts.html 54 microservices architecture client requests client requests client requests api layer maximize easy evolution 55 support ∆ Microservice is the first architectural style developed post-Continuous Delivery. 56 microservice implementation PCI Level 1 !! http://2012.33degree.org/pdf/JamesLewisMicroServices.pdf http://www.infoq.com/presentations/Micro-Services 57 Service-based Architecture 58 service-based architecture is there a middle ground? service-oriented microservices architecture architecture service-based architecture 59 service-based architecture service database integration granularity scope hub 60 service-based architecture service granularity client requests client requests client requests api layer 61 service-based architecture service granularity client requests client requests client requests user interface layer 62 service-based architecture service granularity single-purpose micro-service to "portion of the application" macro-service macro-services resolves orchestration and transactional issues allows for complex business processing within a service context - 63 service-based architecture service granularity single-purpose micro-service to "portion of the application" macro-service services become harder to develop and test deployment pipeline requires more planning change control becomes more difficult - 64 service-based architecture database scope client requests client requests client requests api layer 65 service-based architecture database scope client