Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Sprockets

 Sprockets

A lighting talk I gave at PhillyPUG on Sprockets

Gavin M. Roy

May 21, 2013
Tweet

More Decks by Gavin M. Roy

Other Decks in Programming

Transcript

  1. Application C DB In a loosely coupled application, the application

    publishes a message with the data to RabbitMQ RabbitMQ delivers the message to subscribed consumer applications The consumer application communicates the database writes to the database as it receives each message
  2. Application DB RabbitMQ is now delivering the data to two

    consumers instead of one C A new consumer can deliver the same data to a 3rd-party cloud based service The original consumer still manages the database writes for the application C Cloud Service Nothing has changed with the application, it is still publishing the data to RabbitMQ the same way
  3. Messaging System P Crons C Email Generation C Event Storage

    C Event Counter P P eCelerity Log Processing Postfix Feedback Loop Processing C Opt-Out Processing P Website Events P Click & Open Tracking C Push Notification Generation C SMS Generation C Bounce Processing C Site Message Generation P SMS Service Events
  4. Consumer Example • Pika Async Example • 148 Lines of

    Code without docstrings • No actual business logic https://pika.readthedocs.org/en/latest/examples/asynchronous_consumer_example.html
  5. • Processing Failures? • Consistent coding style and consumer behaviors?

    • Performance tweaks and throughput? • Disconnects / Reconnects? • Unhandled exceptions?
  6. • How many consumers per queue? • Consistent way to

    configure applications? • Connections, logging, error control, reconnections, etc • Business logic specific configuration • Controlling process? • Stats reporting?
  7. Rejected • Since 2009 • v3.2.11 • Over 50 internal

    consumer applications • Small userbase • 6 forks, 29 stars on Github • 5,567 downloads from pypi • No meaningful documentation
  8. Sprockets • Is a consumer framework and runtime • Is

    easy to use • Has consumer class mixins to speed development • Has dynamic QoS for throughput optimization • Has a web-based management UI & API https://github.com/gmr/sprockets