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

2019-12-xy.aws-reinvent-2019.API315.application-integration-patterns-for-microservices

 2019-12-xy.aws-reinvent-2019.API315.application-integration-patterns-for-microservices

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. In this session, we discuss some fundamental application integration patterns mostly based on messaging and connect them to real-world use cases in a microservices scenario. We also point out some benefits that asynchronous messaging can have over REST APIs for communication between microservices.

This talk ran in four repeats at re:Invent 2019.

Dirk Fröhner

December 02, 2019
Tweet

More Decks by Dirk Fröhner

Other Decks in Technology

Transcript

  1. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Application Integration Patterns for Microservices Dirk Fröhner A P I 3 1 5 Solutions Architect, Amazon Web Services @dirk_f5r
  2. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Application Integration Patterns (not only) for Microservices Dirk Fröhner A P I 3 1 5 Solutions Architect, Amazon Web Services @dirk_f5r
  3. Related breakouts ARC314 Decoupled microservices: Building scalable applications API304 Scalable

    serverless event-driven apps using Amazon SQS & Lambda API306 Building event-driven architectures API307 Build efficient and scalable distributed apps using Amazon MQ API309 Durable Serverless Architecture: Working with Dead-Letter Queues API311 Managing business processes using AWS Step Functions API316 Building serverless workflows using AWS Step Functions API318 Deep dive on event-driven development with Amazon EventBridge
  4. © 2019, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. “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. 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 channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  14. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  15. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  16. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  17. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  18. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  19. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  20. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  21. Message channels FIFO queue Message groups Guaranteed ordering Messages grouped

    by discriminator attribute Example: Amazon SQS with sender provided message group IDs – no further consumption as long as messages with particular message group ID are invisible Queue Receiver Sender Receivers Sender Queue Order!
  22. Message channels Message delivery QoS At least once At most

    once Exactly once Queue Receiver Sender
  23. Message channels Message delivery QoS At least once At most

    once Exactly once Queue Receiver Sender Exactly once? Well! Tunable / configurable messaging systems: Choose between at least once or at most once Deduplication capabilities to detect and eliminate messages which are sent more than once to or by the messaging system But how to deal with a situation where the message was consumed, but never acknowledged? → Your systems still have to be able to handle duplicate messages → Messages should be processed in an idempotent manner
  24. 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
  25. 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
  26. 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
  27. 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
  28. 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
  29. 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
  30. Message routing Pipes and filters Event triggers chain of processing

    steps (“filters”) Event source Pipe Filter Result target Step 1
  31. 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
  32. 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
  33. 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
  34. 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
  35. 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
  36. 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
  37. 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
  38. 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
  39. 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
  40. Use case: Submit a ride completion { "from": "...", "to":

    "...", "duration": "...", "distance": "...", "customer": "...", "fare": "..." } Unicorn Wild Rydes Unicorn App https://... submit-ride-completion
  41. 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
  42. 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
  43. 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
  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": "..." } Unicorn 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 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> }
  46. 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
  47. 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
  48. 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
  49. 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
  50. 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
  51. 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
  52. 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
  53. 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!
  54. 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
  55. 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
  56. 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
  57. Use case: Prebooking campaigns Wild Rydes Customer Wild Rydes Customer

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

    Rydes Customer App https://... submit-ride-prebooking { "from": "...", "to": "...", "when": "...", "customer": "..." } Ride Booking Service
  59. 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
  60. 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
  61. 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!
  62. 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
  63. 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
  64. 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
  65. 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
  66. 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> }
  67. 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> }
  68. 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
  69. 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
  70. Use case: Instant ride RFQ Wild Rydes Customer Wild Rydes

    Customer App https://... submit-instant-ride-rfq { "from": "...", "to": "...", "customer": "..." } Scatter-gather
  71. 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
  72. 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": "..." }
  73. 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": "..." }
  74. 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": "..." }
  75. 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": "..." }
  76. 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 …
  77. 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 …
  78. 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": "..." }
  79. 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" }
  80. 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 …
  81. 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": "..." }
  82. 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
  83. 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
  84. 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
  85. 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
  86. 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
  87. Resources / call-to-action AWS blogs and other content about application

    integration http://bit.ly/2019-api315 Hands-on workshop on implementing the patterns from this talk ARC314 during this re:Invent (Monday + Tuesday) Ask your AWS SA for an application integration immersion day
  88. Resources / call-to-action AWS blogs and other content about application

    integration http://bit.ly/2019-api315 Hands-on workshop on implementing the patterns from this talk ARC314 during this re:Invent (Monday + Tuesday) Ask your AWS SA for an application integration immersion day Keep in mind Loose coupling is always better than lousy coupling!
  89. Thank you! © 2019, Amazon Web Services, Inc. or its

    affiliates. All rights reserved. Dirk Fröhner @dirk_f5r