Skip to content

About

High-performance modular distributed systems primitives, resiliency patterns, concurrency engines, and storage architectures in Go

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Go Distributed Toolkit 🚀

A high-performance, modular Go library implementing production-grade distributed systems patterns, concurrency primitives, caching strategies, and resiliency components.

Go Report Card GoDoc License: MIT

📦 Architecture & Packages

1. Concurrency (pkg/concurrency)

  • workerpool: Type-safe generic worker pool with dynamic autoscaling, worker metrics, and graceful drain.
  • pipeline: Composable multi-stage stream processing pipelines with fan-in and fan-out support.
  • ratelimit: Lock-free token bucket and leaky bucket rate limiters.

2. Resilience (pkg/resilience)

  • circuitbreaker: Configurable 3-state (Closed, Open, HalfOpen) circuit breaker with rolling failure windows.
  • retry: Exponential backoff retry engine with full jitter, decorrelated jitter, and custom error classifiers.
  • bulkhead: Concurrency isolation bulkhead to prevent cascading service degradation.

3. Cache (pkg/cache)

  • lru: Thread-safe generic LRU cache with eviction hooks.
  • lfu: O(1) frequency-indexed LFU cache with least-frequent eviction.
  • multitier: Two-tier (L1 Memory + L2 Distributed) caching layer with singleflight dogpile prevention.

4. Events (pkg/events)

  • eventbus: In-memory async event broker with wildcards and buffered subscriber queues.
  • outbox: Transactional outbox engine ensuring at-least-once message delivery.

5. Data Structures (pkg/datastruct)

  • ringbuffer: High-throughput circular ring buffer.
  • trie: Fast Radix Trie for hierarchical routing and prefix matching.

6. Observability (pkg/observability)

  • metrics: Lock-free metrics registry tracking Counters, Gauges, and Histograms (P50, P90, P99).
  • tracer: Lightweight distributed trace context propagator adhering to W3C TraceContext standards.

🧪 Testing & Benchmarks

Run all unit tests and benchmarks:

go test -v -race ./...
go test -bench=. -benchmem ./...

📄 License

MIT License. Crafted with clean architecture and production rigor.

About

High-performance modular distributed systems primitives, resiliency patterns, concurrency engines, and storage architectures in Go

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages