SlideShare a Scribd company logo
1 of 25
Download to read offline
Patterns for Asynchronous
Microservices
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
2
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
3
● Almost 4 years working on devops & distributed projects.
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
4
● Almost 4 years working on devops & distributed projects.
● Still more a dev than op dude.
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
5
● Almost 4 years working on devops & distributed projects.
● Still more a dev than op dude.
● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past
experience. :P
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
6
● Almost 4 years working on devops & distributed projects.
● Still more a dev than op dude.
● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past
experience. :P
● Based in Barcelona.
Raül Pérez - @repejota NATS London - 10/05/2016
Who am I?
Raül Pérez
Lead Software Engineer
at R3 Labs Ltd.
Twitter: @repejota
Github: https://github.com/repejota
Email: repejota@gmail.com
7
● Almost 4 years working on devops & distributed projects.
● Still more a dev than op dude.
● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past
experience. :P
● Based in Barcelona.
● Love startups & love remote work!
Raül Pérez - @repejota NATS London - 10/05/2016
Summary
8
Raül Pérez - @repejota NATS London - 10/05/2016
● Why microservices?
● Synchronous vs. Asynchronous communication.
● Pattern: Broker approach & NATS
● Pattern: Autonomy of services vs. Coordination between services.
Why microservices?
9
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled components.
● Specific responsibility, each one delivers a capability.
● Designed to be defensive against failures.
Why microservices?
10
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled components.
● Specific responsibility, each one delivers a capability.
● Designed to be defensive against failures.
● Designed around business needs.
● Decentralised governance.
● Decentralised data management.
● Connected through a common interface.
Pattern: Sync vs. Async communication.
11
Raül Pérez - @repejota NATS London - 10/05/2016
● The most common interface to communicate is HTTP.
● But HTTP is “mostly” synchronous.
● Once the number of services grow, HTTP is sometimes not enough.
Pattern: Sync vs. Async communication.
12
Raül Pérez - @repejota NATS London - 10/05/2016
● The most common interface to communicate
is HTTP.
● But HTTP is “mostly” synchronous.
● Once the number of services grow, HTTP is
not enough.
● It also has a complex error
management.
Pattern: Sync vs. Async communication.
13
Raül Pérez - @repejota NATS London - 10/05/2016
● Synchronous communication is simple but….
○ Drawback: Suffers from latency on each connection.
● Asynchronous communication is faster but…
○ Drawback: Increases the complexity.
○ Drawback: Snowball effect, difficult to manage and orchestrate.
So, Is there a better communication interface?
Pattern: Sync vs. Async communication.
14
Raül Pérez - @repejota NATS London - 10/05/2016
● Pattern: Use a broker to orchestrate your communication needs.
○ AMPQ, RabbitMQ, NSQ, etc ….
○ NATS :)
● A broker is flexible, allows you to use:
○ Work queues.
○ Publish/Subscribe.
○ Request/Response.
○ Message routing.
○ etc...
Pattern: Broker approach & NATS
15
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled clients and servers.
● Multiple patterns: Publish/Subscribe,
Request/Response.
● Easy to scale.
Pattern: Broker approach & NATS
16
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled clients and servers.
● Multiple patterns: Publish/Subscribe,
Request/Response.
● Easy to scale.
● NATS is fast!
Pattern: Broker approach & NATS
17
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled clients and servers.
● Multiple patterns: Publish/Subscribe,
Request/Response.
● Easy to scale.
● NATS is fast!
● Just a message system, no
assumptions, no extra features.
Easy to deploy, easy to use.
Pattern: Broker approach & NATS
18
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled clients and servers.
● Multiple patterns: Publish/Subscribe,
Request/Response.
● Easy to scale.
● NATS is fast!
● Just a message system, no
assumptions, no extra features.
Easy to deploy, easy to use.
● It is also secure: SSL, password ...
Pattern: Broker approach & NATS
19
Raül Pérez - @repejota NATS London - 10/05/2016
● Loosely coupled clients and servers.
● Multiple patterns: Publish/Subscribe,
Request/Response.
● Easy to scale.
● NATS is fast!
● Just a message system, no
assumptions, no extra features.
Easy to deploy, easy to use.
● It is also secure: SSL, password ...
● Simple protocol, it is just text.
Pattern: Autonomy vs. Coordination.
20
Raül Pérez - @repejota NATS London - 10/05/2016
● Make your services autonomous.
● Avoid coordination between different services.
● The minimal coordination the more optimal autonomy.
● Increased autonomy gives it freedom to evolve.
Pattern: Autonomy vs. Coordination.
21
Raül Pérez - @repejota NATS London - 10/05/2016
● Make your services autonomous.
● Avoid coordination between different services.
● The minimal coordination the more optimal autonomy.
● Increased autonomy gives it freedom to evolve.
● Your services delivers “capabilities”
Pattern: Autonomy vs. Coordination.
22
Raül Pérez - @repejota NATS London - 10/05/2016
● Make your services autonomous.
● Avoid coordination between different services.
● The minimal coordination the more optimal autonomy.
● Increased autonomy gives it freedom to evolve.
● Your services delivers “capabilities”
● What is a capability?
A complete business capability is a process that can be finished
consecutively without interruptions or excursions to other services.
Resources
● http://microservices.io
● https://en.wikipedia.org/wiki/Cloud_computing
● http://nats.io
23
● http://repejota.com
● http://r3labs.io
● http://ernest.io
● http://apcera.com
Raül Pérez - @repejota NATS London - 10/05/2016
Questions?
Raül Pérez - @repejota NATS London - 10/05/2016
Thank you!
25
Raül Pérez - @repejota NATS London - 10/05/2016

