https://github.com/naimulh247/chronobase
embedded time-series database written in Go
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (9.2%) to scientific vocabulary
Keywords
Repository
embedded time-series database written in Go
Basic Info
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
ChronoBase
ChronoBase is a high-performance, embedded time-series database written in Go, designed for efficient storage and retrieval of log and metric data. It features a modular architecture with configurable storage policies, compression, and automatic data management.
Features
- Time-Series Optimized: Purpose-built for time-series data with efficient timestamp-based indexing
- Configurable Storage: Flexible tablet/shard-based storage with automatic data management
- Data Compression: Built-in GZIP compression support for optimal storage efficiency
- Automatic Data Management:
- Configurable TTL (Time-To-Live) for data retention
- Background merging of tablets/shard for storage optimization
- Periodic cleanup of expired data
- Concurrent Operations: Thread-safe design supporting parallel reads and writes
- Block-Based Storage: Efficient block-based storage format for better I/O performance
- JSON Configuration: Easy configuration via JSON files
Getting Started
Prerequisites
- Go 1.21 or higher
- Git
Installation
bash
git clone https://github.com/naimulh247/ChronoBase.git
cd ChronoBase
go build
Basic Usage
```go // Create and configure database cfg := config.DefaultConfig() database, err := db.OpenDB(cfg) if err != nil { log.Fatal(err) } defer database.Close()
// Create a table err = database.CreateTable("metrics", db.TableOptions{ TTL: 24 * time.Hour, PrimaryKeys: []string{"id"}, })
// Insert data row := storage.Row{ Key: []byte("metric1"), Timestamp: time.Now(), Data: []byte("example data"), } err = database.Insert("metrics", row)
// Query data startTime := time.Now().Add(-time.Hour) endTime := time.Now() results, err := database.Query("metrics", startTime, endTime) ```
Configuration
ChronoBase can be configured via a JSON configuration file. Example configuration:
json
{
"data_dir": "./data",
"max_tablet_size": 268435456,
"block_size": 65536,
"flush_interval": "10m",
"merge_interval": "1m",
"compression_enabled": true,
"compression_type": "gzip",
"compression_level": 6,
"max_memory_usage": 1073741824,
"max_open_files": 1000,
"buffer_pool_size": 134217728,
"concurrent_merges": 2,
"query_concurrency": 4,
"maintenance_interval": "1h",
"max_file_age": "720h",
"backup_interval": "24h",
"backup_retention": 7,
"log_level": "info",
"log_file": "db.log",
"enable_metrics": true
}
Architecture
ChronoBase uses a tablet/shard-based storage architecture: - Data is organized into tables - Each table contains multiple tablets - Tablets/shard store data in compressed blocks - In-memory buffer for recent writes - Background processes for merging and cleanup
Key Components:
- Table Manager: Handles table creation and management
- Tablet Storage: Manages data storage in tablets/shard
- Block Engine: Efficient block-based storage format
- Index Manager: Maintains time-based indices
- Compression Engine: Handles data compression/decompression
Work in Progress
This project is under active development. Upcoming features include: - Advanced querying capabilities - Additional compression algorithms - Replication support - Metrics and monitoring - Enhanced performance optimizations - HTTP API interface
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Owner
- Name: Naimul Hasan
- Login: naimulh247
- Kind: user
- Location: New York
- Repositories: 35
- Profile: https://github.com/naimulh247
Brandeis University CS & Econ Major
GitHub Events
Total
- Watch event: 2
- Push event: 6
- Pull request event: 5
- Fork event: 1
Last Year
- Watch event: 2
- Push event: 6
- Pull request event: 5
- Fork event: 1
Issues and Pull Requests
Last synced: 10 months ago
All Time
- Total issues: 0
- Total pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 14 minutes
- Total issue authors: 0
- Total pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 1
- Average time to close issues: N/A
- Average time to close pull requests: 14 minutes
- Issue authors: 0
- Pull request authors: 1
- Average comments per issue: 0
- Average comments per pull request: 0.0
- Merged pull requests: 1
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
- naimulh247 (1)