Anzeige
Anzeige

Más contenido relacionado

Más de Ruby Meditation(20)

Anzeige

How to cook Rabbit on Production - Bohdan Parshentsev | Ruby Meditation 28

  1. How to cook Rabbit on Production Bohdan Parshencev Serhiy Nazarov
  2. Without a monolith anywhere!
  3. Expectation Reality
  4. So, where a compromise?
  5. RabbitMQ advantages ● Asynchronous processing ● Flexible routing ● Convenient debugging ● Scalability of consumers and producers ● Resilience to reboots and failures
  6. Need advice
  7. Challenge?
  8. Resource - Action - Context ● Obvious solution ● Easy to solve business problems
  9. How else?
  10. RESOURCE PROCESS STATE context
  11. Setup routing rabbit_connection ||= Bunny.new rabbit_connection.start rabbit_channel = rabbit_connection.create_channel exchange_general = rabbit_channel.headers("rm28.general", durable: true) exchange_space = rabbit_channel.headers("rm28.space", durable: true) serhiy_queue = rabbit_channel.queue("serhiy", durable: true) serhiy_queue.bind(exchange_general, arguments: { speaker: "serhiy", resource: "question", "x-match": :all }) serhiy_queue.bind(exchange_general, arguments: { speaker: "both", resource: "question", "x-match": :all }) bohdan_queue = rabbit_channel.queue("bohdan", durable: true) bohdan_queue.bind(exchange_general, arguments: { speaker: "bohdan", resource: "question", "x-match": :all }) bohdan_queue.bind(exchange_general, arguments: { speaker: "both", resource: "question", "x-match": :all }) exchange_space.bind(exchange_general, arguments: { resource: "message", "x-match": :all }) space_queue = rabbit_channel.queue("space", durable: true) space_queue.bind(exchange_space, arguments: { }) rabbit_connection.close
  12. bohdan_queue = rabbit_channel.queue("bohdan", durable: true) bohdan_queue.bind(exchange_general, arguments: { speaker: "bohdan", resource: "question", "x-match": :all }) bohdan_queue.bind(exchange_general, arguments: { speaker: "both", resource: "question", "x-match": :all })
  13. RPC remote procedure call
  14. RPC stands for Remote Procedure Call. The basic concept of RPC is that some information is sent and later some information is received. There is a one to one correlation between those two categories of information under normal circumstances. This mirrors the basic paradigm of imperative programming: the function call. The difference is RPC is typically used to exchange information between two systems separated by a network connection or another communication medium. The two systems may not even be written in the same programming language.
  15. DEMO
  16. https://rabbit.rm28.demo.qpard.com
Anzeige