www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - pacchettino

reply Andrea Fontana <nospam example.org> writes:
Hi everyone,
I’ve put together a small, lightweight library called 
pacchettino. It’s a simple file-based queue system designed for 
cases where you need to distribute workloads across multiple 
threads or processes without the overhead of a full-blown message 
broker.

The API is designed to be very straightforward.

It’s nothing "groundbreaking" but I found myself rewriting this 
logic too often, so I decided to package it. If you need a quick 
way to sync tasks between different D processes via the 
filesystem, give it a try!

Imagine you have a web server (eg: serverino) where users upload 
files to be processed (like converting a video or parsing a huge 
CSV). You don't want to make the user wait while your server does 
the heavy lifting, and you certainly don't want to lose the file 
if the process is terminated.

With pacchettino, your web server just drops the file into a 
"queue" folder and immediately tells the user "we're working on 
it!". Meanwhile, a separate process (not the server) picks up 
these files one by one and processes them.

Your web server can still "peek" at the queue to tell the user 
exactly what’s happening whether the file is still waiting, 
currently being processed.

Zero-dependencies / process and thread safe / crash recovery / 
persistent.

https://github.com/trikko/pacchettino

Andrea
Feb 04
parent Dejan Lekic <dejan.lekic gmail.com> writes:
On Wednesday, 4 February 2026 at 21:46:15 UTC, Andrea Fontana 
wrote:
 Hi everyone,
 I’ve put together a small, lightweight library called 
 pacchettino. It’s a simple file-based queue system designed for 
 cases where you need to distribute workloads across multiple 
 threads or processes without the overhead of a full-blown 
 message broker.

 The API is designed to be very straightforward.

 It’s nothing "groundbreaking" but I found myself rewriting this 
 logic too often, so I decided to package it. If you need a 
 quick way to sync tasks between different D processes via the 
 filesystem, give it a try!

 Imagine you have a web server (eg: serverino) where users 
 upload files to be processed (like converting a video or 
 parsing a huge CSV). You don't want to make the user wait while 
 your server does the heavy lifting, and you certainly don't 
 want to lose the file if the process is terminated.

 With pacchettino, your web server just drops the file into a 
 "queue" folder and immediately tells the user "we're working on 
 it!". Meanwhile, a separate process (not the server) picks up 
 these files one by one and processes them.

 Your web server can still "peek" at the queue to tell the user 
 exactly what’s happening whether the file is still waiting, 
 currently being processed.

 Zero-dependencies / process and thread safe / crash recovery / 
 persistent.
Very nice! I like the simplicity! :)
Feb 05