Put another way, a high-performance platform provides a very high ceiling, allowing your application to be more brute-force with its implementation. You don't have to be sub-consciously worrying about performance gotchas while implementing your code because a high-performance platform gives you freedom to be inefficient within your application domain.
Not only that, a high-performance platform postpones your first scale event, and in some cases indefinitely defers it. I've found that applications on high-performance platforms tend to be easier to deal with on a day-to-day basis because they do not collect the various deployment performance-oriented cruft that you typically see with low-performance systems. High-performance platforms have simpler system architecture (fewer external processes, less monitoring overhead, etc.)
A bonus is that the user experience will be just that much better thanks to low-latency responses.
[1] https://www.techempower.com/blog/2016/02/10/think-about-perf...
You shrug off the established players but all else is very much not equal. Until Go has its own mature Django or WordPress projects, you're spending a lot more time reimplementing the wheel.
A framework gets you going real quick, but at some point, probably 3-6 months in, you'll need to do something that the framework doesn't like. At that point the framework suddenly becomes a hindrance rather than a help. You spend more and more time fighting the framework and writing more and more code that lives outside the framework. After a few years you've wasted way more time than you ever gained from using the framework.
Libraries are built to provide capabilities to your code. Until you've experienced a good standard library (like Golang's) then this makes no sense. It's common for newbies to Golang (like I did) to try and create supersets of the libraries and create their own framework. But every new project comes back to the simplicity and ease of using the standard library.
I like the OP's approach of having repos full of useful middleware and handlers. This makes much, much more sense for Golang development than a Django clone.
Try it, you'll like it.
The fact Django is batteries-included, and everything is well documented in a single place, developers aren't wasting time working out what they can or should use for URL routing or handling database connections.
So no, I stick by my comment. A good framework saves time by being easier to learn, creating a more homogeneous product that is easier for other <framework>-developers to pick up, not forcing developers to form opinions about architecture they just need to work.
It's great not to have to worry about frameworks, that often last just for a few years, than you have to rewrite or migrate to a newer partly incompatible version.
Yes, some platforms (e.g., WordPress) give you certain functionality off the shelf, but if your application isn't a CMS or blog, then the utility of that functionality is low. When building a custom REST or REST-like server for an application, a CMS platform isn't necessarily a reasonable starting point.
As with anything in technology, many variables need to be evaluated to make a decision. My point here is that performance is a consideration—more significant and valuable than many people understand—and it at least somewhat objective. Developer productivity is more difficult to objectively measure and varies by team on matters such as previous experience.
However, the performance gap between Go and Rust is much smaller than the gap between Go and a dynamically-typed language, even one JIT'ed to the n'th degree, and the gap between Go and Java generally lost in the noise [1]. Between Go, Java, and Rust, you've probably got a good case that you'll get to more-or-less production-ready code fastest in Go. (And yes, "more-or-less" is a gap big enough to drive a truck through too. I preemptively pretty much agree with everything anybody might care to write about that issue in reply. :) )
[1]: I suppose I should point out that a perf gap of 2 or 3 is "generally lost in the noise". In the real world what tends to control which such language has the better implementation of something for most tasks is who has taken more time to write an optimized version. It's when you start getting up to the 10x-25x range that the gap between Go and a dynamic language can be that it's not really "lost in the noise" anymore; in that case, the faster language can end up simply faster than the slow language even if the slow language is given a lot of extra love (assuming no "change to a different language" shenanigans).
Making a platform selection that is informed, in part, on the language/platform's performance is a reasonable thing to do. As long as you can be equally productive (or even if you are a little less productive) with a high-performance platform, you will likely endure less pain during the initial several months once your system goes live and considerably less pain over the long haul.
Plus, it's really great to have a wicked-fast web app with very little performance-tuning effort.
Longer version:
- I've been writing almost exclusively Go code as my full time job for the last 2.5 years
- I've coded in Python and PHP full time before - each at least as long as Go (and neither of them was my first or second programming language)
- I was able to pick up Go significantly faster than either of the two (0 to push to production in less than 2 weeks)
- I'm at least as productive (measured in problems solved / features delivered in unit of time) in Go as I was in Python
- standard library is great and very often replaces the need for 3rd party libraries (performant, production ready HTTP server for example) and makes dependencies "flatter"
- deployment of a single static binary vs virtualenv hell (pre-docker) is bliss
- it's actually very fast for free - you'll start worrying about (and start spending time on) performance way later
Negatives: - dependency management is bad
From web app/api perspective:
- just using http server from standard library gives you concurency go is known for - each request is a goroutine which is cheap: minimal overhead
- you can delay worring about performance (at least from the app part - not db obviously) more. It's easier to throw hardware at the problem when you need 1/10 of the hardware
- deployment is easy - single static binary that just works
- multiple CPU cores are simply used: you don't have to run multiple processes (node)
- http server in standard library is production ready: no need to stick it behind something else
- you get all that without sacrificing productivity
Have you found a decent way to deal with the dependency management, I found it a bit clunky...
That being said, it all depends on the use case. And about your point on binary output, its not just about being able to get one binary and running it in different platforms, its also about being able to run it without much setup in the future. For example, I had a hard time getting a nodejs app that I built a few years ago running again since so many libraries were deprecated and I had a lot of broken packages, but if it was built using Go, it would just be one binary with all the dependencies packaged in and I would be able to run it without any issues.
Personally I think it's fine to have optimization goals, particularly around things like performance, cost and security (or even your ability to hire engineers). Maybe you park some of them while you prove another point, but you can (and should) measure and adapt along the way.
Yes it is, but if there are no perceived downsides then it's no biggie. I.e. Go is well supported by tooling, it has a good and growing open source ecosystem, it appears to support a level of day-to-day developer productivity comparable to other high-level languages, and so on.
In other words, the hidden corollary to the standard "premature optimization" meme is that optimization always has negative side effects (such as complex or difficult to maintain code). But sometimes, these negative side effects can be negligible and choosing a particular language over another is often one of those times.
That depends on the outcome. Would you call using C++ for developing a videogame as premature? Or just picking the right platform up front to meet the goals?
Performance, especially efficiency, is way too often overlooked these days, and provides incredible benefits both for your own development, operations and end user experiences.
For my project after a month in golang, I had to switch to C to avoid the GC pause. It also gave me total control over memory and made best use of CPU.
Will I choose C for every project ?, definitely not but based on what you are building, it is good to make that choice early on in the project.
Previously, we had to ship virtual appliances to our customers which then involved debugging their wacky network setups, their wacky version of VMWare etc. etc. Now it's just one liner build, upload to s3, send out a link, done.
I'd say picking a platform is not, as it is definitely a critical part of your program, especially if it does not greatly increase the complexity of your code.
Theres nothing fancy in the syntax, you can pick up a project you put down months ago and easily start working on it again
Isn't picking a language to solve memory/latency issues a pre-optimization? Also I'm not sure if one can argue that libraries from one particular language are better at doing what you expect than libraries from another language.
Disclaimer: I'm trying to understand how much of what people are saying about Go is hype. People are telling me things like you can cross-compile on different platforms and output a binary, but I fail to see how these things are important for most API's and web apps.