

The Reliability of Go - exch
http://andrewwdeane.blogspot.com/2013/05/the-reliability-of-go.html

======
kenkam
I would like to hear more about the technical implementations from the author
on how he managed to improve performance. He mentions: "Due to the complex
nature of the system this script could take up to three minutes to scan nodes
and process the results" but how does Go solve this complex system that Python
couldn't? 3 minutes to 1 second is a superb improvement.

The second paragraph reads like: replacing a relational DB with a (in memory?)
key value store resulted in more throughput. He implemented it in Go, but he
could have implemented it in any other language.

What I want to know is how he convinced management to use Go? Where did he
find the programmers? I work in a similar environment and I don't see my firm
adopting Go any time soon, although I wished they had as I'm a big fan of Go
and believe it has a place especially server side processes (e.g. algo
trading, market data feeds) where concurrent connections are prevalent.

~~~
codonaut
Can anyone explain why exactly a script written in one language would stall,
while the same script in another wouldn't? Is there that much inherent
instability in Python? Can it be assumed that the scripts in this case aren't
comparable?

~~~
_pmf_
> Can anyone explain why exactly a script written in one language would stall,
> while the same script in another wouldn't?

It stalls in Python because the author is not acquainted with non-blocking
system programming (the select()-call, which has been around since at least
the eighties and has been a part of core Python since a very long time).

As to why a software developer who did not invest some minimal time into
learning basic system programming feels qualified to write a blog post about
this topic is another question.

~~~
tptacek
It's funny how people who learn evented programming in scripting languages
like Python feel like they've discovered some new hidden concept. No competent
systems developer fails to understand what select() does. Suggesting that the
author was't "acquainted" with select says more about this comment than about
the author of the post it comments on.

------
waterside81
We moved a huge chunk of our code from Python to Go. We have one simple Go
binary that just listens on a certain port and API requests from our Django
app are proxied to the Go instance running. No issues, no panics, no memory
leaks. It's pretty amazing to see a long running process never growing in
memory (well, if you're coming from the Python world at least, I'm sure the
JVM is pretty solid at keeping it's place nice & tidy).

Folks - Go ain't a fad, it's a great language if your problem domain benefits
from concurrency AND if you need to deploy to multiple locations and love
being able to just drop a single binary and walk away.

~~~
kamaal
How good is Go, as a replacement for Java?

~~~
beatgammit
What do you mean "replacement for Java"? It's a completely different language:

* no classes (only structs and embedding)

* no VM, only a run-time (cross-compiling is trivial though)

* hardly anything is an object

* no exceptions

* concurrent by design

It's quite possibly the most distant language from Java in the procedural
world, which I think is a good thing. It forces you to rethink your data and
their interactions.

I think Go is a great language and works in most of the spaces where Java
lives, except maybe GUIs, but Java was never any good at that anyway. It's
more suited for the server, but it can work well for computationally-intensive
tasks as well.

Go is better thought of as a replacement for whatever server stack you have
than a replacement for a given language.

~~~
jebblue
>> I think Go is a great language and works in most of the spaces where Java
lives, except maybe GUIs, but Java was never any good at that anyway.

Eclipse is the world's most popular IDE it's written in Java, Minecraft one of
the most popular Indie games ever made was written in Java. What gives you the
impression that Java isn't good for GUI's? It's great for GUIs and it's cross
platform from the start.

~~~
eridius
If you want to make the argument that Java is good for GUI's, feel free, but
you just picked the two worst examples I could possibly think of. As a Mac
user, the UI for Eclipse is such a huge turn-off that it soured me on Java as
a whole (back before I really knew anything about Java; today, there's plenty
of other stuff to dislike besides the GUI toolkit). And Minecraft? That's not
a UI, that's an OpenGL game. Nothing about the custom OpenGL-based UI it
presents to users says anything about Java, or has any bearing on other Java
apps you might write.

~~~
jebblue
Ok, you have a good point. I'll instead list Open Office and LibreOffice and
Symphony and Lotus Notes. Those are hugely complex GUI's and work as good as
or better than anything proprietary out there in the same class pf products.

~~~
mahmoudhossam
Actually, LibreOffice is trying to get rid of the Java dependency for a while
now[1].

[1]: [http://www.developer.com/open/libreoffice-3.3-frees-open-
sou...](http://www.developer.com/open/libreoffice-3.3-frees-open-source-
office-suite.html)

~~~
jebblue
Interesting, it sounds like LibreOffice is becoming a mish-mash of
technologies (search this page for Java):

[http://www.libreoffice.org/download/4-0-new-features-and-
fix...](http://www.libreoffice.org/download/4-0-new-features-and-fixes/)

------
16s
I'm sorry, but the world does not need another company-controlled, corporate
programming language. .Net (Microsoft), Java (Oracle) and now Go (google).

All of these compilers or JIT interpreters are implemented in C or C++ (which
are open languages with ISO standards).

It bothers me to no end to see corporations taking control of the fundamental
building blocks (programming languages) of technology and then to see
technologists and developers go on and on about how wonderful and better these
corporate languages are.

With C and C++ and Python and Ruby and Perl we have freedom. With Go, .Net and
Java, etc. we do not.

Google already control your search, your browser, your phone, your email and
in some cases your OS (Chrome) why would you want them to control you
programming language as well? The idea boggles my mind.

I wish others felt as strongly about this as I do. If you want to control your
future, then use C or C++ or some other ISO standardized language with lot's
of free compilers available, do not use a corporate controlled programming
language.

There is a reason go compilers are C and C++.

~~~
exch
Go is completely open source. The primary devs just happen to work at Google.
That is all.

If anything, the Google name attachment may only serve to help convince
management that Go is a safe, long-term bet. If you don't like the Google
attachment, you are entirely free to fork the language and make it your own.

~~~
_ak
Plus there exists not one, but two implementations that fully conform to the
spec. So you're not even bound to one specific compiler implementation.

~~~
whyrusleeping
Soon to be three, llgo is getting closer!

------
raverbashing
I remember some time ago a complaint about Go having some bugs on 32-bit
machines (something related to the GC)

So yes, if you have control over your environment it may be a better choice

But the biggest issue with 'less than mainstream' languages are libraries.
Things like DB connectors, protocol libraries (SOAP for example - yes,
unfortunately this is necessary for some 3rd part services), etc

Heck, even for Python 2 (not to mention P3) this is an issue sometimes

~~~
jff
Why, oh why, would anyone be running x86 hardware in this Year of Our Lord Two
Thousand and Thirteen? It's been what, 10 fucking years that we've had AMD64
now, you can get free 64-bit systems from the curbside, just toss that goddamn
PIII and get with the 21st century. Maybe then people can stop posting "Well,
Go on 386 architecture has bugs, so don't use it for anything."

~~~
Symmetry
Intel fuses off x86-64 on some chips it sells for reasons of market
segmentation.

~~~
tacticus
They have stopped doing this for quite some time iirc.

still a stupid move on their behalf (as is the market segmentation of AES-ni
stuff)

------
tezza
If I had been at that conference, I would have asked the same question.

Thanks for the data point (Yes, fine for production AFAYCT).

What does Go do when it segfaults ? Simply saying it has not-yet-segfaulted is
but one factor of production-readiness.

Does Go leave just a coredump ?

One thing I like about java in a production sense is that if the JVM exits
unexpectedly it writes an hs_err_pid file that has a dump of what the threads
are doing at the point of failure.

~~~
4ad
Go programs don't segfault because Go is a memory safe language (unless you
use unsafe). They can segfault in the runtime, but that never happened to me.
Nevertheless, what happens when you segfault is a property of the system, not
of the language implementation. It will happen whatever happens to C programs
that segfault.

Go programs can panic but that doesn't produce a core dump, only a stacktrace.

~~~
tezza
Well Java doesn't generally segfault either... until you start referencing
external libraries ( freetype.dll , serial_comms.dll, swt.lib )

I presume Go ( CGO ) will have to deal with segfaults too, and I'd like to
understand what it does.

~~~
exch
As a practical example to 4ad's answer, here is the result of NULL-pointer
dereference on the C code on my system (Arch Linux 3.9.2-1-ARCH). It does
yield a SEGFAULT:

<http://play.golang.org/p/uoBKsRIJB7>

~~~
tezza
Thanks exch, that's really decent of you to construct an example.

I wonder that if there are multiple threads / goroutines are their callchains
also printed ?

~~~
exch
It seems it doesn't go into a lot of detail as to the call-chain for each
running goroutine, but this example may just not be very suitable to properly
test it. Either way, here is the same deal with a bunch of running goroutines.

<http://play.golang.org/p/GQxdXpWdZD>

------
reinhardt
Somewhat off-topic but are there any data on the penetration of Go outside
Google, a few other companies [1] and weekend hack projects on Github? Thanks
to its unfortunate name, even searching for Go developer positions is
challenging [2].

[1] <http://go-lang.cat-v.org/organizations-using-go>

[2] <http://www.indeed.com/jobs?q=go+developer>

~~~
shocks
Use the keyword 'golang' instead. :)

