What is a Microservice

Download What is a Microservice

Post on 13-Feb-2017

212 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

<ul><li><p>Copyright 2016, Oracle and/or its affiliates. All rights reserved. | </p><p>Microservices and SOA CON7364 </p><p>Luis Weir Oracle Ace Director Principal, Capgemini Robert Wunderlich Sr. Principal Product Manager September 22, 2016 </p></li><li><p>Microservices and SOA Oracle OpenWorld San Francisco | September 18-22, 2016 </p><p>Luis Weir luis.weir@capgemini.com </p><p>uk.linkedin.com/in/lweir @luisw19 </p><p>soa4u.co.uk/ </p><p>mailto:luis.weir@capgemini.comhttp://uk.linkedin.com/in/lweirhttps://twitter.com/Luisw19http://www.soa4u.co.uk/</p></li><li><p>4 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Table of Contents </p><p>What is a Microservice 1 </p><p>Microservices vs. SOA 2 </p><p>Reference Architecture 3 </p><p>Use Cases 4 </p></li><li><p>Introduction </p></li><li><p>6 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Resume </p><p>I am very passionate about technology. I have be the lead authored of two books (Oracle SOA Governance 11g Implementation and Oracle API Management 12c </p><p>Implementation), I am a regular blogger and speaker in major conferences and events. A well-known industry expert especially when it comes to Oracle middleware </p><p>technologies I am also an OTN certified SOA black belt. </p><p>Luis Weir </p><p>Oracle Ace Director Cloud Principal at Capgemini UK </p><p>I am an Oracle Ace Director, Cloud Principal and a Thought Leader specialised in Oracle Fusion Middleware &amp; Oracle PaaS. With more than 15 </p><p>years of experience implementing IT solutions across the globe, I have been exposed to a wide wide variety of business problems many of which </p><p>Ive helped solved by adopting SOA architectural styles such as traditional SOA, API management and now Microservices. My current focus is in </p><p>assisting organisations define and implement solutions and strategies that can help them realise the benefits that such technologies have to offer. </p><p>2nd Place </p><p>1st OTN Cloud </p><p>Hackathon </p><p>June, 2016 </p><p>Cloud </p><p>Contribution Award </p><p>SOA Community </p><p>March, 2016 </p><p>Latest Media: Oracle Magazine May/June 2016 </p><p>(http://bit.ly/1RTCAU3) </p><p> Systematic Approach for Migrating to Oracle Cloud </p><p>SaaS (http://bit.ly/1Xr6acs) </p><p> Oracle Magazine Jan/Feb 2016 (http://ora.cl/Vhh) </p><p> API Management Implementation </p><p>(http://ora.cl/Gcw) </p><p> A Word About Microservices and SOA </p><p>(http://bit.ly/25Dk5go) </p><p>https://www.packtpub.com/application-development/oracle-api-management-12c-implementationhttps://www.packtpub.com/application-development/oracle-soa-governance-11g-implementationhttp://bit.ly/1RTCAU3http://bit.ly/1RTCAU3http://bit.ly/1Xr6acshttp://bit.ly/1Xr6acshttp://ora.cl/Vhhhttp://ora.cl/Vhhhttp://ora.cl/Vhhhttp://ora.cl/Gcwhttp://ora.cl/Gcwhttp://ora.cl/Gcwhttp://bit.ly/25Dk5gohttp://bit.ly/25Dk5gohttps://blogs.oracle.com/soacommunity/entry/fusion_middleware_partner_community_awards2https://www.packtpub.com/application-development/oracle-soa-governance-11g-implementationhttps://www.packtpub.com/application-development/oracle-api-management-12c-implementation</p></li><li><p>What is a Microservice The three aspects of Microservices according to me!! </p></li><li><p>8 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>What is a Microservice? </p><p>Functional decomposition of systems </p><p>into manageable and independently </p><p>deployable components, Microservice Architectures by Dr. Andreas Schroeder </p><p>(http://bit.ly/1TOGZK8) </p><p>Loosely coupled service oriented architecture with bounded context, </p><p> Adrian Cockcroft, April 2015 </p><p>http://bit.ly/1TOGZK8http://bit.ly/1TOGZK8</p></li><li><p>9 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>The three aspects of Microservices Architecture (according to me!) </p><p>Organizational Technical </p><p>Architectural </p></li><li><p>10 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Technical </p><p>Deployed independently Run on its own process </p><p>Scales independently Isolates faults </p><p>Is stateless Owns its data </p><p>Microservice </p></li><li><p>11 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Architectural </p><p>Microservice </p><p>Single responsibility Bounded context </p><p>Choreographed API gateways </p><p>Polyglot Smart endpoint and </p><p>dump pipe </p></li><li><p>12 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>You build it you run it </p><p>Organisational </p><p>Microservice </p><p>Small teams Teams organized around </p><p>business capabilities </p><p>Products not projects </p><p>Culture of automation Decentralised governance </p></li><li><p>Microservice vs. SOA Key differences and communalities </p></li><li><p>14 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Inspiration from Martin Fowlers Microservices presentation at </p><p>GOTO conference, Berlin November 2014 (minute 14) </p><p>https://www.youtube.com/watch?v=wgdBVIX9ifA </p><p>Microservices vs SOA </p><p>The value of the term microservices is that </p><p>it allows to put a label on a useful subset of </p><p>the SOA terminology, </p><p>Martin Fowler (minute 14), GOTO conference, </p><p>Berlin November 2014 </p><p>SOA Typically adopted to deliver horizontal </p><p>integrations </p><p>Traditional </p><p>SOA </p><p>(i.e. AIA) </p><p>Best for vertical </p><p>integrations </p><p>Not for </p><p>integration. </p><p>Best for building </p><p>modern systems </p><p>API </p><p>Management </p><p>Microservices </p><p>Architecture </p><p>Wrong comparison The difference lies in the realisation style to implement SOA </p><p>https://www.youtube.com/watch?v=wgdBVIX9ifAhttps://www.youtube.com/watch?v=wgdBVIX9ifA</p></li><li><p>15 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Microservices vs SOA Technical Stack </p><p>Modern Monolith </p><p>Any Hardware </p><p>Hardware Resources </p><p>Host OS </p><p>Hypervisor (type 1 or 2) </p><p>Guest OS (VMs) </p><p>Bin/Libs (MREs, Interpreters, etc) </p><p>Application Server </p><p>Application (ie. ESB) </p><p>Services </p><p>Container Engine </p><p>Relational Database </p><p>Legacy Monolith </p><p>Mainframe </p><p>(ie IBM System Z, S/360) </p><p>Storage </p><p>(ie. DB2, IMS/DB) </p><p>Hypervisor (ie. PR/SM Type 1) </p><p>Hardware Resources </p><p>(ie. DADB, IDMS,IEDN) </p><p>Operating System </p><p>(ie. z/OS, z/VSE) </p><p>Batch Services </p><p>(ie JCL,JES,3rd p.) </p><p>Application Services (ie. CICS) </p><p>Microservice Architecture </p><p>Any Hardware </p><p>Hardware Resources </p><p>Host OS </p><p>Guest OS (VMs) </p><p>Scala </p><p>Java </p><p>Ruby </p><p>Node </p><p>Jolie </p><p>Services </p><p>Container Engine </p><p>Bin/Libs </p><p>Bin/Libs Bin/Libs Bin/Libs </p><p>Container Engine </p><p>Bin/Libs Hypervisor (type 1 or 2) </p><p>Mongo </p><p>Cassandra </p><p>Oracle HBase </p><p>Neo4j </p></li><li><p>16 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Architectural </p><p>Pattern Traditional SOA MSA </p><p>Monolith pattern (http://bit.ly/1Gjr2Y0) Yes No </p><p>Polyglot Programming &amp; Persistence </p><p>(http://bit.ly/18BvDIj &amp; http://bit.ly/1XYiak2) </p><p>Not traditionally (use of Suites) Yes </p><p>API gateway pattern (http://bit.ly/1WTyNLJ) Yes Yes </p><p>Orchestration (http://bit.ly/1U0SWil) Yes No </p><p>Choreography (http://bit.ly/1ssALZQ) No Yes </p><p>Event Collaboration (http://bit.ly/25Dk7oE) Yes Yes </p><p>Canonical Schema (http://bit.ly/1r6KkfK) Very common No </p><p>Schema centralization (http://bit.ly/1sVlqkc) Very common No </p><p>Decouple Contract (http://bit.ly/1O8mVpm) Yes Could be. </p><p>Bounded Context (http://bit.ly/1o7AK8B) Some times Yes </p><p>Ubiquitous Language (http://bit.ly/1c8nXQe) Some times Yes </p><p>Bulkhead (http://bit.ly/1c8nXQe) Not really Yes </p><p>Tolerant Reader (http://bit.ly/1aa4mr9) Some times Yes </p><p>Client-side Service Discovery </p><p>(http://bit.ly/1OunUyq) </p><p>Initially only (service registry) Recommended </p><p>Server-side Service Discovery </p><p>(http://bit.ly/1X3RmzA) </p><p>Yes Yes </p><p>ESB Pattern (http://bit.ly/1ZlSKeT) Yes Across bounded contexts (dump pipe) </p><p>http://bit.ly/1Gjr2Y0http://bit.ly/18BvDIjhttp://bit.ly/1XYiak2http://bit.ly/1WTyNLJhttp://bit.ly/1U0SWilhttp://bit.ly/1ssALZQhttp://bit.ly/25Dk7oEhttp://bit.ly/1r6KkfKhttp://bit.ly/1sVlqkchttp://bit.ly/1O8mVpmhttp://bit.ly/1o7AK8Bhttp://bit.ly/1c8nXQehttp://bit.ly/1c8nXQehttp://bit.ly/1aa4mr9http://bit.ly/1OunUyqhttp://bit.ly/1X3RmzAhttp://bit.ly/1ZlSKeT</p></li><li><p>17 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Choreography vs Orchestration Which one is which? </p></li><li><p>18 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Bounded Context </p><p>Gather together those things that change for the same reason, and separate those things that change </p><p>for different reasons The single responsibility principle by Robert C. Martin, November 2009, http://bit.ly/1VDgw79 </p><p>Domain driven design (DDD) divides up a large system into Bounded Contexts, each of which can have a unified model </p><p>essentially a way of structuring Multiple Canonical Models. </p><p>Opportunity </p><p>Pipeline Territory </p><p>Customer </p><p>Product </p><p>Customer </p><p>Product </p><p>Ticket </p><p>Defect </p><p>Product </p><p>Version </p><p>Sales </p><p>Person </p><p>Sales Context Support Context </p><p>Use Bounded Context </p><p>to Separate Concerns </p><p> Bounded context by Martin Follower, January 2014 </p><p>http://martinfowler.com/bliki/BoundedContext.html </p><p>http://bit.ly/1VDgw79http://bit.ly/1VDgw79http://bit.ly/1VDgw79http://martinfowler.com/bliki/BoundedContext.htmlhttp://martinfowler.com/bliki/BoundedContext.htmlhttp://martinfowler.com/bliki/BoundedContext.html</p></li><li><p>19 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>How to eat the Elephant? </p><p>One piece a the time! Understand the </p><p>problem. Slice and dice </p><p>your elephant by </p><p>defining boundaries in </p><p>the business </p><p>capabilities. Modernise </p><p>one piece at the time. </p><p>Starting small </p><p>Rep</p><p>len</p><p>ish</p><p>men</p><p>t </p><p>Ord</p><p>ers</p><p>Sales </p><p>Orders </p><p>Logistic</p><p>s </p><p>Tracking </p></li><li><p>20 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Recommend </p><p>Domain Driven Design &amp; Microservices </p><p>by Eric Evans </p><p>https://www.youtube.com/watch?v=yPvef9R3k-M </p><p>Goto Berlin, Nov 2014 </p><p>Principles of Microservices </p><p>By Sam Newman </p><p>https://www.youtube.com/watch?v=PFQnNFe27kU </p><p>Devoxx Belgium, Nov 2015 </p><p>https://www.youtube.com/watch?v=yPvef9R3k-Mhttps://www.youtube.com/watch?v=yPvef9R3k-Mhttps://www.youtube.com/watch?v=yPvef9R3k-Mhttps://www.youtube.com/watch?v=yPvef9R3k-Mhttps://www.youtube.com/watch?v=yPvef9R3k-Mhttps://www.youtube.com/watch?v=PFQnNFe27kUhttps://www.youtube.com/watch?v=PFQnNFe27kUhttps://www.youtube.com/watch?v=PFQnNFe27kUhttps://www.youtube.com/watch?v=PFQnNFe27kU</p></li><li><p>21 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>MSA Operations Model Traditional Operations Model </p><p>Organisational </p><p>Development and support teams organized by technologies </p><p>resulting in siloes(Conways law in action) </p><p>SO</p><p>A </p><p>Su</p><p>pp</p><p>ort</p><p>Te</p><p>am</p><p>DB</p><p>Su</p><p>pp</p><p>ort</p><p>Te</p><p>am</p><p>UI </p><p>Su</p><p>pp</p><p>ort</p><p>tea</p><p>m UI </p><p>Dev Team </p><p>Database </p><p>Dev Teams </p><p>SOA </p><p>Dev Team </p><p>Pro</p><p>ject T</p><p>ea</p><p>ms </p><p>Coms </p><p>Gaps </p><p>Multi-disciplinary [small] teams organized by business </p><p>capability resulting in modular systems </p><p>Customer UI </p><p>DB MW </p><p>Orders UI </p><p>DB MW </p><p>Items UI </p><p>DB MW </p><p>Shipment UI </p><p>DB MW </p><p>DevOps / Continuous Delivery </p><p>Customer </p><p>Microservice </p><p>Orders </p><p>Microservice </p><p>Items </p><p>Microservice </p><p>Shipment </p><p>Microservice </p></li><li><p>22 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Recommend </p><p>Modeling Microservices at Spotify with </p><p>Petter Mahlen </p><p>http://tinyurl.com/msaspotify </p><p>At a microservices talk in March in Sweden, </p><p>Petter Mahlen, Backend Infrastructure Engineer </p><p>at Spotify, spoke to a packed house at Jfokus </p><p>about microservices. </p><p>http://tinyurl.com/msaspotifyhttp://tinyurl.com/msaspotify</p></li><li><p>Reference Architecture A reference architecture suitable for SOA 2.0: </p><p>Microservices, API Management and Integration </p></li><li><p>24 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>SOA 2.0 Reference Architecture </p><p>SYSTEMS OF ENGAGEMENT </p><p>SaaS </p><p>API Applications </p><p>CX HCM ERP EPM Legacy, etc </p><p>Business APIs </p><p>Single Purpose APIs </p><p>Special Purpose APIs Presentation APIs Partner [B2B] APIs Public [Consumer] APIs </p><p>Microservices </p><p>SYSTEMS OF RECORDS SYSTEMS OF INNOVATION </p><p>SY</p><p>ST</p><p>EM</p><p>S O</p><p>F </p><p>DIF</p><p>FE</p><p>RE</p><p>NT</p><p>IAT</p><p>ION</p><p>$ </p><p>API </p><p>Message Pipe </p></li><li><p>25 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>SOA 2.0 Capability Model </p><p>Message Pipe </p><p>Microservices </p><p>API Applications </p><p>Single Purpose APIs </p><p>Business APIs </p><p>AuthN/AuthZ/API Key Validation Policy Enforcement HTTP Routing Calls Aggregation Light Transformation </p><p>Light Scripting In-memory Cache Rate Limiting/Throttling Streaming REST/SOAP Conversions </p><p>System AuthN/AuthZ Connectivity Adapters Connection &amp; Session </p><p>Management </p><p>Data Transformation Complex Orchestrations &amp; </p><p>Logic </p><p>Protocol/Transport </p><p>Conversions </p><p>Federated AuthN/AuthZ API Key Validation Call Aggregation Tailored Contracts Thread Protection </p><p>Thread Protection Client Backend Logic Scripting Platform/Backend APIs Push Nots/Websockets Polyglot Consumer SDKs </p><p>Polyglot Programming Polyglot Persistency Single Responsibility </p><p>Choreography Stack Independence Auto Scaling </p><p>Message routing Light transformation Reliable Messaging Push Listener Queuing/De-queuing </p></li><li><p>26 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>API Applications </p><p>SOA 2.0 In the Oracle Cloud PaaS </p><p>Microservices </p><p>Message Pipe </p><p>Single Purpose APIs </p><p>Business APIs </p><p>Java Cloud SOA Cloud App Container &amp; Container </p><p>Cloud </p><p>Java Cloud App Container Cloud Mobile Cloud </p><p>API Platform Cloud </p><p>API Platform Cloud </p><p>Integration Cloud Messaging Cloud </p><p>DB and NoSQL Clouds </p></li><li><p>Use Case Modern application based no Microservice Architecture with </p><p>integration to on-premises legacy systems for synchronization </p></li><li><p>28 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Conceptual Solution Architecture </p><p>Order &amp; Fulfillment </p><p>Domain </p><p>Customer Relations </p><p>Domain ERP </p><p>Domain </p><p>(P2C, R2C, </p><p>HR, GL, </p><p>Billing, etc.) </p><p>API Gateway(s) </p><p>Microservice </p><p>Architecture </p><p>Microservice </p><p>Architecture </p><p>Message Pipe </p><p>Mobile Apps </p><p>Adapter </p><p>Adapter </p><p>Contact Customer </p><p>Shipment </p><p>Order Product </p><p>Web Apps Applications </p><p>Async </p><p>Communication </p><p>Sync </p><p>Communication Managed API Microservice Monolith Service Choreography Bounded Context </p></li><li><p>29 Copyright Capgemini and Sogeti 2016. All Rights Reserved </p><p>Microservices and SOA | Oracle OpenWorld | San Francisco | September 18-22, 2016 </p><p>Connectivity Agent </p><p>Modern Application in Oracle PaaS </p><p>Frontend Application </p><p>Application Container </p><p>Cloud PaaS </p><p>API Gateway </p><p>API Platform </p><p>Business API </p><p>Validate </p><p>API-Key </p><p>Limits &amp; </p><p>thr...</p></li></ul>