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

2019-10-24.code-talks-hamburg.application-integration-patterns.pdf

 2019-10-24.code-talks-hamburg.application-integration-patterns.pdf

One of the implications of applying the microservices architectural style is that a lot of communication between components is done over the network. In order to achieve the promises of microservices, this communication needs to happen in a loosely coupled manner.

One option that many architects have in mind here is that all services expose an API following the REST architectural style. However, there is another option that provides even looser coupling: asynchronous messaging. In discussions with customers we saw that this option is not always on the radar of architects.

In this talk, we want to discuss some fundamental application integration patterns mostly based on messaging and connect them to real-world use cases in a micro services scenario. In doing so, we will also point out some benefits that asynchronous messaging can have over REST APIs for the communication between microservices.

Dirk Fröhner

October 24, 2019
Tweet

More Decks by Dirk Fröhner

Other Decks in Technology

Transcript

  1. © 2019, Amazon Web Services, Inc. or its Affiliates. Dirk

    Fröhner, Solutions Architect, Amazon Web Services [email protected] | @dirk_f5r Application Integration Patterns for Microservices
  2. © 2019, Amazon Web Services, Inc. or its Affiliates. Dirk

    Fröhner, Solutions Architect, Amazon Web Services [email protected] | @dirk_f5r Application Integration Patterns (not only) for Microservices
  3. © 2019, Amazon Web Services, Inc. or its Affiliates. Agenda

    • Introduction • Application integration patterns • Concrete use cases
  4. © 2019, Amazon Web Services, Inc. or its Affiliates. “If

    your application is cloud-native, or large-scale, or distributed, and doesn’t include a messaging component, that’s probably a bug.” Tim Bray Distinguished Engineer AWS Messaging, Workflow Management
  5. © 2019, Amazon Web Services, Inc. or its Affiliates. Potential

    drawbacks of synchronous systems Synchronous systems are tightly coupled. A problem in a synchronous downstream dependency has immediate impact on the upstream callers. Retries from upstream callers can all-too easily fan-out and amplify problems. Photo: Dirk Fröhner
  6. Message exchange One-way Request-response Message channel Receiver No response expected

    Synchronous vs. fire-and-forget Response expected Return address Correlation ID Sender Message channel Responder Requester Message channel
  7. Message channels Point-to-point (queue) Publish-subscribe (topic) Consumed by one receiver

    Easy to scale Flatten peak loads Consumed by all subscribers Durable subscriber Receivers Sender Queue Subscribers Publisher Topic
  8. Message channels Point-to-point (queue) Publish-subscribe (topic) AWS service for queue

    functionality: Amazon Simple Queue Services (SQS) Serverless & cloud-native AWS service for topic functionality: Amazon Simple Notification Service (SNS) Serverless & cloud-native Receivers Sender Subscribers Publisher Amazon SQS Amazon SNS
  9. Message channels Point-to-point (queue) Publish-subscribe (topic) AWS service for queue

    functionality (non-serverless): Amazon MQ (managed Apache Active MQ) For apps constrained to protocols like JMS, AMQP, etc. AWS service for topic functionality (non-serverless): Amazon MQ (managed Apache Active MQ) For apps constrained to protocols like JMS, AMQP, etc. Receivers Sender Subscribers Publisher Amazon MQ Amazon MQ
  10. Message channels Visibility timeout, inflight messages, message acknowledgement Time receive

    message receive message delete / acknowledge message visibility timeout
  11. Message channels Visibility timeout, inflight messages, message acknowledgement Time receive

    message receive message delete / acknowledge message visibility timeout Time visibility timeout receive message receive message receive message receive message
  12. Message channels Topic-queue-chaining Allows fan-out and receiver scale-out at the

    same time Publisher Topic Queue Queue Receivers Application 1 Application 2
  13. Message routing Message filter Recipient list Receive only a relevant

    subset of messages Controlled by subscriber Publisher remains completely unaware Subscribers Publisher Topic color = blue color = yellow
  14. Message routing Message filter Recipient list Receive only a relevant

    subset of messages Controlled by subscriber Publisher remains completely unaware Send only a relevant subset of messages to a subscriber Controlled by publisher or separate component Potentially adds coupling Subscribers Publisher Subscribers Publisher Topic color = blue color = yellow Recipient List
  15. Message routing Scatter-gather How to distribute a request across potentially

    interested / relevant parties and capture their individual responses? - RFQ scenarios, i.e. search for best response - Parallel processing scenarios, i.e. divide and conquer
  16. Message routing Scatter-gather Requester Topic Responders How to distribute a

    request across potentially interested / relevant parties and capture their individual responses? - RFQ scenarios, i.e. search for best response - Parallel processing scenarios, i.e. divide and conquer
  17. Message routing Scatter-gather Requester Topic Responders Queue How to distribute

    a request across potentially interested / relevant parties and capture their individual responses? - RFQ scenarios, i.e. search for best response - Parallel processing scenarios, i.e. divide and conquer
  18. Message routing Scatter-gather Requester Topic Responders Queue Aggregator Processor How

    to distribute a request across potentially interested / relevant parties and capture their individual responses? - RFQ scenarios, i.e. search for best response - Parallel processing scenarios, i.e. divide and conquer
  19. Message routing Pipes and filters Event triggers chain of processing

    steps (“filters”) Event source Pipe Filter Result target Step 1
  20. Message routing Pipes and filters Event triggers chain of processing

    steps (“filters”) Knowledge of destination for next step(s) is wired into each filter Event source Pipe Filter Filter Pipe Pipe Result target … Filter Step 1 Step 2 Step n
  21. Message routing Pipes and filters Event triggers chain of processing

    steps (“filters”) Knowledge of destination for next step(s) is wired into each filter Similar patterns: chain of responsibility, processing pipeline, saga choreography Event source Pipe Filter Filter Pipe Pipe Result target … Filter Step 1 Step 2 Step n
  22. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Event source Orchestrator Result target
  23. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Workflow participants remain as loosely coupled as possible Processor Event source Orchestrator Step 1 Result target
  24. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Workflow participants remain as loosely coupled as possible Processor Processor Event source Orchestrator Step 1 Step 2 Result target
  25. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Workflow participants remain as loosely coupled as possible Processor Processor Event source Orchestrator … Step 1 Step 2 Result target
  26. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Workflow participants remain as loosely coupled as possible Processor Processor Processor Event source Orchestrator … Step 1 Step 2 Step n-1 Result target
  27. Message routing Saga orchestration Event triggers orchestrated workflow Knowledge of

    workflow is externalized into orchestrator component, as well as for potential rollback Workflow participants remain as loosely coupled as possible Processor Processor Processor Processor Event source Orchestrator … Step 1 Step 2 Step n-1 Step n Result target
  28. Message routing Saga orchestration AWS service for saga orchestration (serverless):

    AWS Step Functions Processor Processor Processor Processor Event source Orchestrator … Step 1 Step 2 Step n-1 Step n Result target
  29. Use case: Submit a ride completion { "from": "...", "to":

    "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion
  30. Use case: Submit a ride completion AWS Cloud { "from":

    "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Unicorn Management Service Wild Rydes Unicorn App https://... submit-ride-completion
  31. Use case: Submit a ride completion AWS Cloud { "from":

    "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion Rides Store Unicorn Management Service
  32. Use case: Submit a ride completion AWS Cloud { "from":

    "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  33. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  34. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Interested in rides with fare >= x distance >= y Rides Store Unicorn Wild Rydes Unicorn App https://... submit-ride-completion Unicorn Management Service 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> }
  35. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Integration via database? Interested in rides with fare >= x distance >= y
  36. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Integration via database? Oh my! Interested in rides with fare >= x distance >= y
  37. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Integration via REST APIs? Interested in rides with fare >= x distance >= y
  38. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Integration via REST APIs? Absolutely, but… Interested in rides with fare >= x distance >= y
  39. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } https://... https://... https://... https://... https://... Recipient list Unicorn Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  40. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } https://... https://... https://... https://... https://... Recipient list service Unicorn Request Distribution Service https://... Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  41. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } https://... https://... https://... https://... https://... Self-managed filtering Unicorn Request Distribution Service https://... Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Interested in rides with fare >= x distance >= y
  42. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } https://... https://... https://... https://... https://... Self-managed filtering Unicorn Request Distribution Service https://... Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service Interested in rides with fare >= x distance >= y Integration via messaging? Absolutely!
  43. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Publish-subscribe (topic) Unicorn Ride Completion Topic Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  44. Use case: Submit a ride completion AWS Cloud Customer Notification

    Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } SNS message filter: fare >= x distance >= y Message filter Unicorn Ride Completion Topic Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service
  45. Use case: Submit a ride completion Unicorn AWS Cloud Customer

    Notification Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Ride Completion Topic Topic-queue-chaining Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service SNS message filter: fare >= x distance >= y
  46. Use case: Prebooking campaigns Wild Rydes Customer Wild Rydes Customer

    App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." }
  47. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Ride Booking Service
  48. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking Ride Booking Service { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebookings Store
  49. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } 201 Created Location: http://... Content-Location: ... { <prebooking-repr> } Ride Booking Service Prebookings Store
  50. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } 201 Created Location: http://... Content-Location: ... { <prebooking-repr> } Ride Booking Service Prebookings Store Massive campaign with CTA: Book today!
  51. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Ride Booking Service Further decoupling
  52. Use case: Prebooking campaigns AWS Cloud Wild Rydes Customer Wild

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Ride Booking Service Further decoupling Prebooking Submission Resource
  53. Use case: Prebooking campaigns AWS Cloud Further decoupling Wild Rydes

    Customer Wild Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebooking Notification Topic Ride Booking Service Prebooking Submission Resource
  54. Use case: Prebooking campaigns AWS Cloud Further decoupling Wild Rydes

    Customer Wild Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebooking Notification Topic 202 Accepted Location: ... Content-Location: ... { <task-status-repr> } Ride Booking Service Prebooking Submission Resource
  55. Use case: Prebooking campaigns AWS Cloud Further decoupling Prebooking Notification

    Buffer Queue Prebooking Processing Buffer Queue Wild Rydes Customer Wild Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebooking Notification Topic Ride Booking Service Prebooking Submission Resource 202 Accepted Location: ... Content-Location: ... { <task-status-repr> }
  56. Use case: Prebooking campaigns AWS Cloud Datalake Ingestion Service Ride

    Booking Service / Prebooking Processing Resource Further decoupling Prebooking Notification Buffer Queue Prebooking Processing Buffer Queue Wild Rydes Customer Wild Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebooking Notification Topic Ride Booking Service Prebooking Submission Resource 202 Accepted Location: ... Content-Location: ... { <task-status-repr> }
  57. Use case: Prebooking campaigns AWS Cloud Datalake Ingestion Service Further

    decoupling Prebooking Notification Buffer Queue Prebooking Processing Buffer Queue Wild Rydes Customer Wild Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Prebooking Notification Topic Ride Booking Service Prebooking Submission Resource 202 Accepted Location: ... Content-Location: ... { <task-status-repr> } Massive campaign with CTA: Book now! Ride Booking Service / Prebooking Processing Resource
  58. Use case: Prebooking campaigns Wild Rydes Customer Wild Rydes Customer

    App https://... AWS Cloud Datalake Ingestion Service Action=SendMessage &MessageBody=... ... Prebooking Notification Topic Even further decoupling Prebooking Notification Buffer Queue Prebooking Processing Buffer Queue Prebooking Submission Buffer Queue 200 OK ... <SendMessageResponse> ... </SendMessageResponse> Ride Booking Service Prebooking Submission Resource Ride Booking Service / Prebooking Processing Resource
  59. Use case: Instant ride RFQ Wild Rydes Customer Wild Rydes

    Customer App https://... submit-instant-ride-rfq { "from": "...", "to": "...", "customer": "..." } Scatter-gather
  60. Use case: Instant ride RFQ Wild Rydes Customer Wild Rydes

    Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service { "from": "...", "to": "...", "customer": "..." } Scatter-gather
  61. Use case: Instant ride RFQ Wild Rydes Customer Wild Rydes

    Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service { "from": "...", "to": "...", "customer": "..." } Scatter-gather 202 Accepted Location: ... Content-Location: ... { "links": { ... }, "status": "...", "eta": "..." }
  62. Use case: Instant ride RFQ Wild Rydes Customer Wild Rydes

    Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service { "from": "...", "to": "...", "customer": "..." } Request For Quotes Topic Scatter-gather 202 Accepted Location: ... Content-Location: ... { "links": { ... }, "status": "...", "eta": "..." }
  63. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource { "from": "...", "to": "...", "customer": "..." } Request For Quotes Topic Scatter-gather … 202 Accepted Location: ... Content-Location: ... { "links": { ... }, "status": "...", "eta": "..." }
  64. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource { "from": "...", "to": "...", "customer": "..." } Request For Quotes Topic Scatter-gather RFQ Response Queue … 202 Accepted Location: ... Content-Location: ... { "links": { ... }, "status": "...", "eta": "..." }
  65. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... submit-instant-ride-rfq AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource { "from": "...", "to": "...", "customer": "..." } Request For Quotes Topic Scatter-gather 202 Accepted Location: ... Content-Location: ... { "links": { ... }, "status": "...", "eta": "..." } RFQ Response Queue …
  66. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... retrieve-rfq-status AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource Request For Quotes Topic Scatter-gather RFQ Response Queue …
  67. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... retrieve-rfq-status AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource Request For Quotes Topic Scatter-gather RFQ Response Queue … 200 OK { "links": { ... }, "status": "running", "eta": "..." }
  68. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... retrieve-rfq-status AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource Request For Quotes Topic Scatter-gather RFQ Response Queue … 200 OK { "links": { ... <link-to-result> ... }, "status": "done" }
  69. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... retrieve-rfq-result AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource Request For Quotes Topic Scatter-gather RFQ Response Queue …
  70. Unicorn Management Service Use case: Instant ride RFQ Wild Rydes

    Customer Wild Rydes Customer App https://... retrieve-rfq-result AWS Cloud Ride Booking Service Unicorn Management Resource Unicorn Management Resource Unicorn Management Resource Request For Quotes Topic Scatter-gather RFQ Response Queue … 200 OK { "links": { ... }, "from": "...", "to": "...", "quotes": "..." }
  71. Use case: Submit a ride completion Unicorn AWS Cloud Customer

    Notification Service Customer Accounting Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Ride Completion Topic Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service SNS message filter: fare >= x distance >= y
  72. Use case: Submit a ride completion Unicorn AWS Cloud Customer

    Notification Service Customer Loyalty Service Datalake Ingestion Service Extraordinary Rides Service { "from": "...", "to": "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Ride Completion Topic Wild Rydes Unicorn App https://... submit-ride-completion 201 Created Location: ... Content-Location: ... { <cmpl-ride-repr> } Rides Store Unicorn Management Service SNS message filter: fare >= x distance >= y Customer Accounting Service
  73. Use case: Fare collection Saga orchestration Payment Service Discrete transactions:

    1. Credit card pre-auth 2. Charge card using pre-auth code Payment Gateway API Payment Service Payment Gateway API
  74. Use case: Fare collection Saga orchestration Payment Service Discrete transactions:

    1. Credit card pre-auth 2. Charge card using pre-auth code 3. Update customer account Payment Gateway API Customer Accounting Service Payment Service Accounting System Payment Gateway API
  75. Use case: Fare collection Saga orchestration Payment Service Discrete transactions:

    1. Credit card pre-auth 2. Charge card using pre-auth code 3. Update customer account To be treated as one distributed TA, to leave the systems in a semantically consistent state. Payment Gateway API Customer Accounting Service Payment Service Accounting System Payment Gateway API
  76. Resources / call-to-action AWS messaging blogs https://aws.amazon.com/blogs/compute/tag/messaging/ Several repeats of

    this talk (including video recording) re:Invent 2019 – API315 (Monday + Tuesday + Wednesday)
  77. Resources / call-to-action AWS messaging blogs https://aws.amazon.com/blogs/compute/tag/messaging/ Several repeats of

    this talk (including video recording) re:Invent 2019 – API315 (Monday + Tuesday + Wednesday) Hands-on workshop on implementing the patterns from this talk re:Invent 2019 - ARC314 (Monday + Tuesday)
  78. Resources / call-to-action AWS messaging blogs https://aws.amazon.com/blogs/compute/tag/messaging/ Several repeats of

    this talk (including video recording) re:Invent 2019 – API315 (Monday + Tuesday + Wednesday) Hands-on workshop on implementing the patterns from this talk re:Invent 2019 - ARC314 (Monday + Tuesday) Keep in mind Loose coupling is always better than lousy coupling!
  79. © 2019, Amazon Web Services, Inc. or its Affiliates. Thank

    you! Go build! Dirk Fröhner, Solutions Architect, Amazon Web Services [email protected] | @dirk_f5r