More Related Content

What's hot

HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?Tom Paseka
 
WebRTC for Billions
WebRTC for BillionsWebRTC for Billions
WebRTC for BillionsChad Hart
 
Last Month in PHP - May 2018
Last Month in PHP - May 2018Last Month in PHP - May 2018
Last Month in PHP - May 2018Eric Poe
 
Oslo Vancouver Onboarding
Oslo Vancouver OnboardingOslo Vancouver Onboarding
Oslo Vancouver OnboardingBen Nemec
 
Last Month in PHP - September 2016
Last Month in PHP - September 2016Last Month in PHP - September 2016
Last Month in PHP - September 2016Eric Poe
 
Building a Server with FOSS4G Software
Building a Server with FOSS4G SoftwareBuilding a Server with FOSS4G Software
Building a Server with FOSS4G SoftwareRandal Hale
 
It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020César Hernández
 

What's hot (8)

HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
HKNOG 6.0 Next Generation Networks - will automation put us out of jobs?
 
WebRTC for Billions
WebRTC for BillionsWebRTC for Billions
WebRTC for Billions
 
Demos CTIC
Demos CTICDemos CTIC
Demos CTIC
 
Last Month in PHP - May 2018
Last Month in PHP - May 2018Last Month in PHP - May 2018
Last Month in PHP - May 2018
 
Oslo Vancouver Onboarding
Oslo Vancouver OnboardingOslo Vancouver Onboarding
Oslo Vancouver Onboarding
 
Last Month in PHP - September 2016
Last Month in PHP - September 2016Last Month in PHP - September 2016
Last Month in PHP - September 2016
 
Building a Server with FOSS4G Software
Building a Server with FOSS4G SoftwareBuilding a Server with FOSS4G Software
Building a Server with FOSS4G Software
 
It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020It is easy contributing to Open Source - ECLIPSE CON 2020
It is easy contributing to Open Source - ECLIPSE CON 2020
 

Viewers also liked

Project1 Jessin Jose
Project1 Jessin JoseProject1 Jessin Jose
Project1 Jessin JoseJessin
 
Project 1: Audience
Project 1: Audience Project 1: Audience
Project 1: Audience Caroline Abel
 
AgilePM 03: Incremental delivery
AgilePM 03: Incremental deliveryAgilePM 03: Incremental delivery
AgilePM 03: Incremental deliveryFrank Turley
 
