How svilendobrev/py-xtdb-datomic works
Main Components
a) Client Layer:
• Separate client implementations for Datomic and XTDB (v1 and v2)
• REST API wrapper components
• Query builders for different query languages (Datalog and XTQL)
b) Base Components:
• Object mapping system
• Schema handling
• Query syntax utilities
• EDN (Extensible Data Notation) handling
c) Storage Layer:
• Multiple backend configurations
• Kafka (with both Kraft and Zookeeper options)
• PostgreSQL
• Hybrid setups (Kafka + PostgreSQL)
[Client Applications]
• ↓
[Python Interface Layer]
• ↓
[Database Systems]
Specific Implementation Details
Top Level (Client Applications):
• External applications connecting through HTTP REST API
• JSON/EDN/Transit-JSON data formats
Middle Level (Python Interface Layer):
• Create three parallel tracks for different implementations:
• Datomic track (datomic/)
• XTDB v1 track (xtdb/)
• XTDB v2 track (xtdb2/)
• Shared base components (base/)
• Query builders and syntax handlers
Bottom Level (Database Systems):
• Datomic and XTDB nodes
• Different storage configurations
• Checkpoint/snapshot system
Important Relationships
• Data flow directions between components
• API boundaries
• Storage system interactions
• Query transformation pipeline
• Event sourcing flow
Additional Elements
Annotations for:
• Version compatibility
• Implementation status (completed vs. TODO)
• External dependencies
• Configuration points