# sharecat/queue_hub architecture

> Architecture diagram of the GitHub repository sharecat/queue_hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sharecat/queue_hub
- Repository: https://github.com/sharecat/queue_hub

## Overview

This repository is a hub of independent C utilities, chiefly FIFO, message, and priority queues; it does not show a single application pipeline from user input to a result. The README identifies the priority queue, message queue, FIFO buffer, and Linux-derived kfifo as the main offerings. Other distinct implementations include two priority-queue variants, a thread-safe general queue, and an MD5 command-line utility. The graph maps these runtime components; sampled evidence does not establish calls between the queue implementations.

Main entry points: [`queue_thread_safe/queue.c`](https://github.com/sharecat/queue_hub/blob/master/queue_thread_safe/queue.c) (Thread-safe queue), [`md5/main.c`](https://github.com/sharecat/queue_hub/blob/master/md5/main.c) (MD5 command line), [`fifo_buffer/fifo_buffer.c`](https://github.com/sharecat/queue_hub/blob/master/fifo_buffer/fifo_buffer.c) (Circular buffer), [`kfifo_from_linux/ringbuff.c`](https://github.com/sharecat/queue_hub/blob/master/kfifo_from_linux/ringbuff.c) (Linux kfifo)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fifo["FIFO buffers"]
  node_fifo_buffer["Circular buffer<br/>[fifo_buffer.c]"]
  node_kfifo["Linux kfifo<br/>[ringbuff.c]"]
end

subgraph group_priority["Priority queues"]
  node_priority_heap["Heap priority queue<br/>[pqueue.c]"]
  node_priority_table["Integer priority table<br/>[queue.c]"]
  node_priority_blocking["Blocking priority queue<br/>[priqueue.c]"]
end

subgraph group_concurrent["Concurrent queues"]
  node_msg_queue["Message queue<br/>[msg_queue.c]"]
  node_thread_queue["Thread-safe queue<br/>[queue.c]"]
  node_thread_queue_internal["Queue internals<br/>[queue_internal.c]"]
end

subgraph group_utility["Utility"]
  node_md5_cli["MD5 command line<br/>[main.c]"]
  node_md5_algorithm["MD5 algorithm<br/>[md5.c]"]
end

node_developer(("Queue user"))

node_developer -.->|"uses buffer"| node_fifo_buffer
node_developer -.->|"uses queue"| node_kfifo
node_developer -.->|"uses queue"| node_msg_queue
node_developer -.->|"uses queue"| node_priority_heap
node_md5_cli -->|"computes digest"| node_md5_algorithm
node_thread_queue -.->|"uses internals"| node_thread_queue_internal

click node_fifo_buffer "https://github.com/sharecat/queue_hub/blob/master/fifo_buffer/fifo_buffer.c"
click node_kfifo "https://github.com/sharecat/queue_hub/blob/master/kfifo_from_linux/ringbuff.c"
click node_msg_queue "https://github.com/sharecat/queue_hub/blob/master/msg_queue/msg_queue.c"
click node_priority_heap "https://github.com/sharecat/queue_hub/blob/master/priority_queue/pqueue.c"
click node_priority_table "https://github.com/sharecat/queue_hub/blob/master/priqueue/queue.c"
click node_priority_blocking "https://github.com/sharecat/queue_hub/blob/master/priqueue_2/priqueue.c"
click node_thread_queue "https://github.com/sharecat/queue_hub/blob/master/queue_thread_safe/queue.c"
click node_thread_queue_internal "https://github.com/sharecat/queue_hub/blob/master/queue_thread_safe/queue_internal.c"
click node_md5_cli "https://github.com/sharecat/queue_hub/blob/master/md5/main.c"
click node_md5_algorithm "https://github.com/sharecat/queue_hub/blob/master/md5/md5.c"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_fifo_buffer,node_kfifo toneBlue
class node_priority_heap,node_priority_table,node_priority_blocking toneAmber
class node_msg_queue,node_thread_queue,node_thread_queue_internal toneMint
class node_md5_cli,node_md5_algorithm,node_developer toneRose
```

## Components

### FIFO buffers

- [Circular buffer](https://github.com/sharecat/queue_hub/blob/master/fifo_buffer/fifo_buffer.c): `fifo_buffer/fifo_buffer.c`
- [Linux kfifo](https://github.com/sharecat/queue_hub/blob/master/kfifo_from_linux/ringbuff.c): `kfifo_from_linux/ringbuff.c`

### Priority queues

- [Heap priority queue](https://github.com/sharecat/queue_hub/blob/master/priority_queue/pqueue.c): `priority_queue/pqueue.c`
- [Integer priority table](https://github.com/sharecat/queue_hub/blob/master/priqueue/queue.c): `priqueue/queue.c`
- [Blocking priority queue](https://github.com/sharecat/queue_hub/blob/master/priqueue_2/priqueue.c): `priqueue_2/priqueue.c`

### Concurrent queues

- [Message queue](https://github.com/sharecat/queue_hub/blob/master/msg_queue/msg_queue.c): `msg_queue/msg_queue.c`
- [Thread-safe queue](https://github.com/sharecat/queue_hub/blob/master/queue_thread_safe/queue.c): `queue_thread_safe/queue.c`
- [Queue internals](https://github.com/sharecat/queue_hub/blob/master/queue_thread_safe/queue_internal.c): `queue_thread_safe/queue_internal.c`

### Utility

- [MD5 command line](https://github.com/sharecat/queue_hub/blob/master/md5/main.c): `md5/main.c`
- [MD5 algorithm](https://github.com/sharecat/queue_hub/blob/master/md5/md5.c): `md5/md5.c`

### Other components

- **Queue user**

## Connections

- Queue user → Circular buffer: uses buffer (evidence: `README.md`)
- Queue user → Linux kfifo: uses queue (evidence: `README.md`)
- Queue user → Message queue: uses queue (evidence: `README.md`)
- Queue user → Heap priority queue: uses queue (evidence: `README.md`)
- MD5 command line → MD5 algorithm: computes digest (evidence: `md5/main.c`)
- Thread-safe queue → Queue internals: uses internals
