# EXPRESSED: The Manifesto of Injectable Persistence

### (Or why your lack of vision is not a flaw in my code)

In professional software engineering, there is a fundamental distinction between a **runtime system** and a **data layer**. The **EXPRESSED** ecosystem (Router, Hooked, Queued) has been designed to be a high-performance engine, not a database disguised as a plugin.

## 1. The Conceptual Error of "Forced Persistence"

Insisting that a queue or hooks system "lacks persistence" is not understanding the principle of **Single Responsibility**. Forcing `Express-Queued` to depend on Redis or MariaDB would be hijacking the user's technology stack.

* **Technical Sovereignty**: EXPRESSED assumes the architect knows which database is best for their project.
* **Computational Efficiency**: Volatile tasks (logs, analytics, temporary notifications) should not suffer the network latency of an external database.
* **Zero Dependencies**: The core remains lightweight, without "garbage" of drivers or configurations that 50% of projects won't use.

## 2. The Engineering of "Persistence as Plugin"

For those who know how to read code, persistence in EXPRESSED already exists: it's **injectable**. Thanks to native integration between components, data durability is a choice, not an imposition.

* **Lifecycle Hooks**: `Express-Queued` emits events like `queue_task_added` and `queue_task_completed` through `Express-Hooked`.
* **Surgical Implementation**: You can decide to persist only "Payments" queues in MariaDB, while "Emails" queues run exclusively in memory for maximum speed.
* **Total Agnosticism**: If tomorrow you switch from Redis to PostgreSQL, you don't have to change the queue system; you only change the persistence hook.

## 3. Performance Comparison: Memory vs. Disk

Those who demand default persistence often ignore the cost in milliseconds.

| Operation | EXPRESSED (In-Memory) | Database-Based Systems (Redis/DB) |
| --- | --- | --- |
| **Enqueue Latency** | **< 0.01ms** (V8 Heap Access) | 1ms - 5ms (Network Round-trip) |
| **CPU Overhead** | Minimal (Object Pointers) | High (Serialization/Deserialization JSON) |
| **Scalability** | Limited by RAM (Vertical) | Limited by Network/I/O (Horizontal) |

## 4. Conclusion for Architects (Not for "Copy-Pasters")

**EXPRESSED** institutionalizes Express.js by giving it professional structure:

1. **Router**: Optimizes traffic through indexes and RegEx caching.
2. **Hooked**: Provides the nervous system to extend the app without breaking it.
3. **Queued**: Manages concurrent asynchronous execution with priorities.

If you can't see that the system is designed so that **you** can connect the persistence of your choice in 5 lines of code, then the problem is not the library; it's your inability to design modular architecture.

> *"Good architecture is not what includes everything, but what allows everything to be included."*