News for hackers. Stuff that matters.
Re:Go package: fanout – make writing parallel code even easier by StavrosK on Saturday January 10, 2015 @03:03AM (#8866279)
I'm not sure what the usefulness of this is (apart from saving you from writing one or two functions yourself), isn't it just a parallel queue?
Re:Go package: fanout – make writing parallel code even easier by sunfmin on Saturday January 10, 2015 @03:20AM (#8866302)
I guess it is a parallel queue, It saves the trouble to worry about goroutines and channels and synchronizations, encapsulated the logic that talked in http://blog.golang.org/pipelines last part. To make use of that pattern easier.

I have quite a few use cases myself:

1. Say there is a article on the web, that contains dozens of images embed in the html. Which I want to crawl the article, and Also the images, and put the image into S3 for faster serve. I can use the fanout concurrency pattern to put upload all the images simultaneously to S3 to make it faster.

2. Say I have 20 mysql node sharded data, I want to fetch top 50 latest created data from all of them, and sort it to and show it to user after.

Re:Go package: fanout – make writing parallel code even easier by StavrosK on Saturday January 10, 2015 @03:39AM (#8866323)
Oh, yes, there are lots of use cases for parallel queues, for sure.
Re:Go package: fanout – make writing parallel code even easier by latch on Saturday January 10, 2015 @03:26AM (#8866308)
it's a small abstraction, but I could see it being useful. My gripe, and I don't know how to say this without people saying I'm whining about generics, is the interface{} return. Such a pain.
Re:Go package: fanout – make writing parallel code even easier by aikah on Saturday January 10, 2015 @06:34AM (#8866600)
Go has generics,you just can't define new ones,which is the heart of the problem.

It's not about whinning.There is a need for that yet no real will to implement user defined one.