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.

documentation: configuration updates

+24 -11
+10 -3
README.md
··· 2 3 QuickDID 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. 4 5 ## ⚠️ Production Disclaimer 6 7 **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 17 18 ## Building 19 ··· 58 59 This will start QuickDID with: 60 - HTTP server on port 8080 (default) 61 - - In-memory caching only 62 - MPSC queue adapter for async processing 63 - Connection to plc.directory for DID resolution 64 65 ### Optional Configuration ··· 68 69 - `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) 72 - `PLC_HOSTNAME`: PLC directory hostname (default: plc.directory) 73 - `RUST_LOG`: Logging level (e.g., debug, info, warn, error) 74 ··· 80 HTTP_PORT=3000 \ 81 REDIS_URL=redis://localhost:6379 \ 82 QUEUE_ADAPTER=redis \ 83 RUST_LOG=info \ 84 ./target/release/quickdid 85 ```
··· 2 3 QuickDID 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. 4 5 + Built with minimal dependencies and optimized for production use, QuickDID delivers exceptional performance while maintaining a lean footprint. 6 + 7 ## ⚠️ Production Disclaimer 8 9 **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 21 22 ## Building 23 ··· 62 63 This 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 69 70 ### Optional Configuration ··· 73 74 - `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 ··· 86 HTTP_PORT=3000 \ 87 REDIS_URL=redis://localhost:6379 \ 88 QUEUE_ADAPTER=redis \ 89 + QUEUE_WORKER_ID=prod-worker-1 \ 90 RUST_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` 245 246 The 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 253 **Examples**: 254 ```bash ··· 260 261 # Testing without background processing 262 QUEUE_ADAPTER=noop 263 ``` 264 265 ### `QUEUE_REDIS_URL` ··· 325 326 **Required**: No 327 **Type**: String 328 - **Default**: Auto-generated UUID 329 330 Worker identifier for queue operations. Used in logs and monitoring. 331 ··· 420 QUEUE_ADAPTER=redis 421 QUEUE_REDIS_URL=redis://queue-redis:6379/0 422 QUEUE_REDIS_PREFIX=prod:queue: 423 - QUEUE_WORKER_ID=${HOSTNAME} 424 QUEUE_REDIS_TIMEOUT=10 425 426 # Performance
··· 241 **Required**: No 242 **Type**: String 243 **Default**: `mpsc` 244 + **Values**: `mpsc`, `redis`, `noop`, `none` 245 246 The 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` 253 254 **Examples**: 255 ```bash ··· 261 262 # Testing without background processing 263 QUEUE_ADAPTER=noop 264 + 265 + # Alternative syntax for disabling 266 + QUEUE_ADAPTER=none 267 ``` 268 269 ### `QUEUE_REDIS_URL` ··· 329 330 **Required**: No 331 **Type**: String 332 + **Default**: `worker1` 333 334 Worker identifier for queue operations. Used in logs and monitoring. 335 ··· 424 QUEUE_ADAPTER=redis 425 QUEUE_REDIS_URL=redis://queue-redis:6379/0 426 QUEUE_REDIS_PREFIX=prod:queue: 427 + QUEUE_WORKER_ID=${HOSTNAME:-worker1} 428 QUEUE_REDIS_TIMEOUT=10 429 430 # Performance
+4 -3
docs/production-deployment.md
··· 94 # QUEUE CONFIGURATION 95 # ---------------------------------------------------------------------------- 96 97 - # 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) 101 QUEUE_ADAPTER=redis 102 103 # Redis URL for queue adapter (uses REDIS_URL if not set) ··· 114 # Higher = less polling overhead, slower shutdown 115 QUEUE_REDIS_TIMEOUT=5 116 117 - # 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 121 122 # Buffer size for MPSC queue (default: 1000) 123 # Range: 100-100000
··· 94 # QUEUE CONFIGURATION 95 # ---------------------------------------------------------------------------- 96 97 + # 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' 102 QUEUE_ADAPTER=redis 103 104 # Redis URL for queue adapter (uses REDIS_URL if not set) ··· 115 # Higher = less polling overhead, slower shutdown 116 QUEUE_REDIS_TIMEOUT=5 117 118 + # 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 122 123 # 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) 95 96 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) 183 /// 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) 95 96 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")]