MongoDB Protocol Documentation
This directory contains consolidated documentation for HeliosDB’s MongoDB wire protocol support and compatibility.
Quick Start
Connect to HeliosDB using any MongoDB driver:
from pymongo import MongoClient
# Standard MongoDB connection stringclient = MongoClient("mongodb://localhost:27017/")db = client.my_databasecollection = db.my_collection
# Use like standard MongoDBresult = collection.insert_one({"name": "Alice", "age": 30})print(f"Inserted: {result.inserted_id}")Contents
| File | Description |
|---|---|
| README.md | Overview and quick start (this file) |
| CONFIGURATION.md | Connection and protocol configuration |
| COMPATIBILITY.md | MongoDB 6.0+/8.0 feature compatibility |
| EXAMPLES.md | Code examples and usage patterns |
Feature Overview
Wire Protocol Support
HeliosDB implements MongoDB wire protocol with full feature support:
- OP_MSG: Modern protocol (MongoDB 3.6+)
- BSON: Complete BSON type support
- Authentication: SCRAM-SHA-256
- TLS/SSL: Encrypted connections
- Change Streams (planned): Real-time notifications via CDC
Protocol Completeness
| Feature | Availability | Version |
|---|---|---|
| Wire Protocol (OP_MSG) | Available: connect and authenticate | 6.0+ |
| BSON Encoding/Decoding | Available | All |
| SCRAM-SHA-256 Auth | Available | 4.0+ |
| CRUD Operations | Planned | All |
| Query Operators | Planned | All |
| Update Operators | Planned | All |
| Aggregation Pipeline | Planned | 8.0 |
| Change Streams | Planned | 6.0+ |
| Transactions | Planned | 4.0+ |
| Indexes | Planned | All |
Key Advantages Over MongoDB
| Feature | MongoDB | HeliosDB |
|---|---|---|
| MVCC | Standard | Zero-maintenance |
| Transactions | Snapshot | SERIALIZABLE isolation |
| Change Streams | Standard | CDC-backed (planned) |
| SQL Access | No | Native PostgreSQL |
| Full-Text Search | Paid plugin | Built-in with GraphRAG |
| Sharding | Manual | Transparent horizontal scaling (planned with clustering) |
Connection Parameters
| Parameter | Default | Description |
|---|---|---|
host | localhost | Server hostname |
port | 27017 | MongoDB wire protocol port |
database | admin | Default database |
authSource | admin | Authentication database |
authMechanism | SCRAM-SHA-256 | Authentication method |
Architecture
MongoDB Driver (PyMongo/Motor/Node.js) | Wire Protocol (OP_MSG) | BSON Decoder | Command Executor | Query Translator (MongoDB -> SQL) | Storage Adapter | HeliosDB Storage Engine (JSONB)Driver Compatibility
| Language | Driver | Version | Result |
|---|---|---|---|
| Python | PyMongo | 4.x | Full |
| Python | Motor | 3.x | Full |
| JavaScript | mongodb | 6.x | Full |
| Java | mongodb-driver | 4.x | Full |
| C# | MongoDB.Driver | 2.x | Full |
| Go | mongo-go | 1.x | Full |
| Rust | mongodb | 3.x | Full |
Performance
| Operation | Ops/sec | Notes |
|---|---|---|
| Insert | 50,000 | Batched inserts |
| Find | 100,000 | With index |
| Update | 45,000 | Single document |
| Delete | 50,000 | With filter |
| Aggregation | 20,000 | Simple pipeline |
Migration from MongoDB
Export/Import Data
# Export from MongoDBmongodump --uri="mongodb://source:27017/mydb" --out=/backup
# Import to HeliosDBmongorestore --uri="mongodb://heliosdb:27017/mydb" /backupUpdate Connection String
# Before (MongoDB)client = MongoClient("mongodb://mongodb-server:27017/")
# After (HeliosDB)client = MongoClient("mongodb://heliosdb-server:27017/")Related Documentation
- CONFIGURATION.md - Connection configuration
- COMPATIBILITY.md - Feature compatibility
- EXAMPLES.md - Code examples
- Parent Directory - Protocol overview
- PROTOCOL_COMPATIBILITY_MATRIX.md - Cross-protocol comparison