Top Banner
Rest Vs. Reactive Interaction Patterns in Microservices Architecture
15

Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

May 06, 2018

Download

Documents

truonganh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Rest Vs. Reactive

Interaction Patterns in Microservices Architecture

Page 2: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

IT Consulting

Page 3: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Microservices

Page 4: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

System is not very Responsive

Page 5: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

API G

atew

ay

Create Order

Inventory Services

Price Services

Payment Services

Shipping Services

Analytics Services

Synchronous and Rest based Architecture

Page 6: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation
Page 7: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Potential Performance Drawbacks

! I/O & DB blocking !Monoliths and performance management !Poor internal and external end-point

management

Page 8: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Reactive Architecture

!Architecture Style !Responsive !Resilient !Elastic !Message and Event Driven !Asynchronous & non-blocking

Page 9: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

API G

atew

ay

Order Management

Service

Inventory Services

Price Services

Payment Services

Shipping Services

Non-blocking and Asynchronous Inter-Service Communication

Order Management

Service Message Broker

C

C

E

E

C Command E Event

Rest

Analytics Services

Page 10: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

The Actor Model and the Akka ToolKit

Page 11: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Less-blocking Persistence, DDD, CQRS and Event Sourcing

E Event

ProducerProducer

Event Subscriber

Event Processor

Event Store Journal

E

E

E

E

QueryQuery State

Page 12: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Reinventing the Wheel

!DDD, CQRS and Event Sourcing !Kafka !Actor !Akka !Lagom

Page 13: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Potential Concerns

!Business Process Changes !More complex DevOps !Learning Curve

Page 14: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

The rise of the Microservices frameworks

Image Copyright Lightbend

Page 15: Rest Vs. Reactive - Schedschd.ws/hosted_files/apiworld2017/15/Makary Mark Logic Keepers.pdf · Synchronous and Rest based Architecture. ... DDD, CQRS and Event Sourcing ... creation

Thank You