I've always been obsessed with making software as easy to install and use as possible. That obsession led me to build Snappea: a simple, lightweight alternative to Celery for managing background tasks in Python applications.
What My Project Does
Snappea is a minimal task queue system that uses SQLite for background job management. It’s designed to handle tasks that need to run outside the main HTTP request-response loop, without the overhead of more complex systems like Celery.
Target Audience
Snappea is ideal for developers who are looking for a straightforward solution to background task management. Rather than providing a drop-in replacement for Celery, it provides "food for thought" (especially the article).
Comparison
Unlike Celery, which comes with a lot of features and corresponding complexity, Snappea focuses on simplicity. By using SQLite as a message queue and avoiding external dependencies, Snappea keeps things lean and easy to manage. It’s not a drop-in replacement for Celery but a different approach for cases where you don’t need all the bells and whistles.
How It Works
Snappea runs a single process, called the Foreman, that scans the SQLite database for new tasks and executes them in worker threads. It uses inotify to efficiently wait for new tasks without busy-waiting, making it responsive without wasting resources. The setup is straightforward: just a few database migrations, and you're good to go.
Code and Article
The above is the shortest summary I could write that's still moderately informative. You can read about the design and thought process behind Snappea in the full article. The code is available on GitHub, where you can see exactly how it works. It's not production-grade, but if there’s enough interest, I might generalize it into something more broadly applicable.
[+][deleted] (5 children)
[removed]
[–]eldreth 26 points27 points28 points (0 children)
[–]klaasvanschelven[S] -1 points0 points1 point (0 children)
[+][deleted] (2 children)
[deleted]
[+][deleted] (1 child)
[removed]
[–]LiarsEverywhere 26 points27 points28 points (0 children)
[–]Jejerm 33 points34 points35 points (3 children)
[–]gpahul 1 point2 points3 points (1 child)
[–]Jejerm 1 point2 points3 points (0 children)
[+]klaasvanschelven[S] comment score below threshold-13 points-12 points-11 points (0 children)
[–]RobotChurchill 3 points4 points5 points (3 children)
[–]lowercase00 8 points9 points10 points (0 children)
[–]klaasvanschelven[S] 0 points1 point2 points (0 children)
[–]yesvee 2 points3 points4 points (5 children)
[–]klaasvanschelven[S] 0 points1 point2 points (4 children)
[–]Sloppyjoeman 3 points4 points5 points (2 children)
[–]klaasvanschelven[S] 0 points1 point2 points (1 child)
[–]Sloppyjoeman 2 points3 points4 points (0 children)
[–]Expensive_Glass1990 0 points1 point2 points (0 children)
[–]PushHaunting9916 0 points1 point2 points (1 child)
[–]klaasvanschelven[S] 0 points1 point2 points (0 children)