Artistic nudes裸體藝術
Artistic nudes裸體藝術Artistic nudes裸體藝術
Artistic nudes裸體藝術brucecare
 
Presentación cinc indrets de bcn
Presentación cinc indrets de bcnPresentación cinc indrets de bcn
Presentación cinc indrets de bcncfapalaudemar
 
8 09 Tech Marketing Ideas
8 09 Tech Marketing Ideas8 09 Tech Marketing Ideas
8 09 Tech Marketing IdeasMandy de Leon
 
Management Practices in Real Life
Management Practices in Real LifeManagement Practices in Real Life
Management Practices in Real LifeIbrahim Rasel
 
Non geeks-big-data-playbook-106947
Non geeks-big-data-playbook-106947Non geeks-big-data-playbook-106947
Non geeks-big-data-playbook-106947CMR WORLD TECH
 
Are comparative ads persuasive
Are comparative ads persuasiveAre comparative ads persuasive
Are comparative ads persuasiveGraceYLi
 
Media literacy(quizzes)
Media literacy(quizzes)Media literacy(quizzes)
Media literacy(quizzes)Jayr Nator
 
UCL ISOP January 2017 - Living in London
UCL ISOP January 2017 - Living in LondonUCL ISOP January 2017 - Living in London
UCL ISOP January 2017 - Living in Londonwdurdle
 
оценка качества интернет ресурсов тан сяотан
оценка качества интернет ресурсов тан сяотаноценка качества интернет ресурсов тан сяотан
оценка качества интернет ресурсов тан сяотанXiaotang tang
 
Innovation Assessment Questionnaire
Innovation Assessment QuestionnaireInnovation Assessment Questionnaire
Innovation Assessment QuestionnaireBoardroom Metrics
 
Shooting schedule-overview complete
Shooting schedule-overview completeShooting schedule-overview complete
Shooting schedule-overview completerhsmediastudies
 

Viewers also liked (17)

Project1 Jessin Jose
Project1 Jessin JoseProject1 Jessin Jose
Project1 Jessin Jose
 
Project 1: Audience
Project 1: Audience Project 1: Audience
Project 1: Audience
 
AgilePM 03: Incremental delivery
AgilePM 03: Incremental deliveryAgilePM 03: Incremental delivery
AgilePM 03: Incremental delivery
 
Artistic nudes裸體藝術
Artistic nudes裸體藝術Artistic nudes裸體藝術
Artistic nudes裸體藝術
 
Presentación cinc indrets de bcn
Presentación cinc indrets de bcnPresentación cinc indrets de bcn
Presentación cinc indrets de bcn
 
8 09 Tech Marketing Ideas
8 09 Tech Marketing Ideas8 09 Tech Marketing Ideas
8 09 Tech Marketing Ideas
 
Management Practices in Real Life
Management Practices in Real LifeManagement Practices in Real Life
Management Practices in Real Life
 
Non geeks-big-data-playbook-106947
Non geeks-big-data-playbook-106947Non geeks-big-data-playbook-106947
Non geeks-big-data-playbook-106947
 
Are comparative ads persuasive
Are comparative ads persuasiveAre comparative ads persuasive
Are comparative ads persuasive
 
ysf_report
ysf_reportysf_report
ysf_report
 
Media literacy(quizzes)
Media literacy(quizzes)Media literacy(quizzes)
Media literacy(quizzes)
 
pool campus 2
pool campus 2pool campus 2
pool campus 2
 
UCL ISOP January 2017 - Living in London
UCL ISOP January 2017 - Living in LondonUCL ISOP January 2017 - Living in London
UCL ISOP January 2017 - Living in London
 
Smis3
Smis3Smis3
Smis3
 
оценка качества интернет ресурсов тан сяотан
оценка качества интернет ресурсов тан сяотаноценка качества интернет ресурсов тан сяотан
оценка качества интернет ресурсов тан сяотан
 
Innovation Assessment Questionnaire
Innovation Assessment QuestionnaireInnovation Assessment Questionnaire
Innovation Assessment Questionnaire
 
