{"id":36474022,"url":"https://github.com/l00pss/walrus","last_synced_at":"2026-01-30T10:03:58.755Z","repository":{"id":330337447,"uuid":"1121659683","full_name":"l00pss/walrus","owner":"l00pss","description":"Walrus is a high-performance and reliable Write-Ahead Log (WAL) implementation written in Go. It's designed for data integrity and reliable recovery operations.","archived":false,"fork":false,"pushed_at":"2026-01-09T18:37:44.000Z","size":75,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-12T02:44:10.565Z","etag":null,"topics":["go","golang","wal","write-ahead-log"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/l00pss.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"buy_me_a_coffee":"l00pss"}},"created_at":"2025-12-23T10:44:50.000Z","updated_at":"2026-01-09T18:37:47.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/l00pss/walrus","commit_stats":null,"previous_names":["l00pss/walrus"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/l00pss/walrus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l00pss%2Fwalrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l00pss%2Fwalrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l00pss%2Fwalrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l00pss%2Fwalrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/l00pss","download_url":"https://codeload.github.com/l00pss/walrus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/l00pss%2Fwalrus/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28910967,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-30T08:15:08.179Z","status":"ssl_error","status_checked_at":"2026-01-30T08:14:31.507Z","response_time":66,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["go","golang","wal","write-ahead-log"],"created_at":"2026-01-12T00:45:07.762Z","updated_at":"2026-01-30T10:03:58.750Z","avatar_url":"https://github.com/l00pss.png","language":"Go","funding_links":["https://buymeacoffee.com/l00pss","https://www.buymeacoffee.com/l00pss"],"categories":[],"sub_categories":[],"readme":"# Walrus - Write-Ahead Log (WAL) Implementation\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"logo.png\" alt=\"Walrus Logo\" width=\"800\"/\u003e\n  \u003cbr\u003e\u003cbr\u003e\n  \u003ca href=\"https://golang.org/\"\u003e\u003cimg src=\"https://img.shields.io/badge/go-1.21+-00ADD8?style=flat\u0026logo=go\u0026logoColor=white\" alt=\"Go Version\"\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MIT-blue?style=flat\" alt=\"License\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://goreportcard.com/report/github.com/l00pss/walrus\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/l00pss/walrus\" alt=\"Go Report Card\"\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/l00pss/walrus/stargazers\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/l00pss/walrus?style=flat\u0026logo=github\" alt=\"GitHub Stars\"\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003cbr\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://www.buymeacoffee.com/l00pss\" target=\"_blank\"\u003e\u003cimg src=\"https://cdn.buymeacoffee.com/buttons/v2/default-yellow.png\" alt=\"Buy Me A Coffee\" style=\"height: 60px !important;width: 217px !important;\" \u003e\u003c/a\u003e\n\u003c/div\u003e\n\nWalrus is a high-performance Write-Ahead Log (WAL) implementation in Go with ACID transactions, zero-copy reads, and segment-based architecture.\n\n## Features\n\n- **ACID Transactions** - Atomic commits with timeout and rollback\n- **Zero-Copy Reads** - Memory-mapped files for high performance\n- **Segment-Based** - Automatic rotation and cleanup\n- **Thread-Safe** - Safe for concurrent access\n- **Batch Operations** - High throughput batch writing\n- **Context Support** - Timeout and cancellation support\n- **Custom Logging** - Pluggable logger interface\n\n## Installation\n\n```bash\ngo get github.com/l00pss/walrus\n```\n\n## Quick Start\n\n```go\nconfig := walrus.DefaultConfig()\nwal := walrus.NewWAL(\"./wal_data\", config).Unwrap()\ndefer wal.Close()\n\nentry := walrus.Entry{\n    Data:      []byte(\"Hello World!\"),\n    Term:      1,\n    Timestamp: time.Now(),\n}\n\nindex := wal.Append(entry).Unwrap()\nreadEntry := wal.Get(index).Unwrap()\n```\n\n## Transactions\n\n```go\ntxID := wal.BeginTransaction(30 * time.Second).Unwrap()\n\nwal.AddToTransaction(txID, entry1)\nwal.AddToTransaction(txID, entry2)\n\nindices := wal.CommitTransaction(txID).Unwrap()\n// Or rollback: wal.RollbackTransaction(txID)\n```\n\n## Batch Operations\n\n```go\nentries := []walrus.Entry{\n    {Data: []byte(\"Entry 1\"), Term: 1, Timestamp: time.Now()},\n    {Data: []byte(\"Entry 2\"), Term: 1, Timestamp: time.Now()},\n}\n\nindices := wal.WriteBatch(entries).Unwrap()\n```\n\n## Context Support\n\n```go\nctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)\ndefer cancel()\n\nindex := wal.AppendWithContext(ctx, entry).Unwrap()\n```\n\n## Configuration\n\n```go\nconfig := walrus.Config{\n    SegmentSize:     64 * 1024 * 1024,  // 64MB per segment\n    MaxSegments:     100,\n    SyncAfterWrite:  true,\n    BufferSize:      4096,\n    ZeroCopy:        true,\n    Format:          walrus.BINARY,\n}\n```\n\n## Benchmarks\n\nTested on Apple M1 Pro:\n\n| Operation | Throughput | Latency | Allocations |\n|-----------|------------|---------|-------------|\n| Append | 290,697 ops/sec | 3.44 µs/op | 14 allocs/op |\n| Get | 741,289 ops/sec | 1.35 µs/op | 9 allocs/op |\n| Get (Zero-Copy) | 813,008 ops/sec | 1.23 µs/op | 0 allocs/op |\n| Get (Regular) | 709,220 ops/sec | 1.41 µs/op | 7 allocs/op |\n\nZero-copy mode provides **~15% faster reads** with **zero memory allocations**.\n\n```bash\ngo test -bench=. -benchmem\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl00pss%2Fwalrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fl00pss%2Fwalrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fl00pss%2Fwalrus/lists"}