How measproem/diesel_async works
Main Components
a) Core Components:
• Async Connection Layer
• Query Execution Engine
• Connection Pooling Adapters
• Database-specific Implementations
• Transaction Management
• Statement Cache
b) External Integration Points:
• Diesel ORM Core
• Database Backends (PostgreSQL, MySQL)
• Connection Pool Libraries (deadpool, bb8, mobc)
• TLS/Security Layer
Top Layer: Application Code
Middle Layer: diesel-async Interface
Bottom Layer: Database Connections
Specific Component Relationships
a) Core Flow:
Application Code → AsyncConnection → Database Backend
b) Connection Pooling:
Pool Manager → Connection Wrapper → Async Connection → Database
Detailed Component Breakdown
Core Components:
• AsyncConnectionWrapper
• RunQueryDsl
• TransactionManager
• StatementCache
Database-Specific:
• PostgreSQL Implementation
• MySQL Implementation
Connection Pooling:
• BB8 Adapter
• Deadpool Adapter
• Mobc Adapter
Important Relationships to Highlight
• How the async connection wrapper interfaces with the synchronous Diesel core
• Transaction flow through the transaction manager
• Demonstrate how connection pooling integrates with the async connections
• Streaming query pathway
Implementation Details
Use these symbols:
• Rectangles: Main components
• Diamonds: Decision points (like transaction boundaries)
• Double lines: Interface boundaries
Additional Notes
• Notes about feature flags and their effects on the architecture
• Error handling pathways
• Async boundaries clearly