Some links to related informations.
-
Communicating Sequential Processes (CSP) The CSPbook
- Author: C.A.R Hoare
- Publication Date: May 18, 2015 - first published in 1985
-
The Go Programming Language (Addison-Wesley Professional Computing Series)
- Author: Alan A.A. Donovan and Brian Kernighan
- Publication Date: November, 2015
- ISBN: 978-0134190440
- Reference: http://www.gopl.io/
blog.golang - Articles
- Pipelines
- Share Memory By Communicating
- Concurrency is not parallelism
- Go Concurrency Patterns: Timing out, moving on
- Go Concurrency Patterns: Context
YouTube - Videos
-
a laundry list of common mistakes, not a style guide.
-
Golang Internals Part 2: Nice benefits of named return values
-
[] TODO: Name - see also: people.md Blogs
-
Doing Well by Doing Bad: Writing Bad Code with Go Part 1 - A Satirical Take on Programming in Go
Doing evil by looking like you are doing good is the best kind of evil.
-
Doing Well by Doing Bad: Writing Bad Code with Go Part 2 - A Satirical Take on Programming in Go
-
" Channels are the pipes that connect concurrent goroutines. You can send values into channels from one goroutine and receive those values into another goroutine."
"Channels are typed by the values they convey."
-
Includes interesting stuff such as basic concurrency patterns.
-
Simple Data Processing Pipeline with Golang by Hugo Picado Sep. 26, 2016
-
"In this example we are building a simple processing pipeline that consumes a text line from a socket and sends it through a series of processes to extract independent words, filter the ones starting with # and printing the result to the console. For this, a set of structures and functions were created so we can try around and build other kind of pipelines at will."
- Has a
Collector.Execute
asFan-In (cap=1)
and aProcessor.Execute
, and aChannelDemux.Execute
for non-random FanOut. - Uses
type ProcessFunction func(name string, input Message, out chan Message)
- Code flavour is
ssss
- Has a
-
merge
- a Fan-In, not -Out! (with sync.WaitGroup for closer, and 'done' as context)Warning: These are just misnamed copies:
-
Channels Are Not Enough ... or Why Pipelining Is Not That Easy - by @kachayev
- Unicorn Cartoon :-)
- Fan-In sample from above, "(shamelessly stolen from here)"
- Delves into "channel is a functor" and "Futures & Promises", but does not distinguish supply and demand (but uses it)
-
Buffered Channels In Go — What Are They Good For? by Jon Bodner
Buffered channels are useful when you know how many goroutines you have launched, want to limit the number of goroutines you will launch, or want to limit the amount of work that is queued up.
- Parallel Processing
- Creating a Pool
-
Contrasts his 'JavaScripter’s mindset' with an 'abundance mindset'.
-
I feel compelled to point out that, due to the fact that Go uses a coöperative scheduler, any goroutine that is CPU bound could starve your whole program. If you know for sure that you are writing such a function and that it’s likely to take a while, it would be wise to add a
runtime.Gosched()
(formerly spelledtime.Sleep(0)
) in a few places. -
The X-files: Avoiding concurrency boilerplate with golang.org/x/sync - Or abstracting common synchronization patterns in go