Live data from Hacker News

Go as an alternative to Node.js for very fast servers

bbs.studygolang.com

11–20 of 168 posts

Re: Go as an alternative to Node.js for very fast servers

#11

Is it possible to write Go in a functional way? Are there first class functions? Anonymous functions? If so it seems it would be possible to write highly functional code given the flexibility of interface{}

Up to a point, but go's limited datatypes make it difficult to write the kind of code you're used to writing in haskell/f#/etc.

Re: Go as an alternative to Node.js for very fast servers

#12

I did the benchmarks outlined at the end of the article. Summary of results: 1. Node.js v0.10.15, single worker: 46.2 seconds 2. Node.js v0.10.15, cluster 8 workers using naught: 17.2 seconds 3. Go 1.0.2, GOMAXPROCS left default: 3.5 seconds 4. Go 1.0.2, GOMAXPROCS=8: 3.7 seconds Detailed results below: 1. Node.js v0.10.15, single worker Concurrency Level: 100 Time taken for tests: 46.217 seconds Complete requests: 1…

What tool are you using for your benchmarks?

Re: Go as an alternative to Node.js for very fast servers

#13

Is it possible to write Go in a functional way? Are there first class functions? Anonymous functions? If so it seems it would be possible to write highly functional code given the flexibility of interface{}

It is monomorphically typed, however, which limits the use of higher-order functions.

Re: Go as an alternative to Node.js for very fast servers

#14
post #5
post #3

So beyond the ironic comment mentioned before with the Golang Hello world tutorial using Chinese, what is the real reason behind the Chinese following behind Go? It seems like this site confirm there must be a pretty dedicated Golang following, but I cannot figure out for the life of me why. Does anyone actually know?

Not necessarily. I suppose the hello world tutorial shows hello world in Chinese mostly to show Unicode. And as for this link, this is just an external link ( http://blog.safariflow.com/2013/02/22/go-as-an-alternative-t... ) that someone posted on a forum. Things like these happen on every forum in every country.

Yeah, not sure what happened but this was the link below a few minutes ago.

http://bbs.studygolang.com/thread-278-1-1.html

Notice that, despite English content, the forum looks Chinese-language oriented. I think it is cool, but not normal to me.

Re: Go as an alternative to Node.js for very fast servers

#15

I did the benchmarks outlined at the end of the article. Summary of results: 1. Node.js v0.10.15, single worker: 46.2 seconds 2. Node.js v0.10.15, cluster 8 workers using naught: 17.2 seconds 3. Go 1.0.2, GOMAXPROCS left default: 3.5 seconds 4. Go 1.0.2, GOMAXPROCS=8: 3.7 seconds Detailed results below: 1. Node.js v0.10.15, single worker Concurrency Level: 100 Time taken for tests: 46.217 seconds Complete requests: 1…

What tool are you using for your benchmarks?

apache benchmark. I did exactly what the article suggested to benchmark.

http://httpd.apache.org/docs/2.2/programs/ab.html

Re: Go as an alternative to Node.js for very fast servers

#16
post #3

So beyond the ironic comment mentioned before with the Golang Hello world tutorial using Chinese, what is the real reason behind the Chinese following behind Go? It seems like this site confirm there must be a pretty dedicated Golang following, but I cannot figure out for the life of me why. Does anyone actually know?

There was some discussion here but no OK me seems to know more https://news.ycombinator.com/item?id=6161399

Re: Go as an alternative to Node.js for very fast servers

#17
post #3

So beyond the ironic comment mentioned before with the Golang Hello world tutorial using Chinese, what is the real reason behind the Chinese following behind Go? It seems like this site confirm there must be a pretty dedicated Golang following, but I cannot figure out for the life of me why. Does anyone actually know?

Do you mean specifically why there is a dedicated Chinese following in particular, or just in general?

Go is a clean, intuitive language with a very robust supporting ecosystem and a strong concurrency model. It builds fast, small code and makes quick work of big problems. Why shouldn't there be a big following of one of the better platforms to come out in a long time?

Re: Go as an alternative to Node.js for very fast servers

#18

I did the benchmarks outlined at the end of the article. Summary of results: 1. Node.js v0.10.15, single worker: 46.2 seconds 2. Node.js v0.10.15, cluster 8 workers using naught: 17.2 seconds 3. Go 1.0.2, GOMAXPROCS left default: 3.5 seconds 4. Go 1.0.2, GOMAXPROCS=8: 3.7 seconds Detailed results below: 1. Node.js v0.10.15, single worker Concurrency Level: 100 Time taken for tests: 46.217 seconds Complete requests: 1…

Try with GOMAXPROCS set to the number of real cores on your test machine (e.g. ignore hyperthread cores).

Re: Go as an alternative to Node.js for very fast servers

#20

I did the benchmarks outlined at the end of the article. Summary of results: 1. Node.js v0.10.15, single worker: 46.2 seconds 2. Node.js v0.10.15, cluster 8 workers using naught: 17.2 seconds 3. Go 1.0.2, GOMAXPROCS left default: 3.5 seconds 4. Go 1.0.2, GOMAXPROCS=8: 3.7 seconds Detailed results below: 1. Node.js v0.10.15, single worker Concurrency Level: 100 Time taken for tests: 46.217 seconds Complete requests: 1…

Try with GOMAXPROCS set to the number of real cores on your test machine (e.g. ignore hyperthread cores).

OK I did GOMAXPROCS=4. 3.6 seconds Node cluster count 4: 17.5 seconds
Post reply on HN