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

Swarrot - A library to consume them all

Swarrot - A library to consume them all

Lightninh talk about Swarrot given at sfLive Paris 2014.

Olivier Dolbeau

April 07, 2014
Tweet

More Decks by Olivier Dolbeau

Other Decks in Programming

Transcript

  1. Swarrot
    A library to consume them all

    View Slide

  2. To consume what??
    Messages

    View Slide

  3. From where ?
    Any broker !

    View Slide

  4. Yeah, it’s about
    asynchronous tasks!
    Because asynchronous is good u know?

    View Slide

  5. There is 2 actors
    ● Producer
    ● Consumer

    View Slide

  6. Swarrot
    What it really is.

    View Slide

  7. An open source library
    ● License: MIT
    ● https://github.com/swarrot/swarrot
    ● Started 1 month ago

    View Slide

  8. How it works
    Just listen

    View Slide

  9. Create a message provider

    View Slide

  10. Create a processor

    View Slide

  11. OK, you’re done! Consume!

    View Slide

  12. WAIT!!!
    That’s not all!

    View Slide

  13. It’s all about decoration!

    View Slide

  14. Some processors
    And what they do!

    View Slide

  15. ExceptionCatcherProcessor
    You just see it!
    Useful in prod env only.

    View Slide

  16. InstantRetryProcessor
    Something wrong happened? OK, try again!
    Useful for API calls.

    View Slide

  17. SignalHandlerProcessor
    You don’t want to stop your consumer
    immediately if they are working!
    A must have!

    View Slide

  18. Others
    ● AckProcessor
    ● MaxExecutionTimeProcessor
    ● MaxMessagesProcessor
    ● RetryProcessor
    ● ...

    View Slide

  19. Who started this?
    Me!
    Web architect
    @odolbeau

    View Slide

  20. But I’m not alone!
    ● Rémy Lemeunier (remyLemeunier)
    ● Grégoire Pineau (lyrixx)
    ● Willy Morin (kaiska)
    ● Yohan Giarelli (yohang)
    THANK YOU!

    View Slide

  21. Feel free to contribute!

    View Slide

  22. One more thing!

    View Slide

  23. It’s already used in production!

    View Slide

  24. Thank you!

    View Slide