HeadlinesBriefing favicon HeadlinesBriefing.com

Elixir-Python Integration with Oban Jobs

Hacker News •
×

Developers can now bridge Elixir and Python applications using Oban, a job processing library that enables two-way communication between the ecosystems. The new Oban for Python library shares the same oban_jobs table with its Elixir counterpart, allowing seamless job exchange through durable job queues.

This integration solves a common problem where teams need functionality available in one language but prefer their primary stack in another. The approach uses a shared database as a task broker, with each side maintaining independent cluster leadership while coordinating through job status updates. Both ecosystems can also exchange real-time notifications via Postgres PubSub.

A demonstration called "Badge Forge" shows how Python workers can generate PDF badges using WeasyPrint while Elixir handles printing coordination. The example reveals how trivial the bridge can be - a Python worker simply reads jobs from the badges queue, processes them, and enqueues confirmation jobs back to Elixir. The bidirectional capability means Python apps can leverage Elixir's strengths just as easily, opening new possibilities for polyglot development teams.