News for hackers. Stuff that matters.
Re:Why Go Gets Exceptions Right by antonpug on Friday September 14, 2012 @01:42PM (#4522932)
Do you see any use for Go in Web Development?
Re:Why Go Gets Exceptions Right by genwin on Friday September 14, 2012 @02:06PM (#4523087)
I'm coding a web app in it right now. Go includes a package for its own web server. That's a huge benefit, because it means the app can be state-ful instead of the usual (for Python, PHP etc.) stateless. The former means you can have all the data you want ready to go, in the most efficient memory structure, when the user arrives. Which translates to great performance. For example check out http://langalot.com and somewhat slowly type in "bark".
Re:Why Go Gets Exceptions Right by antonpug on Friday September 14, 2012 @02:13PM (#4523122)
Do you see it as a competitor technology to things like Node.js / Meteor?
Re:Why Go Gets Exceptions Right by genwin on Friday September 14, 2012 @02:28PM (#4523192)
Yes. Node.js supports only a single processor core. I don't know much about Meteor but it doesn't look like it offers concurrency features.

The concurrency in Go (and to a lesser extent in Node.js--probably) is amazingly performant. For example, when I poll & parse 100 RSS feeds and the slowest one takes 6 seconds to return from the remote site, the whole routine returns in < 7 seconds. A synchronous single-core app would take up to 6 seconds * 100 = 10 minutes for the same process. In Go, when I call out to the remote sites, each call returns immediately, so that all 100 remote calls finish immediately. Go puts my routine into a dormant state while waiting for the remote sites to return data. So during that 7 seconds my app may have ~5 seconds of dormancy to do other processing (in a completely independent code path), again using all the machine's cores.

Re:Why Go Gets Exceptions Right by Evbn on Friday September 14, 2012 @09:33PM (#4524885)
FastCGI gives you this feature in any compatible language.
Re:Why Go Gets Exceptions Right by genwin on Saturday September 15, 2012 @03:06AM (#4525560)
That's good to know, thanks. I may want to use Nginx with Go someday, in a stateful way. The built-in web server may not be ready for prime time, I've read.