26 ms·
I am just about to begin work at a new company that's looking to leverage node.js to develop a fairly robust REST API that should be able to support a lot on co
by Osiris 13y ago
I am just about to begin work at a new company that's looking to leverage node.js to develop a fairly robust REST API that should be able to support a lot on concurrent clients. I've been looking for an opportunity to learn Go.
Would it be worth investigating building it in Go rather than node?
- danieldk 13y agoWhy not just Java with an JAX-RS-based REST framework, such as Jersey or RESTEasy? Maybe it's boring, but it is proven technology, the JVM scales very well. You can develop on OS X and deploy on Linux without recompiles. Added to that, Java has an enormous ecosystem, including good IDEs (such as IntelliJ) and libraries.
- NateDad 13y agoGo is pretty much proven at this point. The JVM scales well for CPU cycles and considerably less well for memory usage. Recompiling is a non-issue when it only takes 2 seconds to compile a relatively large application (larger than any REST API is likely to be). The Go ecosystem is quite robust, you have multiple choices for pretty much any functionality you need (and where you don't it's because the only one that exists is just that good). There are a lot of good editor plugins for Go. You don't generally need an IDE per se. Auto-complete and go to definition is really all you need, and you can get that in any major editor you like.
- actf 13y agoI don't mean to be pedantic, but I disagree that the Go ecosystem has a good choice for pretty much any functionality. I think one major omission from the current Go ecosystem is a decent GUI library. There have been some attempts however, to my knowledge, they are mostly alpha/beta quality at best, and most of them are missing important functionality (the major ones I'm aware of are go-gtk, go-ui, go-fltk, wxGo, and none of them could be considered production ready IMHO). I only point this out because I really like Go, and I think Go would actually be a very interesting language to do client side desktop application development in.
- NateDad 13y agoTake a look at go QML. I think it'll be the one GUI library to really take off, if for no other reason than the guy working on it (Gustavo), is pretty brilliant, and it's going to be used to write applications for Ubuntu Touch.
- actf 13y agoQML is awesome, and I'm a huge fan of it - and for that matter declarative GUIs in general. However the QML-go project, while promising, is definitely not production ready. Their github page contains a large bold header that says: "this is alpha software", and it specifically warns about stability issues. Also QML in general, has some shortcomings right now (granted those problems are being fixed) when using it for desktop software (specifically the lack of desktop style widgets). So while I think the project is awesome and I'm wishing it success, I wouldn't want to use it for production quality software. I think my original point still stands.
- NateDad 13y agoThat's a valid criticism. Mostly wanted to point your attention to the project, because I think it'll be a big deal in the next year.
- Artemis2 13y agoGo is still a very young language and will probably subject to a lot of changes, especially for optimization. No big industry builds apps using Go, in the same way that no big industry build app using Laravel. They prefer for instance CodeIgniter, which has been combat-tested and is more mature.
- NateDad 13y agoGo has been very stable for quite some time now. There is a backwards compatibility guarantee while it stays in 1.x. Your old code will still build with new versions of Go. As for optimization, yes, it will get faster and better... I don't see why that's a drawback? I don't really know what you mean by "big industry". Canonical's Juju is written in Go. Docker is written in Go. Iron.io is written in Go. Cloudflare and Youtube use Go. Lots of companies use Go. CodeIgniter and Laravel are web frameworks (which happen to be written in PHP). That's not even a valid comparison to Go, which is a programming language.
- twic 13y agoAnd if Java isn't trendy^W exciting enough for you, Scala offers many of the same benefits, in particular the use of the JVM and access to the Java ecosystem, but with many more options for functional programming, "expressive" constructs like DSLs, actor-based architecture, etc.
- scaryclam 13y agoIn a word, yes. Node is nice but it doesn't appear to have as much going for it as Go so I would personally invest time in something like Go.
- NateDad 13y agoGo is the future of server side programming. I don't consider that to be an exaggeration. Node is not the future. Node is an interesting technical achievement, but programming in javascript on the server is not going to create the most robust environment. I think you should definitely ask about Go, but given that you're new, unless you're going into a technical lead position, be aware that they may have already made up their minds, and might not be open to different ideas. People tend to get stuck on a single idea once it gets into their heads.
- twic 13y agoA language with static typing but without generics is not the future of anything.
- NateDad 13y agoGenerics generics. I've written Go code for 40+ hours a week for 10 months and only missed generics a couple times for some minor functionality. That, and they are not anathema to Go. The Go devs want to implement generics, they just have more important things to do right this second.