Live data from Hacker News

Program your next server in Go

talks.golang.org

51–60 of 384 posts

Re: Program your next server in Go

#51
post #33
post #13

What are some cases where I would choose to write a server in Go instead of in Erlang?

When your server has to do some computations to return results. Erlang is bad at that.

Such as what exactly? "Computations to return results" is rather generic, to say the least (and, if ‘computations’ includes handling requests, something that servers tend to always do).

Re: Program your next server in Go

#53
post #33
post #13

What are some cases where I would choose to write a server in Go instead of in Erlang?

When your server has to do some computations to return results. Erlang is bad at that.

I think it's fairer to say that "Go is better at that". "Bad" depends on the user and their needs. In some cases, Go is "bad" at that too and you should use C. In that case, you could always connect the C code to either Go or Erlang, although that introduces complexity into the system you're creating.

Re: Program your next server in Go

#54

I love Go. It has become the default Go-To (pun intended) language for me for almost anything that needs to be small and portable. However, I don't see myself writing a full server with it, I would still prefer a dynamic language like Ruby/Python for that and use Go for micro-services CLIs and the rest. For example: Our main application is Rails, it communicates with SOLR as the search index, in between the applicati…

Go type rigidity makes Go code tedious to write. Instead of thinking "How can we solve that problem" developers writing Go end up thinking "How can we make the problem fit Go type system". I'm not even talking about concurrency here, I'm talking about Types. Saying otherwise would be dishonest, unless one has never used anything but C... Anybody who doesn't believe me just has to look the reflect package. Reflection packages are usually a good indication of language capabilities when it comes to statically typed ones.

It doesn't make Go a bad language,it has a some good percs, it's just frustrating that its authors conflated simplicity with rigidity. Also I hate when languages have hidden APIs, i.e. things the language can do that the programmer can't. Go is full of these (for instance append which is a parametric function since it knows the proper return type no matter what type of slice you pass it, but you can't write your own? ).

It's good think that it requires very little investment to get started, but it becomes highly frustrating when one stumbles on its limitations.

Re: Program your next server in Go

#55
post #31

I'd love to see Nim on this diagram: https://talks.golang.org/2016/applicative.slide#13 - it could be close to the top right corner.

The go devs are very careful to avoid mention of all the other languages that compete in the same space and are significantly better.

Re: Program your next server in Go

#57

All of the server backends at my company are written in Go. This was a result of me writing a couple servers in Python a few years back, ending up with lots of problems related to hanging connections, timeouts, etc. I tried a couple different server libraries on Python but they all seemed to struggle with even tiny loads. Not sure what was up with that, but ultimately I gave Go a swing, having heard that it was good…

You would like to write an entire server without using a GC?

Re: Program your next server in Go

#58
The slides are awesome and I really am fond of go, but the examples using channels are all more code to write considerably than I'd write in C# or JavaScript with async/await and not any more robust or safe.

Go is great for actor based systems where you model things using channels and goroutines for what they stand conceptually - not when you use it to simulate Task.WhenAll/Promise.all with a timeout.

I think _that's_ what they should be selling - that your server's architecture should typically be different.

Re: Program your next server in Go

#59

I love Go. It has become the default Go-To (pun intended) language for me for almost anything that needs to be small and portable. However, I don't see myself writing a full server with it, I would still prefer a dynamic language like Ruby/Python for that and use Go for micro-services CLIs and the rest. For example: Our main application is Rails, it communicates with SOLR as the search index, in between the applicati…

Given the low API limits on most services, what was the reason you went with Go for those integrations as opposed to ruby / rails?

I wrote a bit more in length about it here: http://www.avitzurel.com/blog/2015/06/13/scaling-gogobot-usi...

In this blog post the previous solution is presented using Nginx, now it's Golang similar to Templar (mentioned in the post).

Re: Program your next server in Go

#60

All of the server backends at my company are written in Go. This was a result of me writing a couple servers in Python a few years back, ending up with lots of problems related to hanging connections, timeouts, etc. I tried a couple different server libraries on Python but they all seemed to struggle with even tiny loads. Not sure what was up with that, but ultimately I gave Go a swing, having heard that it was good…

Invaluable perspective from the trenches--thanks.
Post reply on HN