

Rewriting a large production system in Go (2013) - kid0m4n
http://matt-welsh.blogspot.com/2013/08/rewriting-large-production-system-in-go.html

======
lbarrow
Probably needs a [2013] tag. Previous discussion was here:
[https://news.ycombinator.com/item?id=6234736](https://news.ycombinator.com/item?id=6234736)

~~~
dang
Thanks. Added.

------
kid0m4n
Quote from the linked paper [1]:

The majority of Flywheel code is written in Go, a fact we mention only to
dispel any remaining notion that Go is not a robust, production-ready language
and runtime environment.

[1]:
[http://research.google.com/pubs/pub43447.html](http://research.google.com/pubs/pub43447.html)

~~~
mratzloff
At my company, our high-volume Go systems are some of the most reliable and
predictable ones we run.

------
joshpadnick
Could someone familiar with the Go ecosystem comment on how well Go works with
relational and NoSQL databases? Specifically, I'm interested in libraries that
serve an ORM (or ORM-like) function, or that are non-blocking.

For example, in the Java world, libraries like jOOQ[1] make type-safe SQL
construction a breeze and allow you to make your relational schema a "first-
class citizen" of your app, versus a mere afterthought of how your ORM happens
to represent them.

Or in the Scala world, there's a non-blocking MongoDB driver called
ReactiveMongo[2].

Would love to hear how this compares to the Golang ecosystem.

[1] [http://www.jooq.org/](http://www.jooq.org/) [2]
[http://reactivemongo.org/](http://reactivemongo.org/)

~~~
bbulkow
My open source NoSQL database, Aerospike, has made a strong commitment to Go.
I first posted to golang-nuts in 2009, and our native Go client has been out
for a while ( [https://github.com/aerospike/aerospike-client-
go](https://github.com/aerospike/aerospike-client-go) ). We've supported the
GothamGo meetup, which was a great session if anyone was in NYC that saturday.

Shameless plug over, please forgive me, but you did ask about Go and NoSQL.

"non-blocking" is kind of a funny concept in go, because since they have green
threads, even what might seem blocking isn't "really" blocking. Not sure quite
what you mean - do you really mean "using channels and goroutines as the
interface" ?

The comment about Go's typing system not working well with NoSQL is certainly
true. I find it's annoying working with JSON - similar problem - but the JSON
tools have these nice ways of tagging your fields with the JSON fields for
easy conversion. We might have to look at this with Aerospike.

I spent time with one company, LiquidM in Berlin, who rewrote a PHP production
system ( that's not "muscular C developers" :-) and had a very, very positive
experience. They told me their switchover to GoLang was incredible, with line
counts reduced massively (like 3x) and performance up 10x and programmer
productivity way up. I was trying to find a blog post about their experience,
but nothing's coming up.

The most annoying problem with Go is its lack of performance compared to JVM
(including probably Scala), where common operations are usually 2x ~ 3x faster
runtime, in production. In my opinion, the GoLang people need to stop blaming
their garbage collector, because even with GC off Go is far slower.

The GoLang argument is code is easier and funner to write, which is certainly
true, and Go is still an evolving implementation.

Go's big thrust this year is solid support for ARM, likely so they can support
Android well. I'm running Go on my Raspberry Pi2 (and my original Pis, but
they only have one core so it seems a little dumb). It is a fun language.

------
curtis
Previous HN Discussion:
[https://news.ycombinator.com/item?id=6234736](https://news.ycombinator.com/item?id=6234736)

------
philsnow
> If I could get out of the 1970s and use an editor other than vi, maybe I
> would get some help from an IDE in this regard, but I staunchly refuse to
> edit code with any tool that requires using a mouse.

Ob"Fallacy of the excluded middle": you can get this kind of contextual
information in emacs pretty easily.

~~~
Dewie2
> > , but I staunchly refuse to edit code with any tool that requires using a
> mouse.

Like Acme.

------
hippo8
When I meet a function and I have no idea what it returns, the lazy thing I do
is

    
    
         foo, bar := someFunc(baz) 
         int(foo)
    

Most times the conversion does not work and I see a nice little error with the
type of foo.

------
rudiger
Coming from an Erlang on Emacs background, does vim not allow you to follow
variable declarations to their definitions or otherwise get contextually
relevant information?

~~~
wtf_is_up
It does: [https://github.com/fatih/vim-go](https://github.com/fatih/vim-go)

------
IndianAstronaut
On the topic of rewriting, has anyone had difficulty refactoring Go code?
Having the compiler scream at you whenever you decide to leave a variable
undeclared seems to make this more challenging as opposed to just having your
IDE point out to you a variable is unused.

