Introducing TaskBunny — Background Jobs in Elixir

Tatsuya Ono
2 min readApr 11, 2017

--

A couple of months ago we open sourced the beta version of TaskBunny. TaskBunny is a background processing library written in Elixir that uses RabbitMQ as a messaging backend. TaskBunny does something similar to Resque, Sidekiq, RQ, etc.

We have been working hard to improve its functionality and reliability. Today we are happy to announce that we are officially releasing TaskBunny 0.1 🎉

About us

TaskBunny is developed and maintained by Square Enix Europe. We develop, distribute and maintain video games. We have started using Elixir since last December to replace some high traffic backend APIs. We feel using Elixir in our system is exactly like using the in the game item from the Final Fantasy series, one of our main game titles. We use TaskBunny in our system.

Background job processing in Elixir

If you are not familiar with processes in Elixir, we encourage you to learn that before adopting TaskBunny, in order to make a right architectural decision. Background job processing is easy with Elixir. You spawn another Erlang process and run the job in that. It’s cheap and you can specify the remote host for the process to run.

Background job processing with message queue

While Elixir(Erlang) has a solid facility to run background jobs why do you need a library like TaskBunny? We developed TaskBunny because we wanted to decouple the concerns between the job request and execution. To achieve that we thought it’s a good idea to have a message queueing system in the middle.

The isolation helps us simplify hosting plan and avoid polluting our code with the non domain specific logic such as the error handling, retry strategy, throttling, etc.

RabbitMQ

We didn’t choose RabbitMQ specifically for TaskBunny. RabbitMQ was already our choice of the message broker and we developed TaskBunny on top of it. It has everything you want the message queue system to have.

If you are familiar with RabbitMQ you will easily understand how TaskBunny works under the hood. If you are not familiar with RabbitMQ we hope TaskBunny will be a good introduction to the awesome message broker.

Features and contributions

Sound interesting? The best way to get to know the library is to try it out. Visit our GitHub repo and check out the README. It’s still a young library so we are very keen on hearing from you. If you have any questions, feel free to open a GitHub issue. I will be also speaking at ElixirConf.eu in Barcelona in May. Grab me for a chat if you’re attending to the conference too.

Happy Easter!

P.S. 1. Are you in London and interested in working with us? We are hiring!

P.S. 2. Special thanks to Elliott Hilaire for proofreading.

--

--