Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Ruby Meditation #19
Microservice
communication with
RabbitMQ
Tetiana Chupryna
Disclaimer. Language
Татьяна Чуприна
Татьяна Чуприна
Person of a million names
Тетяна Чуприна
Тетяна Чуприна
Tetiana Chupryna
Tetyana Chuprina
Tetjana Chuprina
Tetyiaana Chuprina
Tetiana Chupyra
Tetiana Chuprynas
Tania
Agenda
❖ Inter-service communication problematics
❖ JSON over HTTP option
❖ Message queues option
❖ RabbitMQ
❖ Integration...
–Steven McConnell, Code complete
“Important developments often arise out of
analogies. By comparing a topic you understand...
Luggage for dummies
Luggage for dummies
Luggage for dummies
Drop-off
Luggage for dummies
Drop-off
Sorting
Luggage for dummies
Drop-off
Sorting
Luggage for dummies
Drop-off
Sorting
Sorting
Luggage for dummies
Drop-off
Sorting
c a r o u s e l
Sorting
Luggage for dummies
Drop-off
Sorting
c a r o u s e l
Sorting
Game changer
Event-based system
Scalable
Maintainable
Back to clouds
Microservice communication
??
?
?
? ?
?
?
?
?
?
??
?
? ?
Inter-service communication
❖ New problem which doesn’t exist in monolith
❖ So many ways to success
❖ So many pitfalls
JSON over HTTP
Re use API
at least Basic Auth
100% control
JSON over HTTP
You can’t be 100% sure
Design failure to success
Sidekiq to the resque
❖ Handle “other side” failures gracefully
❖ Retry if needed
Procs
❖ Easy
❖ Quick
❖ Dirty
❖ Great choice for small apps
Cons
❖ Bad in scaling
❖ Pain for maintenance
❖ Net::HTTP
Inter-service communication
Break it. Make it.
❖ Decouple service interaction
❖ Keep messages in temporary storage (mailbox?)
❖ Make all asynchronous
Message queues
❖ Message-oriented middleware
❖ Applicable not only for web-applications
❖ Async communication protocol
Kafka
JBossMessaging
Oracle OpenMQ
mail.ru Tarantool
RabbitMQ
Reasons to use
❖ Written in Erlang
❖ Fast&Reliable
❖ Easy to setup
❖ Client libraries on all major languages (Ruby yippee!...
In a nutshell
Direct exchange routing
Fanout exchange routing
Topic exchange
Queue properties
❖ Name
❖ Durable
❖ Exclusive
❖ Auto-delete
❖ Arguments
Bindings
❖ Direct: by routing_key
❖ Multiple bindings
❖ Mask routing
Security
❖ TLS (transport layer security)
❖ SSL
❖ authentication
❖ authorization
Setup Rabbit
❖ Install and run
❖ No painful dependancies
Bunny
❖ Ruby client for RabbitMQ
❖ Lightweight
❖ Up&go
Bunny usage
Sneakers
❖ Background processing framework for Ruby and
RabbitMQ
❖ Can be used for high workload
❖ Up&go (as always)
Worker
Procs
❖ Scalable
❖ Maintainable
❖ Lightweight
Cons
❖ Need additional infrastructure eq(Money)
❖ Overkill for small projects
❖ Need additional knowledge
Afterwords
❖ Decoupling message flow from app changes app design
and in general makes all easier.
❖ Decoupling message flow ...
Share your stories of inter-service
communication
Massive thanks
Thanks Thanks
ThanksThanks
Thanks Thanks
Thanks
Thanks
Thanks
Thanks
ThanksThanks
Thanks
Thanks
ThanksThanks
Thanks
Thanks...
Microservice communication with RabbitMQ - Tetiana Chupryna
Microservice communication with RabbitMQ - Tetiana Chupryna
Microservice communication with RabbitMQ - Tetiana Chupryna
Upcoming SlideShare
Loading in …5
×

of

Microservice communication with RabbitMQ - Tetiana Chupryna Slide 1 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 2 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 3 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 4 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 5 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 6 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 7 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 8 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 9 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 10 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 11 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 12 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 13 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 14 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 15 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 16 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 17 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 18 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 19 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 20 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 21 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 22 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 23 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 24 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 25 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 26 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 27 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 28 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 29 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 30 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 31 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 32 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 33 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 34 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 35 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 36 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 37 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 38 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 39 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 40 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 41 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 42 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 43 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 44 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 45 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 46 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 47 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 48 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 49 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 50 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 51 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 52 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 53 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 54 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 55 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 56 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 57 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 58 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 59 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 60 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 61 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 62 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 63 Microservice communication with RabbitMQ - Tetiana Chupryna Slide 64
Upcoming SlideShare
What to Upload to SlideShare
Next
Download to read offline and view in fullscreen.

0 Likes

Share

Download to read offline

Microservice communication with RabbitMQ - Tetiana Chupryna

Download to read offline

Video: https://youtu.be/QogP24IONFc

Ruby Meditation #19
November 25, 2017
Kyiv

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all
  • Be the first to like this

Microservice communication with RabbitMQ - Tetiana Chupryna

  1. 1. Ruby Meditation #19 Microservice communication with RabbitMQ Tetiana Chupryna
  2. 2. Disclaimer. Language
  3. 3. Татьяна Чуприна
  4. 4. Татьяна Чуприна Person of a million names
  5. 5. Тетяна Чуприна
  6. 6. Тетяна Чуприна
  7. 7. Tetiana Chupryna
  8. 8. Tetyana Chuprina
  9. 9. Tetjana Chuprina
  10. 10. Tetyiaana Chuprina
  11. 11. Tetiana Chupyra
  12. 12. Tetiana Chuprynas
  13. 13. Tania
  14. 14. Agenda ❖ Inter-service communication problematics ❖ JSON over HTTP option ❖ Message queues option ❖ RabbitMQ ❖ Integration with Ruby
  15. 15. –Steven McConnell, Code complete “Important developments often arise out of analogies. By comparing a topic you understand poorly to something similar you understand better, you can come up with insights that result in a better understanding of the less-familiar topic.” The importance of Metaphors
  16. 16. Luggage for dummies
  17. 17. Luggage for dummies
  18. 18. Luggage for dummies Drop-off
  19. 19. Luggage for dummies Drop-off Sorting
  20. 20. Luggage for dummies Drop-off Sorting
  21. 21. Luggage for dummies Drop-off Sorting Sorting
  22. 22. Luggage for dummies Drop-off Sorting c a r o u s e l Sorting
  23. 23. Luggage for dummies Drop-off Sorting c a r o u s e l Sorting
  24. 24. Game changer
  25. 25. Event-based system
  26. 26. Scalable
  27. 27. Maintainable
  28. 28. Back to clouds
  29. 29. Microservice communication ?? ? ? ? ? ? ? ? ? ? ?? ? ? ?
  30. 30. Inter-service communication ❖ New problem which doesn’t exist in monolith ❖ So many ways to success ❖ So many pitfalls
  31. 31. JSON over HTTP Re use API at least Basic Auth 100% control
  32. 32. JSON over HTTP
  33. 33. You can’t be 100% sure
  34. 34. Design failure to success
  35. 35. Sidekiq to the resque ❖ Handle “other side” failures gracefully ❖ Retry if needed
  36. 36. Procs ❖ Easy ❖ Quick ❖ Dirty ❖ Great choice for small apps
  37. 37. Cons ❖ Bad in scaling ❖ Pain for maintenance ❖ Net::HTTP
  38. 38. Inter-service communication
  39. 39. Break it. Make it. ❖ Decouple service interaction ❖ Keep messages in temporary storage (mailbox?) ❖ Make all asynchronous
  40. 40. Message queues ❖ Message-oriented middleware ❖ Applicable not only for web-applications ❖ Async communication protocol
  41. 41. Kafka JBossMessaging Oracle OpenMQ mail.ru Tarantool
  42. 42. RabbitMQ
  43. 43. Reasons to use ❖ Written in Erlang ❖ Fast&Reliable ❖ Easy to setup ❖ Client libraries on all major languages (Ruby yippee!) ❖ Advanced Message Queuing Protocol
  44. 44. In a nutshell
  45. 45. Direct exchange routing
  46. 46. Fanout exchange routing
  47. 47. Topic exchange
  48. 48. Queue properties ❖ Name ❖ Durable ❖ Exclusive ❖ Auto-delete ❖ Arguments
  49. 49. Bindings ❖ Direct: by routing_key ❖ Multiple bindings ❖ Mask routing
  50. 50. Security ❖ TLS (transport layer security) ❖ SSL ❖ authentication ❖ authorization
  51. 51. Setup Rabbit ❖ Install and run ❖ No painful dependancies
  52. 52. Bunny ❖ Ruby client for RabbitMQ ❖ Lightweight ❖ Up&go
  53. 53. Bunny usage
  54. 54. Sneakers ❖ Background processing framework for Ruby and RabbitMQ ❖ Can be used for high workload ❖ Up&go (as always)
  55. 55. Worker
  56. 56. Procs ❖ Scalable ❖ Maintainable ❖ Lightweight
  57. 57. Cons ❖ Need additional infrastructure eq(Money) ❖ Overkill for small projects ❖ Need additional knowledge
  58. 58. Afterwords ❖ Decoupling message flow from app changes app design and in general makes all easier. ❖ Decoupling message flow makes programs more safe and scalable. ❖ Message queues are a save choice for inter-service communication where RabbitMQ is a solid option. ❖ Ça dépend
  59. 59. Share your stories of inter-service communication
  60. 60. Massive thanks
  61. 61. Thanks Thanks ThanksThanks Thanks Thanks Thanks Thanks Thanks Thanks ThanksThanks Thanks Thanks ThanksThanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks ThanksThanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks Thanks

Video: https://youtu.be/QogP24IONFc Ruby Meditation #19 November 25, 2017 Kyiv

Views

Total views

256

On Slideshare

0

From embeds

0

Number of embeds

2

Actions

Downloads

1

Shares

0

Comments

0

Likes

0

×