AI Dictionary › Fondamenti AI
Coda (Queue)
A queue is a structure that holds items waiting to be processed, normally serving them in arrival order: first in, first out (FIFO). In distributed systems the message queue is the buffer that decouples those who produce work from those who consume it, letting each side run at its own pace.
A queue is a structure that holds items waiting to be processed, normally serving them in arrival order: first in, first out (FIFO). In distributed systems the message queue is the buffer that decouples those who produce work from those who consume it, letting each side run at its own pace.
A producer places messages in the queue and one or more consumers pick them up and process them when ready. If consumers slow down, the queue grows and absorbs the spike instead of letting the system collapse. Modern message brokers add delivery guarantees, processing acknowledgements and dead letter queues for messages that repeatedly fail.
In AI, queues govern batched inference requests, training jobs waiting for GPUs, and agent pipelines processing tasks in sequence. Tools like RabbitMQ, Amazon SQS and Apache Kafka orchestrate flows of millions of messages. Outside AI, every printer, call center and online payment system runs on queues.
The word comes from the French queue, an animal's tail, in turn from the Latin cauda. The mathematical study of queues predates computers: in 1909 the Danish engineer Agner Krarup Erlang analyzed waiting times at the Copenhagen telephone exchange, founding queueing theory. In software, message queues became critical infrastructure with IBM MQSeries (1993) and the open source brokers of the 2000s.
Una coda (queue) è una struttura che conserva elementi in attesa di essere elaborati, servendoli di norma nell'ordine di arrivo: il primo che entra è il primo che esce (FIFO, First In First Out). Nei sistemi distribuiti la coda di messaggi è il cuscinetto che disaccoppia chi produce lavoro da chi lo consuma, permettendo a ciascuno di andare al proprio ritmo.
Un produttore inserisce messaggi nella coda e uno o più consumatori li prelevano ed elaborano quando sono pronti. Se i consumatori rallentano, la coda si allunga e assorbe il picco invece di far collassare il sistema. I message broker moderni aggiungono garanzie di consegna, conferme di avvenuta elaborazione e code dei messaggi falliti (dead letter queue) per i casi irrecuperabili.
Nell'AI le code governano i batch di richieste di inferenza, i job di addestramento in attesa di GPU e le pipeline degli agenti che elaborano compiti in sequenza. Strumenti come RabbitMQ, Amazon SQS e Apache Kafka orchestrano flussi di milioni di messaggi. Fuori dall'AI, ogni stampante, ogni call center e ogni sistema di pagamento online lavora su code.
La parola viene dal francese queue, coda animale, a sua volta dal latino cauda. Lo studio matematico delle code nacque prima dei computer: nel 1909 l'ingegnere danese Agner Krarup Erlang analizzò le attese al centralino telefonico di Copenaghen, fondando la teoria delle code. Nei software, le code di messaggi divennero infrastruttura critica con IBM MQSeries (1993) e con i broker open source degli anni 2000.
From our network
INDACO TMS — Transport Management for European Logistics
Shipment tracking, multi-carrier EDI and automated invoicing in one cloud platform. Invoices generated in under 10 seconds.
Visit indacotms.com →From the Agora Intelligence blog
📱 Download the Android app (beta) iOS coming soon
Say what you mean. Get what you need.
Grace Certified — the AI coach that trains and certifies your prompt engineering — by Agora Intelligence.