Shooting schedule-overview complete
Shooting schedule-overview completeShooting schedule-overview complete
Shooting schedule-overview complete
 

Similar to Patterns for Asynchronous Microservices with NATS

Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSApcera
 
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"Daniel Bryant
 
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"Daniel Bryant
 
apidays LIVE Hong Kong - Let's get started development of API client library ...
apidays LIVE Hong Kong - Let's get started development of API client library ...apidays LIVE Hong Kong - Let's get started development of API client library ...
apidays LIVE Hong Kong - Let's get started development of API client library ...apidays
 
Getting to grips with a Service Level Agreement and how SLA-Ready can help
Getting to grips with a Service Level Agreement and how SLA-Ready can helpGetting to grips with a Service Level Agreement and how SLA-Ready can help
Getting to grips with a Service Level Agreement and how SLA-Ready can helpSLA-Ready Network
 
NET53494 Extensions in the Age of S/4HANA
NET53494  Extensions in the Age of S/4HANANET53494  Extensions in the Age of S/4HANA
NET53494 Extensions in the Age of S/4HANAChristian Lechner
 
NATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATSNATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATSRaül Pérez
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by natsRaul Perez
 
RIPE Atlas
RIPE AtlasRIPE Atlas
RIPE AtlasRIPE NCC
 
Tecnologia rest em python
Tecnologia rest em pythonTecnologia rest em python
Tecnologia rest em pythonAllex Lima
 
ATLRUG Announcements/Upgrade News - August 2016
ATLRUG Announcements/Upgrade News - August 2016ATLRUG Announcements/Upgrade News - August 2016
ATLRUG Announcements/Upgrade News - August 2016jasnow
 
COBIT as Framework for Leading IT-enabled Change and Transformation
COBIT as Framework for Leading IT-enabled Change and TransformationCOBIT as Framework for Leading IT-enabled Change and Transformation
COBIT as Framework for Leading IT-enabled Change and TransformationBoonNam Goh
 
A Taste of Open Fabrics Interfaces
A Taste of Open Fabrics InterfacesA Taste of Open Fabrics Interfaces
A Taste of Open Fabrics Interfacesseanhefty
 
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCFMongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCFMongoDB
 
Last Month in PHP - December 2016
Last Month in PHP - December 2016Last Month in PHP - December 2016
Last Month in PHP - December 2016Eric Poe
 
Wordpress and TNEW integration
Wordpress and TNEW integrationWordpress and TNEW integration
Wordpress and TNEW integrationAsh Mann
 
Operations Delivery Business Value
Operations Delivery Business ValueOperations Delivery Business Value
Operations Delivery Business ValueSonatype
 
ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016jasnow
 

Similar to Patterns for Asynchronous Microservices with NATS (20)

Patterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATSPatterns for Asynchronous Microservices with NATS
Patterns for Asynchronous Microservices with NATS
 
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
Micro Manchester Meetup: "The Seven (More) Deadly Sins of Microservices"
 
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
OSCON EU 2016 "Seven (More) Deadly Sins of Microservices"
 
apidays LIVE Hong Kong - Let's get started development of API client library ...
apidays LIVE Hong Kong - Let's get started development of API client library ...apidays LIVE Hong Kong - Let's get started development of API client library ...
apidays LIVE Hong Kong - Let's get started development of API client library ...
 
Getting to grips with a Service Level Agreement and how SLA-Ready can help
Getting to grips with a Service Level Agreement and how SLA-Ready can helpGetting to grips with a Service Level Agreement and how SLA-Ready can help
Getting to grips with a Service Level Agreement and how SLA-Ready can help
 
NET53494 Extensions in the Age of S/4HANA
NET53494  Extensions in the Age of S/4HANANET53494  Extensions in the Age of S/4HANA
NET53494 Extensions in the Age of S/4HANA
 
NATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATSNATS in action - A Real time Microservices Architecture handled by NATS
NATS in action - A Real time Microservices Architecture handled by NATS
 
Nats in action a real time microservices architecture handled by nats
Nats in action   a real time microservices architecture handled by natsNats in action   a real time microservices architecture handled by nats
Nats in action a real time microservices architecture handled by nats
 
