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

Moderne Software-Entwicklung - Episode 1: Flexi...

Moderne Software-Entwicklung - Episode 1: Flexible Microservices-Architekturen

Christian Weyer

May 17, 2017
Tweet

More Decks by Christian Weyer

Other Decks in Programming

Transcript

  1. § Co-founder, co-owner and principal consultant at Thinktecture AG §

    Focus on § Mobile & web-based application architectures § Interoperability, cross-device § Pragmatic end-to-end solutions § Microsoft MVP for ASP.NET (Architecture) ASPInsider, AzureInsider § Google GDE for Web Technologies § [email protected] § @christianweyer Christian Weyer Moderne Software-Entwicklung 2 Episode 1: Flexible Microservices-Architekturen
  2. § API-ification – everywhere § Services may be in place,

    but often monoliths § End-to-End functionality - includes business logic & UIs Why? 4 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  3. § Docker / containers § Azure / AWS § Serverless

    § Feature flags § Gitflow § NoSQL § Node.js § No more than 20 lines of code in deployed service § AWS Lambda § Service Fabric Microservices are not… https://lostechies.com/jimmybogard/2016/06/03/what-microservices-is-not/ 9 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  4. § Focused around a business domain § Technology-agnostic API §

    Small § Autonomous Microservices are … https://lostechies.com/jimmybogard/2016/06/03/what-microservices-is-not/ 10 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  5. § Autonomy § Single Responsibility § Isolation § Exclusive State

    § Mobility § Asynchronous Communication Principles of Microservices http://jonasboner.com/bla-bla-microservices-bla-bla/ 11 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  6. § Conway’s Law § „Organizations which design systems ... are

    constrained to produce designs which are copies of the communication structures of these organizations.“ § Teams are created to solve a certain business problem § If you can afford it § If you can build those teams § Communication (inside and outside) is tough, though! One of the Core Ideas of Microservices https://lostechies.com/jimmybogard/2016/06/03/what-microservices-is-not/ 12 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  7. § Lightweight service-based architectures § Functional services with dedicated interfaces

    § Use other services, like database or file system § (JSON-based) HTTPS Web APIs (REST?) § Application push services via WebSocket § SignalR § Socket.io (Well-known) Target Architecture HTTP HTTPS WebSocket Service A Service B Service C Web APIs (ASP.NET, Node.js, …) HTML5-Application (Single-Page Application) Web Cordova Electron Moderne Software-Entwicklung 14 Episode 1: Flexible Microservices-Architekturen
  8. § Web APIs § API Styles § RPC § OData

    § GraphQL § REST § HTTP/2 § WebSockets § Relaying Open & Interoperable Interfaces 16 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  9. § If you are not a hardcore REST-afarian you may

    want to have your interfaces described / documented § Technical for tooling § Human readable § Swagger / OpenAPI may help Describing Web APIs 17 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  10. § Services should register themselves and be discoverable § Consumers

    need to find services § Infrastructure should monitor service availability § E.g. with DNS, Consul § Consider discovery-as-a-service when running in a Cloud Registry, Discovery & Monitoring 18 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  11. § Most likely there are not a lot unsecured microservices

    to be consumed § Think about trusted subsystems where possible § Need to authenticate applications and users § Use token-based approaches § Separate authentication into its own microservice § Apply authorization logic in the functional microservices § Standards may help § OAuth2 § OpenID Connect Security 19 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  12. § Asynchronous message passing § Different message exchange patterns at

    your hand § RabbitMQ as a broker-based system is a good option for many use cases § ZeroMQ may be your choice if you do not need a broker, but fast communication § Consider queue-as-a-service when running in a Cloud Messaging & Queuing 20 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  13. § Always think end-to-end § Letting consumers know that something

    important changed § Push data from services to consumers, near realtime § Platform push § APNS § Windows Push Notification Services § Google Firebase Cloud Messaging § Use with PWAs § Application push § WebSockets, e.g. with SignalR Push 21 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  14. § Scalability § Availability § Deployment § API Versioning §

    Validation § Testing § … and so on ... And much, much more 23 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  15. § Those are just some approaches & patterns – not

    rules J § Pick and choose wisely, really § There are not a lot of Netflix, Facebooks, Twitters out there § Do not over-complicate! Pragmatic == Use-Case-driven 25 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  16. § A lot of projects fail because of overly complex

    architectures – sadly L KISS ! 26 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen
  17. § Try building your functional services as decoupled assets §

    Async communication between microservices may create new challenges § Cloud platforms like Azure or AWS offer microservices-optimized deployment models and runtimes § BUT: What about client applications? UIs? Preliminary Summary 27 Moderne Software-Entwicklung Episode 1: Flexible Microservices-Architekturen