Go Concurrency

Open-source Go projects categorized as Concurrency

Top 23 Go Concurrency Projects

Concurrency
  • conc

    Better structured concurrency for go

    Project mention: Go Concurrency vs. RxJS | news.ycombinator.com | 2024-10-03

    JS concurrency is crap. It should be shot and buried in a lead coffin.

    Debugging async code is pure hell. With Go, you have a normal debugger that can be used to step over the code. You can get normal stack traces for all threads if needed. There is a race detector that can catch most of unsynchronized object access.

    With JS? You're on your fucking own. You can't find out the overall state of the system ("the list of all threads"), without getting deep into the guts of React or whatever framework you're using. Debugger is useless, as each `await` call drops you into the event loop. So pretty much every complicated non-trivial JS app ends up with _tons_ of race conditions, by depending on the order of async functions finishing.

    Speaking of race conditions. Coming from classic multithreading and Go, I tried to use `Promise.race` to simulate the `select` statement. Turns out that in JS it is actually useless because it LEAKS MEMORY BY DESIGN: https://github.com/nodejs/node/issues/17469

    Back to the article. It uses pre-generics Go. In more modern Go, you can use something like Conc to reduce the boilerplate: https://github.com/sourcegraph/conc?tab=readme-ov-file

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  • RxGo

    Reactive Extensions for the Go language.

  • concurrent-map

    a thread-safe concurrent map for go

  • golang-set

    A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp.

  • hatchet

    A distributed, fault-tolerant task queue

    Project mention: Glasskube v0.10.0 out now! | dev.to | 2024-06-24

    Hatchet is a distributed, fault-tolerant task queue which replaces traditional message brokers and pub/sub systems, built to solve problems like concurrency, fairness, and durability.

  • bild

    Image processing algorithms in pure Go

  • go-concurrency-patterns

    Concurrency patterns in Go

  • go-concurrency-guide

    Practical concurrency guide in Go, communication by channels, patterns

  • go-web-framework-benchmark

    :zap: Go web framework benchmark

  • pond

    🔘 Minimalistic and High-performance goroutine worker pool written in Go

  • workerpool

    Concurrency limiting goroutine pool (by gammazero)

    Project mention: What 3rd-party libraries do you use often/all the time? | /r/golang | 2023-12-01

    For worker pools of goroutines, this has always been "good enough" for me: https://github.com/gammazero/workerpool

  • go-wrk

    go-wrk - a HTTP benchmarking tool based in spirit on the excellent wrk tool (https://github.com/wg/wrk)

  • slacker

    Slack Bot Framework

  • ZenQ

    A thread-safe queue faster and more resource efficient than golang's native channels

  • kanzi-go

    Fast lossless data compression in Go

    Project mention: Kanzi is a modern, modular, expandable and efficient lossless data compressor | news.ycombinator.com | 2023-11-06
  • gowp

    golang worker pool , Concurrency limiting goroutine pool

  • goconcurrentqueue

    Go concurrent-safe, goroutine-safe, thread-safe queue

  • machine

    Machine is a zero dependency library for highly concurrent Go applications. It is inspired by errgroup.Group with extra bells & whistles (by autom8ter)

  • flowmatic

    Structured concurrency made easy

  • semgroup

    Like errgroup/waitgroup, but only runs a maximum of tasks at any time.

  • util

    A collection of useful utility functions (by shomali11)

  • sturdyc

    A caching library with advanced concurrency features designed to make I/O heavy applications robust and highly performant

    Project mention: Go caching library with advanced concurrency features | news.ycombinator.com | 2024-06-09
  • theine-go

    high performance in-memory cache

    Project mention: Otter, Fastest Go in-memory cache based on S3-FIFO algorithm | news.ycombinator.com | 2023-12-23

    In fact, lock-free queues have several problems at once, which prompted me to give up on them almost immediately.

    1. Yes, S3-FIFO can be implemented using lock-free queues, but the problem is that each write to a filled cache using this design will cause a large number of additional atomic operations not friendly to the processor's cache, while bp-wrapper on the contrary amortizes this load. And reading with frequency update on hot entries can have a bad effect on performance. In many ways this is exactly what the last posts in my discussion with Ben are about (not really about this, but the current problem with otter read speed is caused by a similar problem). https://github.com/Yiling-J/theine-go/issues/29#issuecomment...

    2. But the main problem for me is not even that. Lock-free queues work fine as long as you only need to support Get and Set operations, but as soon as you want to add features to your cache, the complexity of the implementation starts to increase, and some features are very hard to add to such a structure. Also, improving the eviction policy is under a big question mark, because not only do you have to think about how to improve the eviction policy, but also how to avoid locks while doing so or how not to slow down the implementation with your improvements. BP-Wrapper has no such problems at all, allows you to use any eviction policy and focus on improving different parts of your cache independently of each other.

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Go Concurrency discussion

Log in or Post with

Go Concurrency related posts

Index

What are some of the best open-source Concurrency projects in Go? This list will help you:

Project Stars
1 conc 8,949
2 RxGo 4,934
3 concurrent-map 4,271
4 golang-set 4,146
5 hatchet 4,086
6 bild 3,984
7 go-concurrency-patterns 2,729
8 go-concurrency-guide 2,417
9 go-web-framework-benchmark 2,066
10 pond 1,474
11 workerpool 1,311
12 go-wrk 911
13 slacker 808
14 ZenQ 656
15 kanzi-go 555
16 gowp 492
17 goconcurrentqueue 382
18 machine 360
19 flowmatic 362
20 semgroup 292
21 util 287
22 sturdyc 278
23 theine-go 254

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com