I know benchmarks should be taken with a pinch of salt, but by round 5 I was totally into Scala (Scalatra), trying to write my own framework, so I could get better bang for buck from my EC2 instances, which to be honest, aren't cheap when compared to say, Digital Ocean.
Around round 6 of these benchmarks, I ditched Scala altogether (and also my framework).The reason I ditched Scala was not because of it's performance, etc. But it was because I was the only developer in my company who knew and learnt Scala after reading a couple of books (one was around 800 pages). Obviously, I needed a language that any other developer should have no problem taking over, and Scala developers are 1)expensive 2)not easy to find. Also, Slick (the database interacting code for Scala by Typesafe) wasn't mature yet.
For this reason, around Round 6, I started writing my own framework in GoLang and used it internally as an 'auxiliary framework'. I will explain more about this framework soon soon. In my company, we have about a handful of backend programmers and a couple of frontend devs. I found that GoLang was much much easier to teach my programmers, than say I could teach Scala. Please note - Scala is a brilliant functional programming language, but if you are thinking switching from Ruby/Python/etc would be easy, then you are wrong.
Now, we have a workflow that allows us to deliver as quickly as possible, but without missing out on performance - We write our entire V1 in Rails. We implement all the UI/frontend related code and then port it to our GoLang framework. We have an internal generator where we just feed our rails app, and the code for our framework is just 'ported'/generated on the fly based on our framework and we just deploy it. So far, our productivity is slightly lost while handling the type conversions, bugs, etc. But it's totally worth it. Go outperforms Rails by a huge margin. I noticed that using something like Puma helps a lot, but it still is no way comparable to our GoLang framework.
As for our framework, it's just pretty simple - Just organize all the files as you would in a Rails application (Models/Views/Controllers/Config) and everything just works without much performance hiccups. We use Gorilla components for stuff like routing and cookies. The rest of the stuff is slightly adapted from other frameworks (like Martini).
All in all, I love the ability to have JVM like performance with the productivity of Ruby with a language like GoLang. And this round 8 benchmark is nothing short of impressive. If you haven't tried GoLang yet, you should try writing your own framework, not only do you learn about all the trade-offs for the 'magic' that rails makes under the hood, you also learn about some new stuff and thus become a better programmer.
I think GoLang is pretty impressive if someone as average as me can even write a framework like Rails, except for better performance. Give it a try, people, you won't be disappointed.
> If you haven't tried GoLang yet, you should try writing your own framework.
Why ? Wouldn't time be better spent learning a language on the JVM that has a whole array of stable, well-tested, production ready frameworks i.e. all of them.
Switching from the JVM to Go is like taking 1 step forward and 100 steps back.
That's what I don't understand about HN. 4/5 fastest frameworks were java, and the takeaway is to pick go (granted it is the fastest though). Go is relatively new with few resources, java is old hat with plenty of books, docs, tutorials etc and a global talent base of developers.
I can understand learning and using go for some things, but companies are moving major infrastructure to it with staff that are still learning it.
I have a bias against Java. I realize I may be deluded, but my experience the vast majority of things written in Java are garbage. Here, 'garbage' is an intentionally vague term coming from my personal opinion of using a piece of software in a consumer and DevOps role. It may be that the Java language is conducive to writing bad code, that the JVM has problems, or that the 'global talent base' is so broad and Java is so 'easy' that talent is difficult to come by, or I might be plain wrong.
I realize that Java is incredibly useful for some things and that my reasons for labeling software garbage aren't always of primary concern; criticizing anyone for choosing Java is beyond me.
However, I would be very reluctant to ever choose Java for a project given the opportunity.
Is it a toy? Is it a startup? Is it worth doing really well? Who is going to use it? Is it a tool for the ages? How much do I care about it? How big of a project is it? Is building software my only goal? Do I have the resources to do it right?
... there are so many questions with so many different answers.
It's not actually the fastest. Check out the tabs at the top of the benchmark. You are only looking at basic JSON serialization on an i7. A more realistic benchmark is the 'fortune cookie' benchmarks which actually hit a database and does some modifications on the results - which most of your requests will do. Go performs at only 50% of the more optimized Java/C++ frameworks in this case.
The benefits are just too big to ignore and the barrier of entry is really, really low. The Go language is so refreshingly simple and the standard libraries are very well documented. You can hit the ground running in days.
The benefits are too big to ignore? Would you mind letting me in on the secret then? The only benefit I see in go is fast compilation. That is hardly big enough to justify using such a primitive language.
The thing about Go is if the language appeals to you then the fact that there aren't 10 layers of legacy framework cruft between you and the actual app logic is actually a good thing, not a bad one.
And Go does have some great "batteries included" stuff where it counts. With a few notable exceptions I find the 3rd party web frameworks for Go don't really add much over the standard library's net/http and html template system.
I used Scala, which was running on the JVM. The barrier to entry be it Java or Scala is quite high.
I completed the "Introduction to Programming in Go" in under 3 hours and in less than 6 hours I was able to code a full-fledged application. I cannot say/vouch the same for Java or Scala.
I would like to have an enterprise-level language inside my company without the complexities associated. I think goLang solves my problem and hence I use it.
I love the JVM, it's fast, sturdy, reliable. But throw in more JAVA developers at it, no matter how good, you end up with half-baked code, unused classes and unwanted complexity. I wish I could throw in more Scala developers, but it's not possible at the moment within my financial constraints.
Almost 100% of the developers we hire know C/C++ well, so it's much much easier to teach them GoLang, than say, Java. And that is a huge time and money well saved for me.
>If you haven't tried GoLang yet, you should try writing your own framework.
I only say this because I want people to understand how incredibly simple the GoLang is.
Interesting that you find C/C++ people to pick up Golang fast and easy. From my experience, it's the Python/Ruby crowd that tends to gravitate towards it. Most C++ programmers I know are stuck too much in the std::map<what<is<this<oh_god>>>> type of coding and refuse to touch Golang.
But of course, you have to first write about 300 lines of XML to wire up the various BeanInversionContainerFactoryDependencyInjectors.
Java is a needlessly verbose, death-by-pattern-programming monstrosity. Go is a fresh look on programming in general. The standard library is phenomenal, built-in concurrency is excellent, and it's an extremely productive environment to be in. It feels like driving a Mazda Miata vs a Ford F-250.
Did you ever look at Clojure? If not, why not? If so, what didn't you like?
While Clojure surely has a bigger learning curve than Go, it's much simpler and more approachable than Scala. I've learned it recently and am an absolute convert. It seems perfect for your use case and you could even skip writing the prototype in Rails because you'll be just as productive in Clojure.
Note that I'm not trying to convince you to change; you obviously found something that works for you. But I am curious if there were obstacles to using Clojure (missing libraries? poor tutorials?) and if so, how that could be fixed.
Thanks! I will give it a shot :) The main reason I chose Go was for the learning curve for my fellow devs. But if clojure is only slightly higher in complexity, I would definitely give it a shot..thanks :)
A Lisp family language is hardly more approachable than Scala. I found Java -> Scala pretty smooth, but can't make head or tail of Clojure code as it looks completely different to languages I've used before.
Interesting perspective, thanks. I suspect it depends on whether you're more used to langs like Ruby, Python, JavaScript (which are more like Clojure) or Java (which is more like Scala). Coming from Python and JavaScript, and with minimal Java experience, I find Clojure more approachable... but then, Java-style OO is utterly vexing to me.
Go also suffers heavily when resource constrained - eg, run on EC2 or digital ocean which most people here are going to be running on. The large amount of garbage generated by Go paired with stop the world GC is the reason there. If you're running directly on high processor machines without much disk access then Go is a good bet, otherwise you'd nearly always be better off with Java - especially when you consider how many well tested OSS libraries are available for everything.
If you look at the Go standard library, it doesn't generate too much garbage. It is avoidable often, don't use .String, use .WriteTo -- the GC cost is not across all used memory, just memory with live pointers.
This is what I've been exploring in the past couple of weeks. I love the frontside MVC framework position, and being able to build out a resource, hook it up as JSON, then just hop over to Go and recreate it with a clear goal in mind has been a lot of fun. I don't need the performance as bad as many- this is more me just trying to still figure out 'my' language(I'm not long in the industry). Go is starting to feel like it could be it, but it's hard to deny how quick Rails is for getting up and running in record times.
"We have an internal generator where we just feed our rails app, and the code for our framework is just 'ported'/generated on the fly based on our framework and we just deploy it." - Well that sounds useful! Any thoughts on open sourcing it?
You get into the habit of calling it golang because googling for "go" issues isn't very useful. Golang is the nickname that is (or at least was last time I did something in go) what the community tends to use for SO and blog posts. Its sort of become the language's unofficial name.
Its really frustrating that a search engine company would use such an unsearchable name for a new product.
I'm sorry, it's become a habit, because if I used Go here instead of GoLang, someone else googling for articles/forum posts may not come across this thread. It is in good essence that I always make sure to use GoLang instead of Go.
Around round 6 of these benchmarks, I ditched Scala altogether (and also my framework).The reason I ditched Scala was not because of it's performance, etc. But it was because I was the only developer in my company who knew and learnt Scala after reading a couple of books (one was around 800 pages). Obviously, I needed a language that any other developer should have no problem taking over, and Scala developers are 1)expensive 2)not easy to find. Also, Slick (the database interacting code for Scala by Typesafe) wasn't mature yet.
For this reason, around Round 6, I started writing my own framework in GoLang and used it internally as an 'auxiliary framework'. I will explain more about this framework soon soon. In my company, we have about a handful of backend programmers and a couple of frontend devs. I found that GoLang was much much easier to teach my programmers, than say I could teach Scala. Please note - Scala is a brilliant functional programming language, but if you are thinking switching from Ruby/Python/etc would be easy, then you are wrong.
Now, we have a workflow that allows us to deliver as quickly as possible, but without missing out on performance - We write our entire V1 in Rails. We implement all the UI/frontend related code and then port it to our GoLang framework. We have an internal generator where we just feed our rails app, and the code for our framework is just 'ported'/generated on the fly based on our framework and we just deploy it. So far, our productivity is slightly lost while handling the type conversions, bugs, etc. But it's totally worth it. Go outperforms Rails by a huge margin. I noticed that using something like Puma helps a lot, but it still is no way comparable to our GoLang framework.
As for our framework, it's just pretty simple - Just organize all the files as you would in a Rails application (Models/Views/Controllers/Config) and everything just works without much performance hiccups. We use Gorilla components for stuff like routing and cookies. The rest of the stuff is slightly adapted from other frameworks (like Martini).
All in all, I love the ability to have JVM like performance with the productivity of Ruby with a language like GoLang. And this round 8 benchmark is nothing short of impressive. If you haven't tried GoLang yet, you should try writing your own framework, not only do you learn about all the trade-offs for the 'magic' that rails makes under the hood, you also learn about some new stuff and thus become a better programmer.
I think GoLang is pretty impressive if someone as average as me can even write a framework like Rails, except for better performance. Give it a try, people, you won't be disappointed.