6 ms·
I have a question that maybe doesn't belong here. I know people have asked a lot of questions about Go in a skeptical way, and I promise I'm not coming at it f
by TheMagicHorsey 11y ago
I have a question that maybe doesn't belong here. I know people have asked a lot of questions about Go in a skeptical way, and I promise I'm not coming at it from that angle. I actually use Go quite a bit (mostly on App Engine) so I do like it.
My question is, given all the things being built around Go, like Kubernetes and various other job and cluster management tools, why weren't those things absorbed into the language or standard library. The way, say it is with Erlang?
In Erlang a lot of the multi-machine coordination work seems to be really well thought out, and its part of their standard OTP library ... which seems pretty mature (at least to someone who is a novice like me).
Why doesn't Google use Erlang? And if they don't use Erlang, why isn't there some sort of cluster management stuff built into Go?
I mean things like cross machine channels, automatic go-routine (or process) restart on failure, process monitoring, etc.
- hariharan_uno 11y agoI think in the beginnning, there was some effort to have channels communicate over a network. But it didn't turn out easy / performant. Also, if they are absorbed into the standard library, I think their iteration speed is restricted because of compatibility requirements.
- pjmlp 11y ago> Why doesn't Google use Erlang? And if they don't use Erlang, why isn't there some sort of cluster management stuff built into Go? Because it requires a higher skill level than Go, which isn't what Google is after. Check Rob Pike's talk about it.
- Gepsens 11y agoHigher skill needed ? I don't think so, I think it's more about the fact that Erlang code is verbose and unreadable.
- jlouis 11y agoGoogle needs a platform they control. They don't control the Erlang ecosystem, and they have learned the hard way how that fares (Java+Oracle+Android). The other problem is that Google needs to build tooling that fits into their existing code base. In this case Java, C++, Python, Javascript and so on. They had to build everything from scratch anyway for Go or Erlang had they chosen either. A lot of the nice things Erlang provide is already in place in the Google infrastructure. So you are aiming at small services which are isolated. This is a place Go has an easy way of getting going. Of course, language familiarity also plays a large role. Go is pretty easy to onboard if you have decent Java or C++ knowledge. Erlang requires you to rethink the way you handle computation. Granted, the long-term benefits in productivity you gain in Erlang is significant[0], but adding more developers to a project is easy for Google. [0] Whenever I write Go, I get frustrated at how much I have to write to do even the basic data munging. In Erlang, this has far better flow.
- zurn 11y agoErlang co-evolved with OTP so they have a naturally close relationship. The Go situation (and philosophy) is much different. Also the Go authors sound like they don't want the language to be too closely associated with Google.
- jerf 11y ago"Why doesn't Google use Erlang? And if they don't use Erlang, why isn't there some sort of cluster management stuff built into Go?" Cluster management is a hard problem. Erlang's cluster support really only hits one use case, which is that you've got a relatively small cluster... at least, by Google standards!... of several machines physically co-located, or at least, very close on the network together. That's a great use case to cover, but it is important to understand that's "all" it is. You can't build a 1000-machine, multiple-data center located around the world deployment on the default Erlang stack as if all those machines are on one cluster. What Erlang gives you is still a step up from the normal default; you can build that as a cluster in each DC and it's not that hard to start up "proxy processes" that allow you to talk to other machines in the data cluster via Erlang messages sent to processes... but now you're talking about doing work, not just using built-in support. "cross-machine channels" are, in my considered opinion, impossible. The channel semantics include a synchronous rendevous that is impossible to guarantee over the network. (That is, when you advance past a channels send statement to a non-buffered channel, you are guaranteed that some other goroutine has received the value.) You can set up other objects that let you communicate remotely, but they can't be "channels"... they can only be other things. (Note that you have to understand "Go channel" not as a vague "something that lets you send messages", but the specific and exact semantics it implements, which is important because without those very specific semantics, "select" doesn't work! And if you can't put it in a "select", it isn't a Go channel. Go channels have a very, very rich semantics full of strong guarantees, which can't be relayed across a network.) Some of the rest of your last paragraph is fairly deeply addressed in this post of mine: http://www.jerf.org/iri/post/2930 http://www.jerf.org/iri/post/2930
- TheMagicHorsey 11y agoThank you for the article. That was quite illuminating.
- azth 11y ago> Go channels have a very, very rich semantics full of strong guarantees, which can't be relayed across a network.) Any place to read up on those guarantees?