RIPE Atlas
RIPE AtlasRIPE Atlas
RIPE Atlas
 
Tecnologia rest em python
Tecnologia rest em pythonTecnologia rest em python
Tecnologia rest em python
 
F-interop Meetup
F-interop MeetupF-interop Meetup
F-interop Meetup
 
ATLRUG Announcements/Upgrade News - August 2016
ATLRUG Announcements/Upgrade News - August 2016ATLRUG Announcements/Upgrade News - August 2016
ATLRUG Announcements/Upgrade News - August 2016
 
COBIT as Framework for Leading IT-enabled Change and Transformation
COBIT as Framework for Leading IT-enabled Change and TransformationCOBIT as Framework for Leading IT-enabled Change and Transformation
COBIT as Framework for Leading IT-enabled Change and Transformation
 
A Taste of Open Fabrics Interfaces
A Taste of Open Fabrics InterfacesA Taste of Open Fabrics Interfaces
A Taste of Open Fabrics Interfaces
 
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCFMongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
MongoDB Europe 2016 - MongoDB, Ops Manager & Docker at SNCF
 
Last Month in PHP - December 2016
Last Month in PHP - December 2016Last Month in PHP - December 2016
Last Month in PHP - December 2016
 
Wordpress and TNEW integration
Wordpress and TNEW integrationWordpress and TNEW integration
Wordpress and TNEW integration
 
Operations Delivery Business Value
Operations Delivery Business ValueOperations Delivery Business Value
Operations Delivery Business Value
 
ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016ATLRUG Community Announcements for December 2016
ATLRUG Community Announcements for December 2016
 
Are you SLA-Ready?
Are you SLA-Ready?Are you SLA-Ready?
Are you SLA-Ready?
 

