Live data from Hacker News

Go as an alternative to Node.js for Very Fast Servers

techblog.safaribooksonline.com

51–60 of 147 posts

Re: Go as an alternative to Node.js for Very Fast Servers

#51
post #6

The fact that Node.js is being used in this equation says a lot about how much impact and penetration it has achieved in a rather short while. Personally I hope that Go does just as well, if not a lot better. I am a bit of a fan of both.

Not really no. It only says a lot about how much advertising has been done recently about the webscaling capabilities of Node (like it's anything special). I think people are starting to realize that as good as it is, it simply isn't the only way to achieve results like these (see Vert.x, Tornado and tons of other projects with comparable capabilities).

Re: Go as an alternative to Node.js for Very Fast Servers

#52

I was curious, so I actually ran both of the servers from the article on my little MacBook Air. The results are below. First, go: $ ab -c 100 -n 10000 http://localhost:8000/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 1000 requests Completed 200…

check the memory usage. When I did the comparison, the node server's memory climbed steadily up to about 50MB, while the Go server's memory stabilized at about 17MB.

Re: Go as an alternative to Node.js for Very Fast Servers

#53

Node: Everyone knows JavaScript, there's a massive community, there are tons of libraries, and you get very good performance Go: No one knows this language, there's a small-but-growing community, there are enough libraries to get a lot done, and you get even better performance Java: They are paying me (money!) to write in this language

More like: Anything web HAS to be Javascript (cause the calendar says 2013 but apparently it's 1970), no choice so oh well, we'll try Javascript on the server cause God knows using the same language everywhere is a good thing :/

Go: The language is in its infancy, growing at a slow pace for now, bears some promises that are yet to be confirmed.

Java: For some reason people still hate the language even though it's the closest to being the most versatile language around (in every single aspect that makes a good language it ranks well against the others)

Re: Go as an alternative to Node.js for Very Fast Servers

#54
post #49

Earlier quoted context omitted.

You are contradicting yourself about parametric polymorphism. First you acknowledge it doesn't exist, then you claim a limited workaround solves it. >It's definitely not harder to prototype in - and I say this as a functional programmer Have you used haskell to make the comparison? >if you're writing Go idiomatically, you really shouldn't be thinking very much about the types as you write them. I don't understand whe…

I have been wanting to learn Haskell for some time. Is Real World Haskell still the best book for the language? Could you point me to some well written libraries/projects that are considered idiomatic haskell? Would appreciate the pointers.

I would definitely start with learn you a haskell. It makes a much better introduction to the language than RWH. RWH is great when you have learned the basics and want to start tackling bigger problems.

Xmonad is a pretty common recommendation for looking at "good haskell code", in particular the overall design and how they keep the IO part minimized and isolated so the bulk of the application is easier to unit test. I think the standard libraries the come with GHC are good examples too.

Re: Go as an alternative to Node.js for Very Fast Servers

#55

Node: Everyone knows JavaScript, there's a massive community, there are tons of libraries, and you get very good performance Go: No one knows this language, there's a small-but-growing community, there are enough libraries to get a lot done, and you get even better performance Java: They are paying me (money!) to write in this language

The Go community on Reddit is already bigger than the Node community: http://www.reddit.com/r/golang (3730) http://www.reddit.com/r/node (3581)

I think he was referring to the whole JavaScript community.

For comparison: http://www.reddit.com/r/javascript (27,041)

Re: Go as an alternative to Node.js for Very Fast Servers

#56
post #12

I have never understood the focus on speed as a selling point for Node. It may well be very fast, but it seems to me that the primary selling points would be the ability to share code between client and server and that you can start coding server side without learning a new language if all you know is JavaScript.

I never thought of it as "faster-than-thou" but rather "faster than you expect" and "fast enough for real work."

Re: Go as an alternative to Node.js for Very Fast Servers

#57

I was curious, so I actually ran both of the servers from the article on my little MacBook Air. The results are below. First, go: $ ab -c 100 -n 10000 http://localhost:8000/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 1000 requests Completed 200…

r u using x86 go? or x64 go?

Re: Go as an alternative to Node.js for Very Fast Servers

#58

Node: Everyone knows JavaScript, there's a massive community, there are tons of libraries, and you get very good performance Go: No one knows this language, there's a small-but-growing community, there are enough libraries to get a lot done, and you get even better performance Java: They are paying me (money!) to write in this language

More like: Anything web HAS to be Javascript (cause the calendar says 2013 but apparently it's 1970), no choice so oh well, we'll try Javascript on the server cause God knows using the same language everywhere is a good thing :/ Go: The language is in its infancy, growing at a slow pace for now, bears some promises that are yet to be confirmed. Java: For some reason people still hate the language even though it's the…

> For some reason people still hate the language even though it's the closest to being the most versatile language around (in every single aspect that makes a good language it ranks well against the others)

In every respect that a PHB may care about, perhaps. I think you should examine that "for some reason" more carefully before declaring that all reasons favor Java. Clearly there is something going on there, unless you think everyone who dislikes Java just suffered head trauma or something.

Re: Go as an alternative to Node.js for Very Fast Servers

#59

I was curious, so I actually ran both of the servers from the article on my little MacBook Air. The results are below. First, go: $ ab -c 100 -n 10000 http://localhost:8000/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 1000 requests Completed 200…

I'd be interested to see your numbers benchmarking with `siege' rather than `ab'.

wrk or weighttp are my preferred tools.

Re: Go as an alternative to Node.js for Very Fast Servers

#60
post #57

I was curious, so I actually ran both of the servers from the article on my little MacBook Air. The results are below. First, go: $ ab -c 100 -n 10000 http://localhost:8000/ This is ApacheBench, Version 2.3 Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/ Licensed to The Apache Software Foundation, http://www.apache.org/ Benchmarking localhost (be patient) Completed 1000 requests Completed 200…

r u using x86 go? or x64 go?

Unless he went out of his way to use x86, I can't imagine he's not using x86-64. x86-64 has traditionally been the arch that Go has gotten the most attention on anyway, it is what everyone uses these days.
Post reply on HN