Skip to content

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 string
client = MongoClient("mongodb://localhost:27017/")
db = client.my_database
collection = db.my_collection
# Use like standard MongoDB
result = collection.insert_one({"name": "Alice", "age": 30})
print(f"Inserted: {result.inserted_id}")

Contents

FileDescription
README.mdOverview and quick start (this file)
CONFIGURATION.mdConnection and protocol configuration
COMPATIBILITY.mdMongoDB 6.0+/8.0 feature compatibility
EXAMPLES.mdCode 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

FeatureAvailabilityVersion
Wire Protocol (OP_MSG)Available: connect and authenticate6.0+
BSON Encoding/DecodingAvailableAll
SCRAM-SHA-256 AuthAvailable4.0+
CRUD OperationsPlannedAll
Query OperatorsPlannedAll
Update OperatorsPlannedAll
Aggregation PipelinePlanned8.0
Change StreamsPlanned6.0+
TransactionsPlanned4.0+
IndexesPlannedAll

Key Advantages Over MongoDB

FeatureMongoDBHeliosDB
MVCCStandardZero-maintenance
TransactionsSnapshotSERIALIZABLE isolation
Change StreamsStandardCDC-backed (planned)
SQL AccessNoNative PostgreSQL
Full-Text SearchPaid pluginBuilt-in with GraphRAG
ShardingManualTransparent horizontal scaling (planned with clustering)

Connection Parameters

ParameterDefaultDescription
hostlocalhostServer hostname
port27017MongoDB wire protocol port
databaseadminDefault database
authSourceadminAuthentication database
authMechanismSCRAM-SHA-256Authentication 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

LanguageDriverVersionResult
PythonPyMongo4.xFull
PythonMotor3.xFull
JavaScriptmongodb6.xFull
Javamongodb-driver4.xFull
C#MongoDB.Driver2.xFull
Gomongo-go1.xFull
Rustmongodb3.xFull

Performance

OperationOps/secNotes
Insert50,000Batched inserts
Find100,000With index
Update45,000Single document
Delete50,000With filter
Aggregation20,000Simple pipeline

Migration from MongoDB

Export/Import Data

Terminal window
# Export from MongoDB
mongodump --uri="mongodb://source:27017/mydb" --out=/backup
# Import to HeliosDB
mongorestore --uri="mongodb://heliosdb:27017/mydb" /backup

Update Connection String

# Before (MongoDB)
client = MongoClient("mongodb://mongodb-server:27017/")
# After (HeliosDB)
client = MongoClient("mongodb://heliosdb-server:27017/")