Skip to content

High-performance concurrency library for Go that provides robust abstractions for parallel task execution, worker pools, and resilience patterns.

License

Notifications You must be signed in to change notification settings

AlestackOverglow/parallelx

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ParallelX

High-performance concurrency library for Go that provides robust abstractions for parallel task execution, worker pools, and resilience patterns.

Features

  • Worker Pool with priority queues and dynamic scaling
  • Concurrency Patterns:
    • Pipeline
    • Fan-Out/Fan-In
    • Pub/Sub
    • Barrier
    • Semaphore
  • Resilience Mechanisms:
    • Type-safe Circuit Breaker
    • Graceful Degradation
    • Retry with backoff
  • Metrics and Monitoring
  • Generic Type Support
  • Context-Aware Operations

Installation

go get github.com/AlestackOverglow/parallelx

Documentation

For detailed documentation and examples, see docs/README.md

Quick Start

// Create a worker pool
pool := pool.New(runtime.NumCPU())
defer pool.Shutdown()

// Submit tasks with priorities
pool.SubmitWithPriority(func() {
    // Critical task
}, PriorityCritical)

// Use circuit breaker
cb := resilience.NewCircuitBreaker[Response](config)
result, err := cb.Execute(ctx, func() (Response, error) {
    return callService()
})

TODO

  • Add a task queue size limit to Worker Pool
  • Implement rate limiting
  • Add timeouts for operations
  • Write benchmarks
  • Improve handling of slow subscribers in PubSub
  • Add a crash recovery mechanism
  • Expand documentation with godoc-examples
  • Add performance metrics
  • Implement a deferred task mechanism
  • Add support for context-sensitive timeouts

License

MIT License - see LICENSE for details

About

High-performance concurrency library for Go that provides robust abstractions for parallel task execution, worker pools, and resilience patterns.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages