24

BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

  • Upload
    others

  • View
    9

  • Download
    0

Embed Size (px)

Citation preview

Page 1: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices
Page 2: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

BUILDING RESILIENT MICROSERVICES with APACHE QPID PROTON

Richard LiRafael Schloming datawire.io

Page 3: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

• MICROSERVICES • DESIGNING MICROSERVICES • DEMO • WRAP UP

Page 4: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

• Release any time • You’re responsible for

reliability, availability, scalability, security

• You’re also responsible for monitoring, billing, user admin, …

Page 5: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Idiot proof deploy Homogenous tech stack

Minimize upgrade frequency

Synchronized release

Easy for vendor to debugACID; 1 simultaneous

release

Page 6: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Ship as fast as possible Continuous delivery

Lots of functional breadth

Design/build in parts

Reliability, availability, security, scale

Resilient system design

Page 7: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Microservices.

Continuous delivery

Design/build in parts

Resilient system design

Page 8: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Componentization via Services

Organized around Business Capabilities

Products not Projects

Smart endpoints and dumb pipes

Decentralized Governance

Decentralized Data Management

Infrastructure Automation

Design for failure

Evolutionary Design

http://martinfowler.com/articles/microservices.html

Page 9: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

DESIGNING MICROSERVICES

Page 10: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Monolith

1. Send a tweet.

2. Get followers. 3. Publish tweet.

App server

Page 11: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Three App Servers

1. Send a tweet.

2. Get followers.

3. Publish tweet.

App server

Page 12: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

App Servers + Asynchronous Queue

1. Send a tweet.

2. Queue tweet for sending.

3. Process new tweets.

4. Get followers.

5. Publish tweet.

Not a typical app server

Page 13: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

App Servers + Asynchronous Queue

1. Send a tweet.

2. Queue tweet for sending.

3. Process new tweets.

4. Get followers.

5. Publish tweet.

Not a typical app server

Recommend followers

Page 14: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Fully Asynchronous

1. Send a tweet.

2. Queue tweet for sending.

3. Process Tweet

4. Publish tweet.

Publish changes to followers

Recommend new people to follow

Page 15: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

MESSAGING

Page 16: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

HTTP

LB LB LB

Page 17: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Asynchronous Messaging

Q T

Page 18: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Asynchronous Message Broker

Broker

Page 19: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

DEMO

Page 20: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

Smart endpoints with Proton

Q T

“Barkers”

Outbox

Business Logic

Inbox

Clients

Page 21: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

ARCHITECTURE

Page 22: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

• Native AMQP 1.0 protocol engine

• Core engine implemented in C • Language bindings in Python,

JavaScript, Ruby, PHP, Perl, Java, Go, C++

Architecture

• Part of Apache Qpid • Used by a number of Qpid

projects, including the C++ brokers, JMS Client, Qpid Dispatcher

• Also used by ActiveMQ, HornetQ, Microsoft Azure, IBM MQLite, and many organizations

http://qpid.apache.org/proton

Page 23: BUILDING RESILIENT MICROSERVICES with APACHE QPID …files.meetup.com/18268897/ApacheCon Final.pdf• Microservices are a natural paradigm for cloud-delivered software • Microservices

SUMMARY

• Microservices are a natural paradigm for cloud-delivered software

• Microservices need to be loosely coupled • Asynchronous messaging is the key to loose coupling • Proton provides a simple, powerful async messaging

engine