Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Do you see any use for Go in Web Development?


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".


Do you see it as a competitor technology to things like Node.js / Meteor?


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.


FastCGI gives you this feature in any compatible language.


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: