What is Bemi?
Bemi is an open-source solution designed to track database changes automatically, providing robust context-aware audit trails and advanced data management capabilities. It integrates seamlessly with PostgreSQL databases and popular Object-Relational Mappers (ORMs).
Key Features and Functionality
Database Change Tracking
Bemi uses the Change Data Capture (CDC) pattern by connecting to PostgreSQL’s Write-Ahead Log (WAL), ensuring 100% accuracy in tracking all database changes without requiring any alterations to the existing database structure.
Integration Levels
- Database Level: Tracks all database changes using PostgreSQL’s replication mechanisms.
- Application Level: Enhances low-level database changes with application-specific context using open-source libraries for popular ORMs like JavaScript/TypeScript, Ruby, and Python.
Use Cases
Bemi is versatile and supports various use cases, including:
- Audit Trails: For compliance purposes or customer support.
- Streaming: Real-time data streaming to applications.
- Time Travel: Retrieving historical data without implementing event sourcing.
- Troubleshooting: Identifying the root cause of application issues.
- Change Reversion: Reverting changes made by users or rolling back data changes within an API request.
- Distributed Tracing: Tracking changes across distributed systems.
- Testing: Rolling back or rolling forward to different application test states.
- Analyzing Trends: Gaining insights into historical trends and changes for informed decision-making.
Architecture
Bemi’s architecture includes:
- Debezium: A tool for implementing CDC, connecting to PostgreSQL replication logs.
- NATS JetStream: A cloud-native messaging system for handling data.
- Bemi Worker: A process that stitches data changes with application context and stores this information in a structured format.
Security and Compliance
Bemi is SOC 2 Type I compliant, ensuring secure storage and processing of client data. It includes features such as daily backups, high availability with multiple PostgreSQL nodes, network restrictions, and runtime isolation to protect customer data.
Performance and Simplicity
Bemi operates in the background without affecting runtime execution, ensuring high performance and ease of use. It does not require any changes to the existing database tables, making it a non-invasive solution.
In summary, Bemi is a powerful tool for tracking database changes, providing comprehensive audit trails, and enhancing data management with application-specific context, all while maintaining simplicity and security.