News for hackers. Stuff that matters.
Re:Queueing Theory: An introduction for software development by idoubtit on Monday September 18, 2023 @08:36AM (#37555305)
> But I simply never see any discussion or usage of the low-level queue features offered by the language, like Deques

I respectfully disagree:

1. Deques is not a "feature[s] offered by the language". Its part of an external extension (meaning it's a C compiled plug-in to the main engine). It's development is outside of the language scope, see https://pecl.php.net/package/ds

2. Deques is barely a "low-level queue feature". It's just a data structure that can be performant for some implementations of queues. Native arrays provide slower but similar features.

3. It's sane that this (Deques) implementation detail (the in-memory data structure) is less discussed than more central and generic subjects, like scaling MariaDB.

If I consider the first two problems mentioned in the article (systems for issues and for kanban), I think Deques is unsuitable to them, because it's meant to replace arrays for in-memory works. The problems require a persistent storage, and the optimization of a PHP storage for the queue is probably irrelevant.

Re:Queueing Theory: An introduction for software development by jw1224 on Monday September 18, 2023 @10:43AM (#37556794)
You're totally right and I agree too :) I forgot Deques (and DS) were via PECL.

It's a poor example to give in relation to the article's real-world cases. Nonetheless, it is relevant to queue theory, and knowledge of how, why, and when these data structures can be more optimal than simple arrays has helped me more broadly in the past.

A much more real-world example would be Laravel Horizon, which uses Redis queues to build scalable distributed systems very easily. The last time I set it up I think it took me 5 minutes at most... https://laravel.com/docs/10.x/horizon