{"id":37149143,"url":"https://github.com/inlopen/nexusbase","last_synced_at":"2026-01-14T17:36:55.342Z","repository":{"id":301484764,"uuid":"1006644160","full_name":"INLOpen/nexusbase","owner":"INLOpen","description":"NexusBase: A High-Performance Time Series Database","archived":false,"fork":false,"pushed_at":"2025-11-29T16:40:36.000Z","size":1834,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-30T15:54:28.397Z","etag":null,"topics":["time-series-database","tsdb"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/INLOpen.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-22T17:55:20.000Z","updated_at":"2025-11-29T16:40:40.000Z","dependencies_parsed_at":"2025-11-30T05:05:57.305Z","dependency_job_id":null,"html_url":"https://github.com/INLOpen/nexusbase","commit_stats":null,"previous_names":["inlopen/nexusbase"],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/INLOpen/nexusbase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INLOpen%2Fnexusbase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INLOpen%2Fnexusbase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INLOpen%2Fnexusbase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INLOpen%2Fnexusbase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/INLOpen","download_url":"https://codeload.github.com/INLOpen/nexusbase/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INLOpen%2Fnexusbase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28428875,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T16:38:47.836Z","status":"ssl_error","status_checked_at":"2026-01-14T16:34:59.695Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["time-series-database","tsdb"],"created_at":"2026-01-14T17:36:54.308Z","updated_at":"2026-01-14T17:36:55.334Z","avatar_url":"https://github.com/INLOpen.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NexusBase: A High-Performance Time Series Database\n\n**Version 0.0.1**\n\n**⚠️ คำเตือน: โปรเจกต์นี้กำลังอยู่ขั้นตอนการพัฒนา และยังไม่พร้อมสำหรับการใช้งานในระดับ Production ⚠️**\n\n---\n\n**NexusBase** คือโปรเจกต์ฐานข้อมูลอนุกรมเวลา (Time Series Database - TSDB) ประสิทธิภาพสูงที่สร้างขึ้นด้วยภาษา Go โดยถูกออกแบบมาเพื่อรองรับปริมาณการเขียนข้อมูลจำนวนมาก (High Write Throughput) และการค้นคืนข้อมูลที่มีประสิทธิภาพ โดยมีหัวใจหลักคือสถาปัตยกรรมแบบ Log-Structured Merge-tree (LSM-tree)\n\n## ภาพรวมสถาปัตยกรรม (Architecture Overview)\n\nวงจรชีวิตของข้อมูลใน NexusBase เริ่มต้นจากการรับคำขอ, ผ่านเส้นทางการเขียน (Write Path) ที่รวดเร็ว, จัดเก็บลงดิสก์อย่างมีแบบแผน, และถูกค้นคืนผ่านเส้นทางการอ่าน (Read Path) ที่มีประสิทธิภาพ\n\n```\n[Client] -\u003e gRPC Server -\u003e [Write Path] -\u003e [Read Path] -\u003e [Client]\n                               |                ^\n                               |                |\n                               V                |\n                        +--------------+        |\n                        |     WAL      |        |\n                        +--------------+        |\n                               |                |\n                               V                |\n                        +--------------+   +-------------------+\n                        |   Memtable   |--\u003e| Immutable         |\n                        | (In-Memory)  |   | Memtables (Queue) |\n                        +--------------+   +-------------------+\n                               |                |\n                               | (Flush)        |\n                               V                |\n                        +--------------+        |\n                        | SSTable (L0) |        |\n                        +--------------+        |\n                               |                |\n                               V (Compaction)   |\n      +----------------------------------------------------------+\n      | SSTables (L1, L2, ...) on Disk (Managed by LevelsManager)|\n      +----------------------------------------------------------+\n```\n\n## คุณสมบัติหลัก (Features)\n\n*   **High-Performance Ingestion:** เส้นทางการเขียนข้อมูลที่ถูกปรับให้มีประสิทธิภาพสูงสุดโดยใช้ Write-Ahead Log (WAL) และ Memtable ในหน่วยความจำ\n*   **LSM-Tree Architecture:** จัดการข้อมูลบนดิสก์อย่างมีประสิทธิภาพด้วย SSTables และกระบวนการ Compaction แบบแบ่งระดับ (Level-based)\n*   **Advanced Querying:** รองรับการค้นหาข้อมูลตามช่วงเวลา, การทำ Downsampling, และฟังก์ชันการรวมข้อมูล (Aggregation)\n*   **Efficient Tag Indexing:** ค้นหา Series ได้อย่างรวดเร็วโดยใช้ Roaring Bitmaps สำหรับการทำดัชนีแบบกลับด้าน (Inverted Index)\n*   **Durability and Recovery:** มีกลไก WAL สำหรับการกู้คืนข้อมูล และฟีเจอร์ Snapshot \u0026 Restore สำหรับการสำรองข้อมูล\n*   **Real-time Subscriptions:** สามารถติดตามการเปลี่ยนแปลงของข้อมูลแบบ Real-time ผ่าน gRPC streams\n\n## การเริ่มต้นใช้งาน (Getting Started)\n\n### ข้อกำหนดเบื้องต้น\n*   Go Toolchain (เวอร์ชัน 1.23 หรือสูงกว่า)\n*   ระบบปฏิบัติการที่รองรับ POSIX (เช่น Linux, macOS)\n\n### การติดตั้ง\n1.  **โคลน Repository:**\n    ```bash\n    git clone https://github.com/INLOpen/nexusbase.git\n    cd nexusbase\n    ```\n2.  **คอมไพล์โปรแกรม:**\n    ```bash\n    # คอมไพล์เซิร์ฟเวอร์หลัก\n    go build -o tsdb-server ./cmd/server\n    # คอมไพล์เครื่องมือสำหรับกู้คืนข้อมูล\n    go build -o restore-util ./cmd/restore-util\n    ```\n\n### การรันเซิร์ฟเวอร์\n1.  กำหนดค่าเซิร์ฟเวอร์โดยแก้ไขไฟล์ `cmd/server/config.yaml`\n2.  เริ่มการทำงานของเซิร์ฟเวอร์:\n    ```bash\n    ./tsdb-server -config /path/to/your/config.yaml\n    ```\n### เลือก Engine (Engine Mode)\n\nNexusBase มีสองการใช้งานของ engine ในโค้ด: the legacy `StorageEngine` (เรียกว่า \"engine\") และ lightweight `Engine2` (เรียกว่า \"engine2\").\nค่าคอนฟิกใหม่ `engine.mode` ควบคุมว่าส่วนใดของ engine จะถูกสตาร์ทเมื่อรันเซิร์ฟเวอร์:\n\n- `engine` : รัน `StorageEngine` แบบดั้งเดิม (LSM-based).\n- `engine2` (recommended default): รัน `Engine2` แบบ lightweight ซึ่งในเวอร์ชันนี้ถูกตั้งให้เป็นค่าเริ่มต้นของระบบ — ใช้เมื่อคุณต้องการให้ Engine2 ทำหน้าที่เป็น storage engine หลัก\n- `both`: รัน `StorageEngine` แบบดั้งเดิมเป็น engine หลัก และยังสตาร์ท `Engine2` (เชื่อมต่อกับ `HookManager` ของ engine หลัก) เพื่อความเข้ากันได้หรือการย้ายข้อมูลแบบคู่ขนาน\n\nตัวอย่างการตั้งค่าใน `configs/config-test-leader.yaml`:\n\n```yaml\nengine:\n    mode: both\n    data_dir: \"./data-leader\"\n    # ... (อื่นๆ)\n```\n\nและตัวอย่าง follower ที่ใช้ `engine2`:\n\n```yaml\nengine:\n    mode: engine2\n    data_dir: \"./data-follower\"\n    # ... (อื่นๆ)\n```\n\nแนะนำ: ถ้าคุณต้องการทดสอบฟังก์ชันใหม่หรือรันในสภาพแวดล้อมเบาๆ ให้ใช้ `engine2`. ถ้าต้องการใช้งาน LSM เต็มรูปแบบใน production ให้ใช้ `engine`.\n\n## Documentation\nWIP\n\n## การมีส่วนร่วม (Contributing)\n\nเรายินดีต้อนรับทุกการมีส่วนร่วม! โปรดอ่าน [แนวทางการมีส่วนร่วม (CONTRIBUTING.md)](CONTRIBUTING.md) สำหรับรายละเอียดเกี่ยวกับขั้นตอนการส่งโค้ด, การรายงานข้อผิดพลาด, และการเสนอคุณสมบัติใหม่\n\n## ข้อจำกัดความรับผิดชอบ (Disclaimer)\n\nแม้ว่าจะมีการนำฟีเจอร์หลักๆ ของ TSDB มาใช้งาน แต่ยังขาดการทดสอบที่ครอบคลุม, การเสริมความแข็งแกร่ง (Hardening), และเครื่องมือที่จำเป็นสำหรับสภาพแวดล้อมระดับ Production โปรดใช้งานด้วยความระมัดระวัง","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finlopen%2Fnexusbase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finlopen%2Fnexusbase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finlopen%2Fnexusbase/lists"}