Interview with Evan Phoenix on Rubinius, Puma App Server, and Ruby VM design at RailsConf 2014

Interview with Evan Phoenix on Rubinius, Puma App Server, and Ruby VM design at RailsConf 2014

UGtastic Archive
Transcript Verified

The Conversation


Hi, it’s Mike with UGtastic. I’m standing here with Evan Phoenix who is a director with the Ruby Central and he’s an organizer with the RubyConf and the RailsConf that we’re at today. You might also know a little bit of his work inside of the Ruby community. He’s one of the few people that can say they’ve actually created a Ruby. He created the Rubinius virtual machine and the Puma web server and probably countless other things I can’t even think of, but those are pretty big things. But let’s start with the conference that we’re at today. First, thank you for taking the time to speak. Sure, my pleasure. So, RailsConf, how did you get involved in organizing? Sure, yeah. So, I’m a director of Ruby Central now and I got involved by basically being asked to do it by the previous directors who were Chad Fowler, Rich Kelmer, and David Black. So, they asked me if I’d be interested in being a director. They had done it since the beginning. So, since I want to say 2004 and they had decided like, “Well, you know, like it’d be nice to have some new people come in.” And so, yeah. So, I said, “Oh, it’d be great.” I was actually working on helping them out with RubyJung stuff at the time. And so, they said, “Well, you obviously care about this stuff. Do you want to be more involved?” And I said, “Sure.” So, yeah. So, that kind of brought me in, made me a director. And then quickly I realized that, “Oh, okay. We run these conferences now, too.” So, yeah. So, that’s kind of how I got involved. I was sort of recruited in, if you will. Yeah. So, I mean, you obviously to have that level of trust, you were already very active in the community at that point. Pretty active, yeah. Yeah. Were you mostly working in open source or were you like volunteering at conferences? It was mostly in open source. Okay. I had certainly been to a lot of conferences. I’d been to plenty of RubyConf and RailsConf and regional conferences and international ones at that point. Not helping out a ton, mostly because I ended up speaking at a lot of the conferences. So, I wouldn’t have that be my focus. Not what I do now, which is running around and making sure that the conference is actually going well. Do you have coffee? Exactly. Is there enough coffee? I know the internet’s down. Right. That’s exactly right. Let me look at it again. Yeah. Okay. So, yeah. So, I hadn’t really been involved in the actual volunteering and that kind of stuff, but I certainly helped out. So, you know, the Ruby conferences are, you know, very much a community affair. So, you know, I’d been at those guys are my friends and they’d been working on Ruby conferences. And so, occasionally I was like, oh, what do you need help doing? And I would help out just doing whatever. So, I was fairly, I was aware of the logistics, you know, it wasn’t a totally closed idea to me. I knew, okay, there’s this and there’s that and that kind of stuff. When you moved from being kind of in the code or just kind of helping maybe set up and things like that, and then being thrust into an organization. Right. Well, I mean, how much of a shock was that to your system? It wasn’t too bad. I mean, I think that, you know, we kind of, we did a little bit at a time. I think that the first big one, the first thing that we were like, okay, wow, was the 2011 RailsConf. It was the first one that O’Reilly was no longer a partner with Ruby Central on it. And we kind of, like, you know, I wasn’t really aware of the, you know, the, you know, I wasn’t really aware of the, of, I didn’t, this, that was my first time doing that conference. And so there was a lot of things that we were like, oh my gosh, we have no signage. And it’s two weeks before the conference. So we were like, quick, do a bunch of signs and we need a t-shirt real fast, do a bunch of t-shirts, you know? So that was a little, there’s these times where it gets very hectic. And we’ve actually gotten a lot better with managing that kind of stuff now. But it wasn’t a huge shock. You know, it’s, you know, managing expectations is sort of what making a conference is all about. Honestly, having an open source project is a lot about managing other, your users’ expectations and that kind of thing. So it’s not totally dissimilar. Yeah. Has it changed your perspective of running and organizing? Has it really changed if you go to other conferences? Do you look at them a little differently or? Oh yeah. It, you, one thing that we, the organizers that we were talking about is whether or not we feel like the conference has gone well, right? That’s a thing that we’re constantly asking ourselves and asking each other, you know, are things going okay? And that kind of stuff. And it’s funny, we can’t, our opinion is actually really bad on whether or not it’s going well because we only see the warts. We only see the stuff that doesn’t work because that’s the stuff that gets brought to our attention. The stuff that does work really well, people are like, oh, that was great. They don’t, we don’t really hear about that kind of stuff. So we actually have to like, go ask people’s opinions. How’s the conference going? Um, I think that, uh, so now when I go to other conferences and I see what’s going on, I’m much more attuned to like, okay, they’re having a problem. I can tell the way that they’re acting. Oh, there is a problem over here. And I don’t know how to deal with that, but I can tell sympathy. Exactly. Right. Yeah. Yeah. And, uh, and the other thing is, is, um, like in a false project where you’re, you’re working, you’ve got the people complaining and most probably are the ones that are most in your face. I mean, you’re working on a project that’s, it’s very, very visible. And then every time somebody gets frustrated, they’re like, I’m not. Yeah. Yeah. Yeah. This thing doesn’t work at all. Yeah. Yeah. Yeah. And, uh, uh, so you might feel a little bit more, you know, working in open source, you’ve maybe developed a little thicker skin. Oh, sure. I’m sure. Absolutely. Yeah. So you’re able to look at it a little bit more in context. Yeah. It doesn’t really get, you know, when people say like, oh, this doesn’t work or whatever, it doesn’t, it doesn’t get to me. I mean, like, I’m interested. I want to know, like, cause I want them to be happy and I want to know why it doesn’t work. Like what’s the exact circumstances. But, um, over time I’ve, I, I’ve allowed myself to not to, for my emotional state to not be a reflection of those other, those other people’s emotional state. So that when they’re mad, it doesn’t make me mad. I just go like, okay, I understand that that’s a problem. You know, we’ve got to help them fix it, but I don’t get all riled up. Well, and like, even I chatted with DHH and Aaron Patterson about knowing that you have a project that people might be sticking their career, you know, not careers on a job. Um, you know, how does that, um, cause we’ve got a segue to here, uh, the, uh, you know, knowing that you, you’ve created something that many people are paying their bills with and doing your work. Yeah. And then does that ever, uh, weigh on you or does it, or is that, um, it doesn’t, I don’t think it doesn’t really weigh on me. I think that more it’s exciting for me more than anything else that, you know, like we have, uh, cause I think that, I think if, if people didn’t set out, weren’t so adamant in telling us that they felt like the conferences were going well, I think it would weigh on me a lot more. But I think that the fact that people feel people come up and tell us that the conference is going well, that there’s all these great talks and that kind of thing. And I had somebody, somebody tell Marty, who’s one of the directors say like, uh, you need to pick not such great tracks and put them all together at the same time. Cause I can’t figure out what talks to go to. Right. When we hear that, you know, that, that kind of means, you know, there’s always going to be problems, but when we hear that from a lot of people, um, the way of knowing that, like, you know, we have a duty, if you will, um, is it’s, it’s an energizing, it’s a vigor anymore than it’s a burden because we know that like, you know, we can help, we can help make the community better and keep it, uh, a certain size and keep it going. And, um, that will make, that will allow other companies to, to do more rails projects. And the people at our, at our conferences will get those jobs. And, you know, so I think it’s, it’s more like, uh, we’re happy that it’s, that it’s going as well as it is. And, you know, thinking about people who are critical, you know, sometimes the loudest, usually almost always the critical ones are the most loud. Um, and I just, you know, again, we’re moving towards the, uh, open source stuff because you’re in a unique position to have something that some people view, you actually have two products that people might look as competitive. Sure. So Rubini is competitive to J.Ruby, competitive to MRI, um, Puma competitive to, uh, uh, unicorn. Well, that’s the big one then, you know, but, um, and so that’s a unique perspective that I’d like to ask about is, you know, how do you feel about looking at J.Ruby and MRI? Sure. Yeah. I think that it’s funny, um, this, they’re working in Rubinius for as long as I have, that was a big question or, um, that’s always been a big question, you know, like, are you got, do you guys fight a lot? You know, like, uh, are you mean to each other? And I think that, um, within, uh, the Rubinius, J.Ruby, like all of the Ruby implementations, even the ones that are much smaller, Rubinius isn’t huge, but even the ones that are much smaller, um, those, uh, all of those, uh, everybody is very, we’re all like comrades. We’re all very, we’re all friends. We all talk about what’s going on because we all have different things to bring to the table. We’re not building exactly the same thing. Um, and so that allows us to, um, uh, that allows us to sort of be friends, talk about solutions. How are you solving this other thing? And the other thing is that, uh, it’s good that we’re friends because it can be kind of lonely. Otherwise, right. There’s not a lot of people doing that work. You really want to have somebody else to talk to speak. That’s exactly right. That’s exactly what you’re talking about. Right. And so if, if we were, you know, if we, if we weren’t friends, if everything was like a constant butting of heads, then it would be, yeah, it would be this very isolating thing, but because they’re all sort of, uh, yeah, like I said, we’re all friends, so that makes it better. So when people, is it, it’s never like, uh, you just want people to stop doing these comparisons or, or do you think that there is another valid, like, so that way people can weigh their situation? Yeah, I think if the people stop doing the comparisons, then there’s probably not a option that probably means there’s only one thing. Right. Um, and so you want the comparisons because it means that people are looking at them and they’re saying like, oh, okay, well, should I choose this one or should I choose this one? And what does this give me that that doesn’t give me? What are the trade-offs? And I think that you’re always going to have the comparison. You want the comparison. I mean, you know, there’s a million different cars out there and that’s all people do is compare cars. Uh, which car should I get? That kind of thing. Right, right. And you want that. All the car companies want comparisons because it means that, um, they’re, they’re looking at their, their other, you know, it means that there’s sort of a, um, a healthy ecosystem of choice for these things. And that you can figure out how to compete on features. Absolutely. Yeah. You want, and you want to compete on the things that matter for the users. You don’t want to compete on like, oh, or a sabotage of the project. Right. You want to, your, your, your users say, okay, well, we really love something like this. And you say like, okay, well, I’ll go add that for you or whatever it might be. Um, that’s, that’s where you want to compete. You want to say like, okay, we’re giving people what they want and that’s, you know, who can give that the best or the version of it that, that, uh, you know, some, some set of users want the most or whatever. So, so, you know, and, and again, because I, the, the campuses are fascinating, but the reason why I’m so excited to talk about, uh, Rubinius is that we’re here about Ruby and that, and that’s, that’s, and, and, and it is Ruby. So I also just want to also understand about how you, uh, your path to creating a VM. Sure. Not, not just the Ruby specific one, but was that your first implementation of something like this? Um, well, okay. So Rubinius is actually on its, um, it’s currently two sort of virtual machines because it’s got a JIT in addition to the normal virtual machine, but it’s the really the third code base for the same project. Okay. So, um, the first two, the first one, okay, well I’ll go back to the beginning. So I got involved with doing it because I was always liked, uh, like languages and virtual machines. I thought that was a very interesting part in computing, um, uh, because it’s like this building block, if you can make it really good, if you can make it really sound and interesting, then you can, can build anything on top of it. Right. And so, um, I started off, I was just kind of interested in it and a friend of mine, Ryan Davis, uh, said, suggested that I get the small talk blue book, which is this sort of canonical book, uh, that the second half of it is just a reference for how to build a small talk virtual machine. And it was, they, it was a reference for a machine that they never built. Someone actually has translated it. Squeak was actually a translation of that thing. But it was just, it was, it was for documentation. It was like, okay, well this is how you do this. And when all the documentation was so wanting to be like, it’s, it’s a documentation of something that you’re saying that doesn’t exist. They never, they never use the code that’s in there. In fact, there’s all these, there’s all these typos in the code itself, which is fine. You know, uh, but it’s all written in small talk as well. So they, they didn’t have small talk to write, to run this thing because they wrote it in small talk. So of course it was just for documentation. So, um, so I got that and I was like, okay, it’s so easy. Like I can read the thing and I feel like, okay, this is what, this is what the bytecode looks like. This is how you dispatch the bytecode. This is how, when you call a method, what would you do? So I really just translated the blue book into my own virtual machine. I wrote all in Ruby. So it’s the first version of Ruby. I said, it’s actually the first 50 commits or something in the Git repository. You can go back and look at it. The implementation of the small talk VM. Well, it was for Ruby, but it was for Ruby. It was, it’s basically the techniques, the exact ideas that were in the small talk, but for Ruby. Um, but it didn’t run very much. I mean, it was like, it had its own, um, it, it did have a very simple garbage collector. It had, uh, a bytecode virtual machine. It was super, super slow because obviously I was running it in Ruby and just running it, uh, on one, eight, two, I think was the Ruby at the time. Um, so I did that and then I, um, I was just very interested in, and then I got accepted to talk about it at, um, RubyConf Denver 2006. No, yeah, 2006 or 2007. I can’t, I can’t remember. Um, anyway, so, and I realized that I couldn’t present this thing that was just all Ruby and super, super slow. People were gonna be like, oh, this is very cool. How can I use it? And I’d be like, you can’t use it at all. I suggest you never use this thing. That would be really kind of a bummer. So I translated it into C just like hand translated it, read the Ruby, wrote the C, read the Ruby, wrote the C. And so that was the first version of, of Rubinius that was, um, that you could sort of general, you could sort of use. It was still pretty slow. Um, and we kind of built up, uh, techniques and we did all kinds of stuff on top of it, um, until about 2008, nine. And when we translate it into C++, we changed a bunch of things when we did that. So that’s, so it’s, it’s been, it was Ruby and Ruby and then Ruby and C and then Ruby and C++. Right. Okay. So it’s, so what’s next for Clojure? I don’t know. I have no idea. Uh, yeah. ADO. APL. I don’t know what APL version that’d be fun. No, it’s one long line. Okay. So you’re, you’re obviously, you know, very passionate about creating these, these, uh, concurrent, I mean, a multi-threaded, uh, VM. Yeah. Uh, and, and, and people always are looking at Ruby and say, well, it’s got the GL, the global interpreter lock. Um, and, uh, you know, that you have to have the fork processes, but look at JRuby and Rubinius. Yeah. So now you’re, you know, you’re actually in a way going head to head with Java. Yeah, absolutely. 100%. Yeah. Absolutely. Which is, you know, that’s scary. Yeah. Yeah. Yeah. Yeah. If you start crying, that’s okay. I appreciate that. You know, cause I mean, it’s a huge mega corporation, but, um, so, you know, it’s pretty obvious that you’re, you’re passionate about creating performance, uh, tools that we can use to, to run code on. In 2014, if I’m looking at Rubinius, can I look and say, yeah, I should maybe look at this and try to see what I can do with it. Maybe look at my production systems. Absolutely. Absolutely. I mean, I think that there are so places that it’s slower, um, than even MRI. There’s a lot of Rails code that does things that kind of confuse the, the, the, the JIT compiler. Um, but, uh, I, we have, we have users that use Rubinius for very specific workloads because, uh, they control enough of it that they can basically make it, they, their Ruby code can run extremely fast inside Rubinius. We have like high-frequency traders or people who run workers with just like the background workers. A lot of times people run background workers with Rubinius that aren’t running inside Rails and they’re doing something that’s like, okay, well, I’m going to go off and do the, with this big calculation. And then they’re like, well, I’m not going to go off and do the, with this big calculation, whatever I want to do. I do that in Rubinius and it’s super fast. And again, there’s sort of like kind of get the best of both worlds in that way. And that, cause it’s funny you mentioned that cause we can actually, it’s might come as a surprise, but we can actually run other stuff on Ruby, not just Rails. Right. Right. Exactly. That’s exactly right. Yeah. Yeah. No, I, I, you did say something though that I want to hook onto with, I asked this question to DHH earlier about, um, you know, because he is openly critical of certain companies that, you know, just so happen to use Rails and make a lot of money with it. And then you mentioned the high frequency traders, which are controversial. Um, you know, I, I don’t know what your feelings are regarding high frequency trading, but knowing that your tools are getting used to basically buy people’s islands, but they’re not necessarily keeping anything back. Okay. Um, you know, what, what are your thoughts? Yeah. I mean, I think that, you know, going in when I was, when I started writing a VM, um, I thought about this actually, I was like, okay, I’m going to write, if I really want to do this, um, and this is true for almost any job, this is not just true for a Ruby implementation. But some of you give away and you don’t. Yeah, absolutely. At least for a job, I’ve got a paycheck. Yeah. Yes. Uh, it, um, I think that you, you go into it saying that like, you know, the, if my license is such a way that I want, I want people to use this independently, depending on whether or not I agree with the way that they’re using it, you have to kind of like, sort of, you know, kind of check that at the door. You have to say like, look, uh, there’s always going to be those people who are going to do something with it that you don’t, that you would not do with it. Right. That doesn’t mean that your thing is not good and that you shouldn’t not do that because, oh, someone might use it in a bad way. It’s not a nuclear weapon. It’s not nuclear, you know, that kind of thing. It’s just some software. If you don’t do it, somebody else will do it. It’s not like this. This vacuum of software out there. So, um, I think that I’ve kind of come to the, the, the conclusion that it doesn’t, I can’t, I have no controller for that. Right. I have no control over what, how people are going to use it, what they’re going to use it for, whether or not I agree with what they use it for. And so, um, I can’t really allow myself to worry about that. That’s just like, that’s the world that’s going to happen. That’s how it goes. And just a funny anecdote is I, I had a friend, um, I have a friend who was, was listening to a Senate, uh, judiciary hearing, uh, against some company for a company he worked with. Uh, and they were having to explain their algorithm and he’s sitting there watching and he’s with his daughter and he says, daddy wrote that. Wow. That’s amazing. Yeah. And he’s listening to these people talk about this anti-monopoly, you know, I don’t, I don’t, I’m not going to say who or what. Yeah. Yeah. Yeah. That’s super interesting. But you know, hearing about, you know, DHH complaining or comment commenting on certain companies and you mentioned the high frequency trading, it’s like this stuff can get used in ways that maybe aren’t anticipated, but you kind of just have to let it go. Yeah. I mean, I think for me, I think the way that I, the way that I come to terms with it is just to think that, um, if, uh, if I’m making my users happy, whatever they do with it, I sort of, that’s fine with it. I, again, I can’t control that, but I still want to, I still am beholden. I hold myself beholden to the users who work this thing, you know, so I’m going to use it too. I’m a user as well, but those people’s opinions matter as well. So I want to, if they’re happy with what’s going on, then that, that I’m fine with it. And I have to just sort of end there. I can’t get into the deeper, but what are they actually doing with it? I can’t, I can’t do that. So. Right. And, you know, just coming back to the conference, uh, you know, 2014 is wrapping up, I mean, or not 2014 in general, but the RailsConf 2014 is wrapping up today. Are there already plans for what’s next or Chicago? You’ve all over. Yeah. So we’ve got RubyConf in November coming up. That’s in San Diego. Okay. And then we have RailsConf 2015, which we’re going to announce the location for, um, at the keynote this afternoon. Great. And then, uh, yeah, we’re good. So it’s live in wallets. Yeah. Oh yeah. Yeah. We’re, we’re going, everything’s good. You know, um, I think that people have asked us, you know, like, Oh, could the conference be bigger? Is the conference growing? Okay. And, you know, we sell out that we sell out both conferences every year and RailsConf only sells out a couple of weeks before the conference actually starts. But that actually tells us that we’re probably exactly the right size. Okay. Cause, um, if we weren’t selling, if we weren’t selling out, we’d know that we’re probably buying out, you know, we’re a little too big. If we sold out too early, maybe we’re a little too small, but we’re kind of where we are. We’re kind of in this sweet spot, I think. Um, and there were a lot of new people at, uh, at this year for RailsConf, which is super, super important. We know that the community is healthy. We know that there’s new people coming in. Um, you know, at some point I’ve told this to other people at, um, at some point there will be a decline. I don’t know when that’s going to occur. I don’t know what it looks like, but I know that having new people come in, be it in the community, be at the conferences, uh, will delay that decline all the time. So it might come someday, but it’s, well, eventually there was going to be the heat death of the universe, but not, not, not this year. Right. All right. Well, thank you very much. Absolutely. My pleasure. Appreciate it. Sure. User groups, with lots to say interviews and more, no way. Sharing great ideas in the tech community. Fascinating conversations, a plethora of information. Find out for yourself today at uktastic.com.