~~~
why-el
This could have been a better name in my opinion. One should stay away from
frequently used English words.

~~~
jmhain
Maybe they wanted the name to symbolize the syntactical terseness of the
language, and every other two letter name had already been taken by unix
utilities.

------
sergiotapia
"Excellent tooling"; from the article.

What does he mean? I've searched the Go websites but it seems all Google gives
you is the Go compiler and a tour.

~~~
mseepgood
go doc, go fmt, go fix, go vet, go build, go run, go test, go get, go install,
... and present!

------
koraytaylan
first I saw go I thought meh but with so many people saying good things about
it makes go inevitably more interesting day after day. however I just feel
like it's going to be like mongo. when it first got popular, people all moved
to mongo as it miraculously solving all the problems. same thing happening
with go now and after sudden disappear of all the mongo evangelists, this
makes me doubtful about go obviously.

~~~
azth
IMO, people like hype, and a lot of the time, they are not aware of what
better alternatives exist. If Go did not have Google or Ken or Pike as names
behind it, do you think it would have gone anywhere? It doesn't really offer
anything special compared to more expressive and safer languages like Scala
and Rust for instance.

You can see it right here in the comments: someone said that Go is a memory
safe language. It is not any more safer than Java is in that regard. We need
languages that are safer than Java and Go.

------
moshberm
What happens if Google decides to send Go the way of the RSS reader, the SMS
search, and the dinosaur?

~~~
Jtsummers
Nothing, it's not a service. The code is already out there along with the
documentation and language spec. The worst they can do is:

1\. Cancel their future contributions.

2\. Create a closed source fork (is this feasible with the license if they
don't control what others have contributed?)

In the worst case, if there aren't enough go enthusiasts it goes the way of
other niche languages. Since the supporters seem to be active enough, I doubt
that'll happen.

