text
stringlengths
0
1.49k
We decided to move our API more towards a generic place, and have generic metrics with a subset of the information we previously had, that would be useful therefore for any different number of distributed applications, and enable distributed applications to use Loggregator to optimize their apps, or maintain them, do D...
Pivotal's main focus is to enable developers to do interesting things, so Cloud Foundry wants to enable developers to do hard, complex distributed systems, and maintain them, and iterate on their software quickly, and have confidence that their stuff is actually working, so they need visibility in that.
**Brian Ketelsen:** \[24:03\] Now, here's kind of a random, off-the-wall question - how complicated is a Cloud Foundry install? Is it something I can put on my laptop, or do I have to have a minimum number of VM's to run it, or a minimum number of physical nodes?
**Andrew Poydence:** It scales down pretty well. There's a project called [Bosh Deployment](https://github.com/cloudfoundry/bosh-deployment) -- we use Bosh to manage the Cloud Foundry deployment. So you can run Bosh deployments locally on your laptop. We do it on our Linux orchestrations here for development purposes w...
**Jason Keene:** Yeah, there's a project that's called Bosh Flight, which essentially -- I mean, I don't think it's even called that anymore, but we still...
**Andrew Poydence:** Bosh Deployment is the new project name for it, and they have a virtual box kind of CPI for that, so... CPI is a cloud provider interface, which is a Bosh term for basically how Bosh speaks to a cloud API.
**Erik St. Martin:** I don't know why I just caught that, like... Like, you're saying Bosh, but when you say it with deployment, it sounds to me like "botched deployment." \[laughter\]
**Jason Keene:** I've never heard that, that's perfect.
**Andrew Poydence:** That's funny. \[laughs\]
**Jason Keene:** I think Bosh was actually supposed to be - and I think we all have our giggle and opinion about it - [Google's Borg](https://kubernetes.io/blog/2015/04/borg-predecessor-to-kubernetes)++, so it's like Bo(r++)(g++).
**Andrew Poydence:** It was conceived in a time when -- this was well before containers were popular or even known about generally... So yeah, it operates more on a VM type concept, so it's good for doing that deployment. It's similar in character to maybe like a Terraform, but it also has some monitoring abilities; it...
**Jason Keene:** It's a handy tool.
**Andrew Poydence:** Yeah, it's incredibly handy.
**Carlisia Thompson:** Now, for someone who has been working with this project for such a long time, I would like to ask the question - if Go had _Generics_, would it be more useful to you? Do you miss not having that, or do you get by without it? Would you recommend that the standard library adds it?
**Jason Keene:** Yeah, it seems kind of like a trolly question... \[laughter\] I kind of have the opinion that if Go had _Generics_, it would make implementing some of the data structures that we've exposed - for instance the _Diodes_ - much more natural. I don't know what your opinion is...
**Andrew Poydence:** We kind of get around it. For example, the diodes operate on unsafe pointers, but when we bring it into projects, we immediately make a wrapper around it with the actual type that we want to be in the diode, so that way we get the benefit of the compiler. But that's something that is kind of hand r...
**Jason Keene:** Yeah, and the wrappers for something like diodes are easy to generate, just kind of boilerplate code. \[unintelligible 00:27:38.13\] Like Andrew said, we kind of worked around it. I'm happy with the pattern that we've adopted to make our stuff generally usable, but it doesn't mean that you have to use ...
**Andrew Poydence:** \[28:03\] And I think that's been really key for us, again, on this massively distributed team. I think if you let your unsafe pointers or interface{} leak too far, again, if someone were to just drop in the middle of your codebase and try to help, they wouldn't have the compiler helping them there...
**Jason Keene:** The casting of unsafe pointers is not always intuitive. We've had situations in the past where sometimes putting an extra * - the compiler doesn't tell you "Hey, this is referencing something you shouldn't dereference...", so yeah...
**Carlisia Thompson:** Did you make a proposal to the Go team?
**Jason Keene:** Implementing _Generics_ is well beyond my expertise...
**Carlisia Thompson:** No, because they were soliciting use cases. Not a proposal for how to implement, but a proposal like "Here's my use case." Because they were soliciting it, I don't know if you know...
**Andrew Poydence:** I wasn't aware of that...
**Erik St. Martin:** I think before approaching a solution or something, they really wanted to be well aware of the types of situations that people were looking to use _Generics_.
**Carlisia Thompson:** It sounds like you guys have a good use case.
**Andrew Poydence:** Yeah, we could throw it out there. Go 2 type stuff.
**Brian Ketelsen:** It's my Go 2 complaint about Go... I don't want _Generics_, just for the record. I like my Go readable, and I think _Generics_ will make it worse.
**Andrew Poydence:** Coming from a C++ background, I'm getting nervous... It's those nightmares when I have something that boosts angle brackets (<,>) - pages of compiler errors...
**Carlisia Thompson:** I think it could potentially make life easier for 20% of the users, and harder for 80%, so I'm not crazy about it either.
**Erik St. Martin:** Yeah, I'm not saying that there aren't use cases for it, particularly use cases that would be much easier with it, but I don't find working around it overly difficult... But maybe I don't work in the spaces where it would be the most useful. So I'm not against it, but I'm not like "The language is ...
**Carlisia Thompson:** Yeah, I like the fact that they were soliciting use cases, so they can get everything together and make a decision... Because I don't know every single project out there, right? I mean, we don't know.
**Jason Keene:** Yeah, I'd caution listeners, if you are gonna use like interface{} or some of these other generic types, to approach it in a similar way that we approached it - contain it within a small area of your codebase, so it doesn't bleed out to the rest of your system. I can drop a [link](https://github.com/cl...
**Carlisia Thompson:** That'd be awesome.
**Andrew Poydence:** Yeah, we've made a few libraries and I think we've run into this a few times where it's like "I guess we'll make it interface{}" and then try to do our best to make sure we don't use it as that, but... Again, it's so easy to work around. I wouldn't be driven to say "Yeah, the language is broken", I...
**Jason Keene:** I'm definitely appreciative of the consideration that the core team has when it comes to _Generics_, because like you were saying, we don't wanna be in a situation where 80% of the engineers are having to deal with this frustration of massive compiler errors that are nonsenseful, just to serve a niche ...
**Erik St. Martin:** And the ways to work around it are kind of fun, too. Brian here is like the king of code generation.
**Brian Ketelsen:** \[32:03\] Hahahaha!
**Andrew Poydence:** We could use some of that, I think. We've got one library that does its best to generate a tree traversal for you, which was a very interesting problem, but generating code is hard...
**Jason Keene:** Yeah, especially code that mortals can read.
**Brian Ketelsen:** That's what makes it fun, it's like leveling up your code skills... When you get into code generation that's generating code that's generating code, then you're hardcore. \[laughter\]
**Andrew Poydence:** Then you know you've made it to the next level.
**Erik St. Martin:** That might be too many levels deep for me. It's like, "Wait, so does this code generate the generation code, or the generated code, or...?"
**Andrew Poydence:** It generates itself...
**Jason Keene:** Yeah, it's like a client that just generates itself somewhere in the middle there...
**Erik St. Martin:** I guess this is not new to you - you've got GCC and stuff that bootstraps itself, right? Where it compiles itself to compile itself...
**Andrew Poydence:** Insane.
**Erik St. Martin:** ...so that the new version of GCC's compiler has the optimizations that came with the new version of GCC... It's just kind of funny.
So you mentioned - in the docs and stuff, too - gRPC, that you guys are using that, and you kind of went through some experiments with other forms of messaging. How long ago did you land on gRPC?
**Jason Keene:** We picked up gRPC shortly after 1.0, gRPC Go was announced. It was in the news and we were like "Oh, maybe this will serve our use case." Previous to that we were kind of looking at ZeroMQ, nanomsg, Mangos, this type of messaging frameworks. What really sold us on gRPC - it was like a multitude of thin...
Again, we kind of started playing around and we noticed how easy it was to get mutual auth TLS off the ground... It's a really, really simple API that they have. You just dial up and provide your certs and keys, and everything just works.