a microservices journey
play

A Microservices Journey Susanne Kaiser @suksr CTO at Just Software - PowerPoint PPT Presentation

A Microservices Journey Susanne Kaiser @suksr CTO at Just Software @JustSocialApps Each Journey is Different People try to copy Netflix, but they can only copy what they see. They copy the results, not the process. Adrian Cockcroft,


  1. A Microservices Journey Susanne Kaiser @suksr CTO at Just Software @JustSocialApps

  2. Each Journey is Different “People try to copy Netflix, but they can only copy what they see. They copy the results, not the process.” Adrian Cockcroft, AWS VP Cloud Architect, former Netflix Chief Cloud Architect

  3. Each Journey is Different Affecting Circumstances Team Structure Skillset Journey Size

  4. Each Journey is Different Affecting Circumstances Legacy Maintenance Runtime Team effort environment Structure Skillset Journey Size

  5. Each Journey is Different Affecting Circumstances Legacy Maintenance Runtime Team effort environment Structure Skillset Journey Strategy Size New Features Timeline / Milestones

  6. Background JUST SOCIAL JUST DRIVE JUST CONNECT JUST LIST JUST WIKI JUST PEOPLE JUST NEWS

  7. At the Beginning A Monolith in Every Aspect One team One technology stack Single Unit One collaboration product

  8. Background After an Evolving Time

  9. Background After an Evolving Time Productivity suffered

  10. Background After an Evolving Time Productivity suffered Usability/UX suffered

  11. Background After an Evolving Time Productivity suffered New features released slowly Usability/UX suffered

  12. Background Separate Collaboration Apps JUST DRIVE JUST CONNECT JUST LIST JUST WIKI JUST SOCIAL JUST PEOPLE JUST NEWS

  13. Background Separate, Autonomous Teams Well-defined responsibilites

  14. Background In The Long Run Organisation Software Product

  15. Background Our Motivation for Microservices Autonomous Work at different parts Deploy independently Scale independently Develop independently teams independently At different speed

  16. Decomposition Strategy Identify Bounded Contexts Loose coupling between services High cohesion within a service

  17. Decomposition Strategy Identify Bounded Contexts Loose coupling between services High cohesion within a service Bounded Context Well-defined Related behaviour business function Semantic boundary around domain model

  18. Decomposition Strategy Identify Bounded Contexts Bounded Contexts JUST DRIVE JUST CONNECT JUST LIST JUST PEOPLE JUST NEWS JUST WIKI

  19. Decomposition Strategy Co-Existing Service From Scratch JUST DRIVE

  20. Decomposition Strategy Co-Existing Service From Scratch JUST PEOPLE JUST DRIVE

  21. Decomposition Strategy Co-Existing Service From Scratch REST API JUST DRIVE Application-Service Domain-Model Monolith DB Adapter owns document state

  22. Decomposition Strategy Co-Existing Service From Scratch REST API Application-Service Domain-Model Monolith DB Adapter owns profile document owns document created by state state author

  23. Decomposition Strategy Co-Existing Service From Scratch REST API Application-Service Domain-Model Message Broker Adapter Monolith subscribe publish DB Adapter Message Broker owns profile state Events owns document state local copy of author

  24. Decomposition Strategy Co-Existing Service From Scratch New UI REST API Good approach in general, New Business Logic Application-Service but we did too many steps at once Domain-Model Domain-Event Message Broker Adapter => Not optimal to start with DB Adapter New Data Structure vs.

  25. Decomposition Strategy Incremental Top Down REST API REST Client REST API Monolith Extracting Web App

  26. Decomposition Strategy Incremental Top Down REST API Monolith uses extracted business logic Application-Service REST Client Domain-Model Monolith DB Adapter Extracting Business Logic

  27. Decomposition Strategy Incremental Top Down REST API Application-Service Domain-Model Message Broker Adapter subscribe Monolith publish DB Adapter Message Broker Events Splitting Data Storage

  28. Decomposition Strategy Which One First? Changing Frequently Greatest benefit vs. after extraction Easy to Extract Different Resource Consumption Early experiences w/ Microservices

  29. Cross-Cutting Concerns Authorization JUST DRIVE JUST WIKI Inter-service dependency Fine-grained authorization

  30. Cross-Cutting Concerns Authorization I have a new service that needs authorization. Where is the authz service I could use? Not there, yet. Sorry! Ok, then I am putting my code Ok, then I am implementing authz to the place where authz handling in my local service. exists … to the monolith. Re-implementing authz w/ every Feeding the monolith new service

  31. Cross-Cutting Concerns Handle Them Early Feeding the monolith Re-implementing authz w/ every new service Handle Cross-Cutting Concerns Early

  32. Cross-Cutting Concerns Avoid A Distributed Monolith Authz Service

  33. Cross-Cutting Concerns Avoid A Distributed Monolith translate Authz Service translate One stable translate common contract

  34. Service Interaction Event-Driven / Request-Driven command query command Message Broker Message Broker Events query Events subscribe publish subscribe publish Request-Driven Hybrid Event-Driven

  35. How To Manage Shared Data? Hybrid Model Remote query directly to source REST API Message Broker Events for notification

  36. How To Manage Shared Data? Event Driven State Transfer ProfileUpdatedEvent Message Broker Local copy of profile data Events for data duplication

  37. How To Manage Shared Data? Source Of Truth Multiple sources of truth Single source of truth Internal source of truth Event Log Events as first-class citizens External source of truth “Traditional” Event-Driven System Event Store

  38. Message Broker Event Log Event Stream Messaging System Storage System Streaming Platform

  39. How To Manage Shared Data? Kafka Streams Unbounded, ordered sequence of data records Continuously Key-value pair updating

  40. How To Manage Shared Data? Kafka Streams Running in the same process Service of Microservice Loaded on startup of Microservice Kafka Topic Lightweight embedded state store (disk-backed) Streams make data available wherever it’s needed

  41. How To Manage Shared Data? Kafka Streams Kafka Stream-Table Duality Kafka Streams API join filter KStream KTable group by Changelog of state changes Snapshot of the latest value for each key aggregate (key1, value1), (key2, value2), (key 1, value 3) key1 value3 → key2 value2 → etc.

  42. How To Manage Data? Materialized Views w/ Kafka Streams Document Service REST API Stream Materialized View as State Store Stream-Table-Join Kafka Table for enrichment

  43. How To Manage Shared Data? Event Streams as a Shared Source of Truth Event streams as a Events for notification Events for data duplication shared source of truth Eliminating local copy => reduces Simple integration Simple integration Eliminating remote query => ● ● ● ● duplicating effort Remote query => increasing coupling Remote query => increasing coupling better decoupling ● ● Pushes data to where it’s needed Local copy => better autonomy ● ● Increases pluggability Duplicating effort to maintain ● ● Low barrier to entry for new local dataset ● service

  44. Lessons Learned Start small Handle cross-cutting concerns early One manageable step at a time Be aware of affecting circumstances Avoid a distributed monolith Design event-driven & consider & event streams as shared source of truth Each journey is different :)

  45. Susanne Kaiser @suksr CTO at Just Software @JustSocialApps

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend