QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides handle-to-DID resolution with Redis-backed caching and queue processing.
···23QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides blazing-fast handle-to-DID resolution with intelligent caching strategies, supporting both in-memory and Redis-backed persistent caching with binary serialization for optimal storage efficiency.
4005## ⚠️ Production Disclaimer
67**This project is a release candidate and has not been fully vetted for production use.** While it includes comprehensive error handling and has been designed with production features in mind, more thorough testing is necessary before deploying in critical environments. Use at your own risk and conduct appropriate testing for your use case.
···11- **Fast Handle Resolution**: Resolves AT Protocol handles to DIDs using DNS TXT records and HTTP well-known endpoints
12- **Multi-Layer Caching**: In-memory caching with configurable TTL and Redis-backed persistent caching (90-day TTL)
13- **Binary Serialization**: Compact storage format reduces cache size by ~40% compared to JSON
14-- **Queue Processing**: Asynchronous handle resolution with support for MPSC and Redis queue adapters
15- **AT Protocol Compatible**: Implements XRPC endpoints for seamless integration with AT Protocol infrastructure
16- **Comprehensive Error Handling**: Includes health checks and graceful shutdown support
001718## Building
19···5859This will start QuickDID with:
60- HTTP server on port 8080 (default)
61-- In-memory caching only
62- MPSC queue adapter for async processing
063- Connection to plc.directory for DID resolution
6465### Optional Configuration
···6869- `HTTP_PORT`: Server port (default: 8080)
70- `REDIS_URL`: Redis connection URL for persistent caching (e.g., `redis://localhost:6379`)
71-- `QUEUE_ADAPTER`: Queue type - 'mpsc' or 'redis' (default: mpsc)
072- `PLC_HOSTNAME`: PLC directory hostname (default: plc.directory)
73- `RUST_LOG`: Logging level (e.g., debug, info, warn, error)
74···80HTTP_PORT=3000 \
81REDIS_URL=redis://localhost:6379 \
82QUEUE_ADAPTER=redis \
083RUST_LOG=info \
84./target/release/quickdid
85```
···23QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides blazing-fast handle-to-DID resolution with intelligent caching strategies, supporting both in-memory and Redis-backed persistent caching with binary serialization for optimal storage efficiency.
45+Built with minimal dependencies and optimized for production use, QuickDID delivers exceptional performance while maintaining a lean footprint.
6+7## ⚠️ Production Disclaimer
89**This project is a release candidate and has not been fully vetted for production use.** While it includes comprehensive error handling and has been designed with production features in mind, more thorough testing is necessary before deploying in critical environments. Use at your own risk and conduct appropriate testing for your use case.
···13- **Fast Handle Resolution**: Resolves AT Protocol handles to DIDs using DNS TXT records and HTTP well-known endpoints
14- **Multi-Layer Caching**: In-memory caching with configurable TTL and Redis-backed persistent caching (90-day TTL)
15- **Binary Serialization**: Compact storage format reduces cache size by ~40% compared to JSON
16+- **Queue Processing**: Asynchronous handle resolution with support for MPSC, Redis, and no-op queue adapters
17- **AT Protocol Compatible**: Implements XRPC endpoints for seamless integration with AT Protocol infrastructure
18- **Comprehensive Error Handling**: Includes health checks and graceful shutdown support
19+- **Minimal Dependencies**: Optimized dependency tree for faster compilation and reduced attack surface
20+- **Predictable Worker IDs**: Simple default worker identification for distributed deployments
2122## Building
23···6263This will start QuickDID with:
64- HTTP server on port 8080 (default)
65+- In-memory caching only (300-second TTL)
66- MPSC queue adapter for async processing
67+- Default worker ID: "worker1"
68- Connection to plc.directory for DID resolution
6970### Optional Configuration
···7374- `HTTP_PORT`: Server port (default: 8080)
75- `REDIS_URL`: Redis connection URL for persistent caching (e.g., `redis://localhost:6379`)
76+- `QUEUE_ADAPTER`: Queue type - 'mpsc', 'redis', or 'noop' (default: mpsc)
77+- `QUEUE_WORKER_ID`: Worker identifier for distributed queue processing (default: worker1)
78- `PLC_HOSTNAME`: PLC directory hostname (default: plc.directory)
79- `RUST_LOG`: Logging level (e.g., debug, info, warn, error)
80···86HTTP_PORT=3000 \
87REDIS_URL=redis://localhost:6379 \
88QUEUE_ADAPTER=redis \
89+QUEUE_WORKER_ID=prod-worker-1 \
90RUST_LOG=info \
91./target/release/quickdid
92```
+7-3
docs/configuration-reference.md
···241**Required**: No
242**Type**: String
243**Default**: `mpsc`
244-**Values**: `mpsc`, `redis`, `noop`
245246The type of queue adapter for background handle resolution.
247···249- `mpsc`: In-memory multi-producer single-consumer queue (default)
250- `redis`: Redis-backed distributed queue
251- `noop`: Disable queue processing (testing only)
0252253**Examples**:
254```bash
···260261# Testing without background processing
262QUEUE_ADAPTER=noop
000263```
264265### `QUEUE_REDIS_URL`
···325326**Required**: No
327**Type**: String
328-**Default**: Auto-generated UUID
329330Worker identifier for queue operations. Used in logs and monitoring.
331···420QUEUE_ADAPTER=redis
421QUEUE_REDIS_URL=redis://queue-redis:6379/0
422QUEUE_REDIS_PREFIX=prod:queue:
423-QUEUE_WORKER_ID=${HOSTNAME}
424QUEUE_REDIS_TIMEOUT=10
425426# Performance
···241**Required**: No
242**Type**: String
243**Default**: `mpsc`
244+**Values**: `mpsc`, `redis`, `noop`, `none`
245246The type of queue adapter for background handle resolution.
247···249- `mpsc`: In-memory multi-producer single-consumer queue (default)
250- `redis`: Redis-backed distributed queue
251- `noop`: Disable queue processing (testing only)
252+- `none`: Alias for `noop`
253254**Examples**:
255```bash
···261262# Testing without background processing
263QUEUE_ADAPTER=noop
264+265+# Alternative syntax for disabling
266+QUEUE_ADAPTER=none
267```
268269### `QUEUE_REDIS_URL`
···329330**Required**: No
331**Type**: String
332+**Default**: `worker1`
333334Worker identifier for queue operations. Used in logs and monitoring.
335···424QUEUE_ADAPTER=redis
425QUEUE_REDIS_URL=redis://queue-redis:6379/0
426QUEUE_REDIS_PREFIX=prod:queue:
427+QUEUE_WORKER_ID=${HOSTNAME:-worker1}
428QUEUE_REDIS_TIMEOUT=10
429430# Performance
+4-3
docs/production-deployment.md
···94# QUEUE CONFIGURATION
95# ----------------------------------------------------------------------------
9697-# Queue adapter type: 'mpsc', 'redis', or 'noop' (default: mpsc)
98# - 'mpsc': In-memory queue for single-instance deployments
99# - 'redis': Distributed queue for multi-instance or HA deployments
100# - 'noop': Disable queue processing (testing only)
0101QUEUE_ADAPTER=redis
102103# Redis URL for queue adapter (uses REDIS_URL if not set)
···114# Higher = less polling overhead, slower shutdown
115QUEUE_REDIS_TIMEOUT=5
116117-# Worker ID for Redis queue (auto-generated UUID if not set)
118# Set this for predictable worker identification in multi-instance deployments
119# Examples: worker-001, prod-us-east-1, $(hostname)
120-# QUEUE_WORKER_ID=worker-001
121122# Buffer size for MPSC queue (default: 1000)
123# Range: 100-100000
···94# QUEUE CONFIGURATION
95# ----------------------------------------------------------------------------
9697+# Queue adapter type: 'mpsc', 'redis', 'noop', or 'none' (default: mpsc)
98# - 'mpsc': In-memory queue for single-instance deployments
99# - 'redis': Distributed queue for multi-instance or HA deployments
100# - 'noop': Disable queue processing (testing only)
101+# - 'none': Alias for 'noop'
102QUEUE_ADAPTER=redis
103104# Redis URL for queue adapter (uses REDIS_URL if not set)
···115# Higher = less polling overhead, slower shutdown
116QUEUE_REDIS_TIMEOUT=5
117118+# Worker ID for Redis queue (defaults to "worker1")
119# Set this for predictable worker identification in multi-instance deployments
120# Examples: worker-001, prod-us-east-1, $(hostname)
121+QUEUE_WORKER_ID=prod-worker-1
122123# Buffer size for MPSC queue (default: 1000)
124# Range: 100-100000
+3-2
src/config.rs
···94 CACHE_TTL_REDIS TTL for Redis cache in seconds (default: 7776000 = 90 days)
9596 QUEUE CONFIGURATION:
97- QUEUE_ADAPTER Queue adapter: 'mpsc', 'redis', 'noop' (default: mpsc)
98 QUEUE_REDIS_URL Redis URL for queue adapter (uses REDIS_URL if not set)
99 QUEUE_REDIS_PREFIX Redis key prefix for queues (default: queue:handleresolver:)
100 QUEUE_REDIS_TIMEOUT Queue blocking timeout in seconds (default: 5)
101- QUEUE_WORKER_ID Worker ID for Redis queue (auto-generated UUID if not set)
102 QUEUE_BUFFER_SIZE Buffer size for MPSC queue (default: 1000)
103"
104)]
···180 /// - "mpsc": In-memory multi-producer single-consumer queue
181 /// - "redis": Redis-backed distributed queue
182 /// - "noop": Disable queue processing (for testing)
0183 ///
184 /// Default: "mpsc" for single-instance deployments
185 #[arg(long, env = "QUEUE_ADAPTER", default_value = "mpsc")]
···94 CACHE_TTL_REDIS TTL for Redis cache in seconds (default: 7776000 = 90 days)
9596 QUEUE CONFIGURATION:
97+ QUEUE_ADAPTER Queue adapter: 'mpsc', 'redis', 'noop', 'none' (default: mpsc)
98 QUEUE_REDIS_URL Redis URL for queue adapter (uses REDIS_URL if not set)
99 QUEUE_REDIS_PREFIX Redis key prefix for queues (default: queue:handleresolver:)
100 QUEUE_REDIS_TIMEOUT Queue blocking timeout in seconds (default: 5)
101+ QUEUE_WORKER_ID Worker ID for Redis queue (default: worker1)
102 QUEUE_BUFFER_SIZE Buffer size for MPSC queue (default: 1000)
103"
104)]
···180 /// - "mpsc": In-memory multi-producer single-consumer queue
181 /// - "redis": Redis-backed distributed queue
182 /// - "noop": Disable queue processing (for testing)
183+ /// - "none": Alias for "noop"
184 ///
185 /// Default: "mpsc" for single-instance deployments
186 #[arg(long, env = "QUEUE_ADAPTER", default_value = "mpsc")]