Spanner-inspired distributed database with external consistency
Project description
spyMonk-DB Enterprise
A Google Spanner-inspired distributed SQL database with external consistency and horizontal scalability.
๐ Quick Start
# Install from PyPI
pip3 install spymonk-db
# Start the database server
spymonk-server --port 50051
# Or install from source
git clone https://gitlab.com/shubhajeet.pradhan/spymonk-db2.0.git
cd spymonk-db2.0
pip3 install -e .
๐ Documentation
- Architecture - System design and components
- Implementation - Technical details
- Enterprise Features - Advanced features
- Benchmarks - Performance metrics
๐ฏ Features
- โ External Consistency - Linearizable transactions across distributed nodes
- โ Distributed Transactions - ACID guarantees with 2-Phase Commit
- โ MVCC - Multi-Version Concurrency Control for lock-free reads
- โ Paxos Consensus - Leader-based replication with automatic failover
- โ LSM-Tree Storage - Write-optimized storage with WAL
- โ SQL Support - Standard SQL query interface
๐ป Usage
Embedded Mode (Single Node)
from spymonk_enterprise.client import SpyMonkClient
client = SpyMonkClient("/tmp/spymonk_data")
client.start()
# Simple operations
client.put(b"key", b"value")
value = client.get(b"key")
client.stop()
Distributed Mode (Cluster)
from spymonk_enterprise.client import DistributedClient
client = DistributedClient([
"node1.example.com:5000",
"node2.example.com:5001",
"node3.example.com:5002"
])
# Use same API as embedded mode
client.put(b"key", b"value")
๐ฆ Package Distribution
See scripts/build_package.sh for building wheel packages.
See scripts/private-pypi/ for private PyPI setup.
๐งช Testing
# Run unit tests
pytest tests/
# Run benchmarks
python benchmarks/throughput.py
๐๏ธ Project Structure
spyMonk-DB/
โโโ spymonk_enterprise/ # Core implementation
โ โโโ client/ # Client SDK
โ โโโ storage/ # LSM-Tree & MVCC
โ โโโ transaction/ # Transaction manager
โ โโโ replication/ # Paxos consensus
โ โโโ time/ # Hybrid Logical Clock
โ โโโ sql/ # SQL parser & executor
โ โโโ schema/ # Directory & schemas
โโโ docs/ # Documentation
โโโ scripts/ # Build & deployment scripts
โโโ tests/ # Test suite
โโโ benchmarks/ # Performance benchmarks
โโโ examples/ # Usage examples
๐ค Contributing
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open Pull Request
๐ License
MIT License - See LICENSE file
For full deployment guide, see the parent project README
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file spymonk_db-0.1.0.tar.gz.
File metadata
- Download URL: spymonk_db-0.1.0.tar.gz
- Upload date:
- Size: 40.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d89c88911398f33588d23a0f6ce5b02ba6b137349d3b0d02f37497b5b29722
|
|
| MD5 |
ec538906f9283597c975de1d4c5c74ba
|
|
| BLAKE2b-256 |
77ed515fc54b88d9ea197ecadf1841342f4c9c94a8fa49fe8dc3f9a4e1c2af47
|
File details
Details for the file spymonk_db-0.1.0-py3-none-any.whl.
File metadata
- Download URL: spymonk_db-0.1.0-py3-none-any.whl
- Upload date:
- Size: 141.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afce72789cb82e5453db70b85a1111a754b7ba6f6643497d9583e1e68968040f
|
|
| MD5 |
7aa0184245ab63aed29a63ebb1af6569
|
|
| BLAKE2b-256 |
82118004f980382c2abf10f535c217f76d871b466c72a82f1a51a2d45719c7c0
|