Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ancientlore/fanout
A demo showing how to process incoming requests in parallel.
https://github.com/ancientlore/fanout
concurrency demo golang
Last synced: 17 days ago
JSON representation
A demo showing how to process incoming requests in parallel.
- Host: GitHub
- URL: https://github.com/ancientlore/fanout
- Owner: ancientlore
- License: mit
- Created: 2019-02-15T18:10:26.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-04T18:06:31.000Z (almost 2 years ago)
- Last Synced: 2024-11-13T17:48:34.235Z (3 months ago)
- Topics: concurrency, demo, golang
- Language: Go
- Size: 180 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fanout
A demo showing how to process incoming requests in parallel.
Useful to learn about:
* Concurrent execution (goroutines)
* Synchronization and messaging (channels)
* Multi-way concurrent control (`select`)
* Completing or canceling gracefully (`context.Context`)## Build and Run
$ go get github.com/ancientlore/fanout
$ fanout## Presentation
To run the presentation, use the [present](https://godoc.org/golang.org/x/tools/present) tool.
Install present:
$ go get golang.org/x/tools/cmd/present
Run the presentation:
$ present -notes -play
Navigate to http://127.0.0.1:3999/fanout.slide to see the presentation. Use the notes view by pressing `N` to see presenter notes.
## Good reading
* https://blog.golang.org/pipelines
* https://blog.golang.org/context
* https://golang.org/pkg/context/
* https://blog.golang.org/concurrency-is-not-parallelism
* https://talks.golang.org/2012/concurrency.slide
* https://swtch.com/~rsc/thread/