Skip to content

Repository files navigation

gocraft/work v2

GoDocGo Report CardFOSSA StatusCircleCI

Please see cmd/ for enqueuer and worker demo.

Improvements

  • queue backend abstraction
    • redis is still the default, but the new design allows custom queue implementation.
  • simplify the keyspace design of redis queue backend
    • The new design uses 1 redis hash per job, and 1 redis sorted set for queue.
    • Interesting read
  • modular
    • The core only catches panics, retries on failure, and waits if a queue is empty.
    • All other functionalities are either removed or moved to separate middlewares.
  • support binary payload/args with message pack.
  • replace built-in UI with prometheus metrics (use grafana if you want dashboard).
  • additional optimizations (alloc + bulk queue ops)
    BenchmarkWorkerRunJob/work_v1_1-83000515957ns/opBenchmarkWorkerRunJob/work_v2_1-85000284516ns/opBenchmarkWorkerRunJob/work_v1_10-810002136546ns/opBenchmarkWorkerRunJob/work_v2_10-85000367997ns/opBenchmarkWorkerRunJob/work_v1_100-810018234023ns/opBenchmarkWorkerRunJob/work_v2_100-810001759186ns/opBenchmarkWorkerRunJob/work_v1_1000-810162110100ns/opBenchmarkWorkerRunJob/work_v2_1000-810012646080ns/opBenchmarkWorkerRunJob/work_v1_10000-811691287122ns/opBenchmarkWorkerRunJob/work_v2_10000-810144923087ns/opBenchmarkWorkerRunJob/work_v1_100000-8117515722574ns/opBenchmarkWorkerRunJob/work_v2_100000-811502468637ns/opPASSokgithub.com/taylorchu/work87.901s
  • http server

License

FOSSA Status

About

gocraft/work v2 prototype

Resources

Stars

151 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages