141 points · by neeee · 13y ago · 42 comments
So while you'll have uninterrupted connectivity, if you don't ensure that your server shuts down gracefully, you'll still drop the requests that the old process is servicing when the restart is triggered. We wrote a library called manners for managing the graceful shutdown of a single server: https://github.com/braintree/manners. When used in conjunction with manners, GoAgain provides zero-downtime restarts without any dropped requests.
(Manners is still under development, so make sure you understand it before using it.)
We had an interesting experience with Go. We ended up deciding the language was not a great fit for our needs right now, in part because the community is still pretty immature. (You can read about our experiences here: https://braintreepayments.com/braintrust/gotchas-irritants-a...).
Still -- as more and more libraries like this get released and stabilized, Go will become an increasingly interesting option for developers.
Go is a very young programming language and unfortunately there are alot of cases where we have to implement pkg foo, bar, baz, because pkg quux depends on them. There are going to be many places where things break at this stage in Go's life, however that shouldnt discourage using Go for real world projects, because many of yesterday's bug end up being debugged and patched today. Go is a great investment for your company, and I hope you and your team reconsider using go for your projects after go 1.1 comes out. http://tip.golang.org/doc/go1.1
If you guys need help, feel free to join us in #go-nuts on freenode's irc server. IMHO, The best feature of go is, arguably, the helpful evangelist-like gopher community hanging out in IRC. We wouldnt mind helping you guys with your issues, but you have to help us help you.
Libraries cost time and money to produce, and if you are relying on free volunteers, development will either be slow or buggy and likely both.
I remember when I tried to look into a MySQL library last month. The first one I tried wouldn't even compile. The 2nd one threw a connection error not when I issued the dial function, but when I tried a query on a fake IP.
If you want Go to succeed, get Google to start funding it more or get used to having it grow organically like every other language.
"I don't think this is a reasonable demand for startups or even medium sized businesses."
It was a recommendation. Go is a great investment, and while it may not have a "huge" market share, many of the most influential tech company's in silicon valley are starting to use Go.
https://code.google.com/p/go-wiki/wiki/GoUsers
And some of these companies are even writing/rewriting their spotlight core projects with Go.
https://code.google.com/p/go-wiki/wiki/SuccessStories
"Libraries cost time and money to produce"
Time yes, Money no. Developers may charge money to produce software, however there are lots of software projects out there that were written by developers who worked for free. Does a painter always paint with the intention to sell his/her work at a gallery showing? Maybe they just want to create something for other people to experience.
I view all software from this perspective, and I give alot of my time working on go boilerplate libraries and other opensource projects for free because I want to help empower developers to create real world solutions to real world problems without the nuance of having to "invent the wheel before being able to engineer a new automobile".
"and if you are relying on free volunteers, development will either be slow or buggy and likely both."
Pass.
"I remember when I tried to look into a MySQL library last month. The first one I tried wouldn't even compile. The 2nd one threw a connection error not when I issued the dial function, but when I tried a query on a fake IP."
Have you tried reading https://code.google.com/p/go-wiki/wiki/SQLDrivers, or... perhaps considering using one of these, http://godoc.org/?q=sql
Maybe consider this which looks considerably up to date. https://github.com/go-sql-driver/mysql
Your experience last month with Go may very well be irrelevant now. Ive been using Go for about a year now, and many things have changed within go's development ecosystem within that time period.
If you arent willing/capable of contributing to go by committing code, thats perfectly fine. However, atleast make sure that your issues with the language are actually still relevant before you discourage other developers from exploring the language themselves.
"If you want Go to succeed"
As if its likely to fail? Go has already successfully satisfied the language designer's desires that motivated the project's creation. They want to create a language that makes their programming environment more enjoyable and efficient when developing software at a scale Google operates at.
Unless some language comes along that is exceptionally better at solving the problems Go was design to solve, Go will remain a successful programming language for those who use it.
"get Google to start funding it more"
Are you kidding me? Google has some of the most well respected engineers in computational history working full time on Go. Google cant just walk into best buy and hire geek squad to work on Go. We are trying to reduce go's overall source code complexity so that we can not only maintain the code, but ensure we dont introduce bad language design mechanics as apart of the programming environment. We want to avoid the situation, years down the road., where we are faced with having to make a decision to either cope with a bad language mechanic or deal with it by introducing backwards incompatible changes that break gopher's code. Both options suck, and the only good option is to avoid the situation entirely by making sure we make the best design choices.
"or get used to having it grow organically like every other language."
Most languages dont grow organically. Most either grow all mutated and exponentially complex to adapt to changes in technology, or development either slows down or stops growing completely because the majority developers who used the language, moved on to something . Go on the other hand does grow organically, atleast it has so far. Everyday the project matures and issues we are frustrated with right now could be a faux problem because its already been fixed in go tip and you just need to rebuild the compiler.
http://swtch.com/~rsc/go11.html
I mean sure there are alot of bugs to fix and alot more than can be done to improve go's performance, but this is true for all software in general.
The reason go is a good investment because it has alot of good investors investing in it.
The MySQL drivers there are tested and should work. If those were the ones you tried, I'd like to know.
I just filed an issue to make the above link more discoverable.
How many resources did Sun allocate to developing and supporting Java?
EDIT: One of the things that excites me about Go as opposed to something like Ruby on Rails or node.js (V8, aside) is that Google is behind it.
That's not the drivers fault: https://code.google.com/p/go/issues/detail?id=4804
For what it's worth, I ended up using this one: github.com/ziutek/mymysql/mysql
Those are clearly not Facebook scale servers but for majority of people: you don't need this or any other such solution.
Here's what I do for deployment. I have a fabric script that:
- copies the new executable to the server - kills currently running executable - starts the new executable
The worst that can happen is that a few connections will get dropped and that's perfectly fine 99.9% of websites. You don't control internet so the users will get broken connections all the time for reasons you can't eliminate. They shrug and hit reload button.
Complicating things to avoid few seconds of downtime was not worth it for me and rationally, probably not worth it for most.
If you're just looking for another language to get away from the cesspit that is Ruby, try Python.
If this is true, I think you'll miss some great candidates, to be honest.
Things I did before, for instance, include:
- writing real-time 2D/3D rendering engines, mixing C++, TurboPascal, Asm
- low-level assembly code, writing keyboard hardware interrupt handlers, TSR, video-cards tweaking etc
- porting C-libraries from Solaris to Windows
- writing a full GUI toolkit
- writing 2D games
- wrapping C and C++ libraries into .Net
- writing a cluster of satellite images processing with PVM
Etc (apart from using Java, .Net, Ruby, CoffeeScript etc).
To make my point clear: the good rubyists I know have a lot of past experience, similar to this.
Talking about "cesspit" is not giving good signals about how you consider other technical choices, either :-)
Specifically the "let it fail" aspect of OTP, which begets supervisor hierarchies and the consequent lack of exception handling required.
This has been brought up before and dismissed (not the unix way perhaps? I forget), and supervisors have been implemented in go by others from Erlang backgrounds. It's just not quite the same as being built in.
The way goroutines are not linked to their parents or children is related to this. It's a conscious design decision, but I am still adjusting my style to it.