Patterns for Asynchronous Microservices with NATS

  • 1. Patterns for Asynchronous Microservices Raül Pérez - @repejota NATS London - 10/05/2016
  • 2. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 2 Raül Pérez - @repejota NATS London - 10/05/2016
  • 3. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 3 ● Almost 4 years working on devops & distributed projects. Raül Pérez - @repejota NATS London - 10/05/2016
  • 4. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 4 ● Almost 4 years working on devops & distributed projects. ● Still more a dev than op dude. Raül Pérez - @repejota NATS London - 10/05/2016
  • 5. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 5 ● Almost 4 years working on devops & distributed projects. ● Still more a dev than op dude. ● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past experience. :P Raül Pérez - @repejota NATS London - 10/05/2016
  • 6. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 6 ● Almost 4 years working on devops & distributed projects. ● Still more a dev than op dude. ● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past experience. :P ● Based in Barcelona. Raül Pérez - @repejota NATS London - 10/05/2016
  • 7. Who am I? Raül Pérez Lead Software Engineer at R3 Labs Ltd. Twitter: @repejota Github: https://github.com/repejota Email: repejota@gmail.com 7 ● Almost 4 years working on devops & distributed projects. ● Still more a dev than op dude. ● Proud to be a Gopher after a looong PHP/Ruby/Python/Node.js past experience. :P ● Based in Barcelona. ● Love startups & love remote work! Raül Pérez - @repejota NATS London - 10/05/2016
  • 8. Summary 8 Raül Pérez - @repejota NATS London - 10/05/2016 ● Why microservices? ● Synchronous vs. Asynchronous communication. ● Pattern: Broker approach & NATS ● Pattern: Autonomy of services vs. Coordination between services.
  • 9. Why microservices? 9 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled components. ● Specific responsibility, each one delivers a capability. ● Designed to be defensive against failures.
  • 10. Why microservices? 10 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled components. ● Specific responsibility, each one delivers a capability. ● Designed to be defensive against failures. ● Designed around business needs. ● Decentralised governance. ● Decentralised data management. ● Connected through a common interface.
  • 11. Pattern: Sync vs. Async communication. 11 Raül Pérez - @repejota NATS London - 10/05/2016 ● The most common interface to communicate is HTTP. ● But HTTP is “mostly” synchronous. ● Once the number of services grow, HTTP is sometimes not enough.
  • 12. Pattern: Sync vs. Async communication. 12 Raül Pérez - @repejota NATS London - 10/05/2016 ● The most common interface to communicate is HTTP. ● But HTTP is “mostly” synchronous. ● Once the number of services grow, HTTP is not enough. ● It also has a complex error management.
  • 13. Pattern: Sync vs. Async communication. 13 Raül Pérez - @repejota NATS London - 10/05/2016 ● Synchronous communication is simple but…. ○ Drawback: Suffers from latency on each connection. ● Asynchronous communication is faster but… ○ Drawback: Increases the complexity. ○ Drawback: Snowball effect, difficult to manage and orchestrate. So, Is there a better communication interface?
  • 14. Pattern: Sync vs. Async communication. 14 Raül Pérez - @repejota NATS London - 10/05/2016 ● Pattern: Use a broker to orchestrate your communication needs. ○ AMPQ, RabbitMQ, NSQ, etc …. ○ NATS :) ● A broker is flexible, allows you to use: ○ Work queues. ○ Publish/Subscribe. ○ Request/Response. ○ Message routing. ○ etc...
  • 15. Pattern: Broker approach & NATS 15 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled clients and servers. ● Multiple patterns: Publish/Subscribe, Request/Response. ● Easy to scale.
  • 16. Pattern: Broker approach & NATS 16 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled clients and servers. ● Multiple patterns: Publish/Subscribe, Request/Response. ● Easy to scale. ● NATS is fast!
  • 17. Pattern: Broker approach & NATS 17 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled clients and servers. ● Multiple patterns: Publish/Subscribe, Request/Response. ● Easy to scale. ● NATS is fast! ● Just a message system, no assumptions, no extra features. Easy to deploy, easy to use.
  • 18. Pattern: Broker approach & NATS 18 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled clients and servers. ● Multiple patterns: Publish/Subscribe, Request/Response. ● Easy to scale. ● NATS is fast! ● Just a message system, no assumptions, no extra features. Easy to deploy, easy to use. ● It is also secure: SSL, password ...
  • 19. Pattern: Broker approach & NATS 19 Raül Pérez - @repejota NATS London - 10/05/2016 ● Loosely coupled clients and servers. ● Multiple patterns: Publish/Subscribe, Request/Response. ● Easy to scale. ● NATS is fast! ● Just a message system, no assumptions, no extra features. Easy to deploy, easy to use. ● It is also secure: SSL, password ... ● Simple protocol, it is just text.
  • 20. Pattern: Autonomy vs. Coordination. 20 Raül Pérez - @repejota NATS London - 10/05/2016 ● Make your services autonomous. ● Avoid coordination between different services. ● The minimal coordination the more optimal autonomy. ● Increased autonomy gives it freedom to evolve.
  • 21. Pattern: Autonomy vs. Coordination. 21 Raül Pérez - @repejota NATS London - 10/05/2016 ● Make your services autonomous. ● Avoid coordination between different services. ● The minimal coordination the more optimal autonomy. ● Increased autonomy gives it freedom to evolve. ● Your services delivers “capabilities”
  • 22. Pattern: Autonomy vs. Coordination. 22 Raül Pérez - @repejota NATS London - 10/05/2016 ● Make your services autonomous. ● Avoid coordination between different services. ● The minimal coordination the more optimal autonomy. ● Increased autonomy gives it freedom to evolve. ● Your services delivers “capabilities” ● What is a capability? A complete business capability is a process that can be finished consecutively without interruptions or excursions to other services.
  • 23. Resources ● http://microservices.io ● https://en.wikipedia.org/wiki/Cloud_computing ● http://nats.io 23 ● http://repejota.com ● http://r3labs.io ● http://ernest.io ● http://apcera.com Raül Pérez - @repejota NATS London - 10/05/2016
  • 24. Questions? Raül Pérez - @repejota NATS London - 10/05/2016
  • 25. Thank you! 25 Raül Pérez - @repejota NATS London - 10/05/2016