4 ms·
In many stream pipelines you don't care about the order of the data. You just have a bunch of unordered input data that you need to transform as fast as possibl
by rgarcia 13y ago
In many stream pipelines you don't care about the order of the data. You just have a bunch of unordered input data that you need to transform as fast as possible.
Go's channels [1] let you essentially construct loosely-typed streams. The channel's type lets you be as opinionated as you want about what should/shouldn't be passed within the "stream" (interface{}, []byte, string, MyAwesomeType, etc.). If you use buffered channels you have "backpressure". You can use > 1 core by using goroutines.
[1] http://golangtutorials.blogspot.com/2011/06/channels-in-go.html http://golangtutorials.blogspot.com/2011/06/channels-in-go.h...