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

Microservices: Architecture for the Real-time Organization

665a7ca82af87606f4fc83b3d94b5fd5?s=47 Kevin Webber
February 11, 2016

Microservices: Architecture for the Real-time Organization

The real-time organization is responsive to change. Real-time organizations architect their systems to evolve naturally as they adapt to the competitive landscape around them. At the core of real-time organizations are microservices. The microservice architecture (MSA) empowers independent teams within large organizations to move at the pace of startups, freeing them from the constraints of “design by committee” and other architectural anti-patterns that ground productivity within the enterprise to a halt.

We explore all of the relevant patterns of microservices architecture including domain-driven design (DDD), circuit breaker, data pump, saga pattern, distributed transaction, async messaging, etc.

665a7ca82af87606f4fc83b3d94b5fd5?s=128

Kevin Webber

February 11, 2016
Tweet

More Decks by Kevin Webber

Other Decks in Programming

Transcript

  1. Microservices: Architecture for the Real-time Organization

  2. Why microservices?

  3. None
  4. None
  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. None
  12. None
  13. heritage architecture » Single points of failure » Impossible to

    scale out (shared mutable state, etc) » Different non-functional requirements (reads, writes, compute) » Optimized for none! » Long, risky release cycles
  14. What are microservices?

  15. None
  16. None
  17. None
  18. None
  19. None
  20. None
  21. None
  22. None
  23. None
  24. None
  25. Microservices » Ubiquitous language » Well defined models & boundaries

    » Single responsibility » Independantly deployable, scalable, resilient » Communicate via async messaging » Own their data » Don't expose a public API
  26. Approach? Principles » responsive, resilient, elastic, message-driven

  27. Approach? Principles » responsive, resilient, elastic, message-driven Concepts » bounded

    contexts (DDD), event sourcing, CQRS, CAP (eventual consistency)
  28. Approach? Principles » responsive, resilient, elastic, message-driven Concepts » bounded

    contexts (DDD), event sourcing, CQRS, CAP (eventual consistency) Tools » Typesafe Reactive Platform (Play, Akka, Spark)
  29. Concepts and patterns We will cover: » Domain Driven Design

    (DDD) » Async messaging » API management » Dependency management » CQRS & event sourcing » Transactions & ordering
  30. Domain Driven Design

  31. None
  32. None
  33. None
  34. None
  35. None
  36. Going async

  37. None
  38. None
  39. None
  40. None
  41. Async Benefits » Not wasting resources » Memory, CPU, threads

    » Embracing failure » Not expecting a return from a remote service » Designing for all scenarios
  42. Akka Actors » Message driven architecture » Distribution » Location

    transparency » Isolation
  43. API management

  44. None
  45. None
  46. None
  47. None
  48. None
  49. None
  50. None
  51. None
  52. None
  53. None
  54. None
  55. API mgmt. » Messaging patterns » Pub/sub, point-to-point, streaming »

    API gateway » Routing, aggregation, protocol translation » Discovery » Service discovery, registry, versioning
  56. Dependency management

  57. None
  58. None
  59. None
  60. None
  61. None
  62. None
  63. CQRS & event sourcing

  64. None
  65. None
  66. None
  67. None
  68. None
  69. None
  70. None
  71. None
  72. Transactions and ordering

  73. Considerations » ACID doesn't work across location/trust boundaries » No

    2-Phase commits (2PC) » No holding locks for the duration of work » In distributed systems we need to compensate for for failure rather than prevent failure
  74. None
  75. None
  76. What next?

  77. None
  78. None
  79. None
  80. None
  81. None
  82. Microservices with Typesafe » Play for API gateway » Akka

    for core microservices (DDD, CQRS, event sourcing) » ConductR for cluster management (service registry, discovery, architecture visualization, security)
  83. Thank you! Visit https://www.typesafe.com/products/typesafe- reactive-platform to get started Contact info

    » Twitter: @kvnwbbr » Email: kevin.webber@typesafe.com