Rebuild A Podcast by Tatsuhiko Miyagawa. Talking about Tech, Software Development and Gadgets.

Dec 17
2015

122: The Metal Is Dead (tenderlove)

収録時間: 52:27 | Download MP3 (38.2MB)

Aaron Patterson joins me to talk about HTTP/2, Rack and Rails.

tenderlove: Silence my phone, and watch.

miyagawa: You have to stand up every hour, right?

tenderlove: Oh yeah. Yeah.

miyagawa: (laughs) Do you stand up?

tenderlove: Yeah, I do. I'm trying to get like perfect score. I like the game system.

miyagawa: Controlled by the watch.

tenderlove: Uh-huh. Although, like, I'll be programming right, and then it will say "Hey, stand up!" And then I'll just stand up and run around, and Ebi's like "What are you doing?"

miyagawa: (laughs) That's every hour.

tenderlove: Every hour.

miyagawa: On 50th minute.

tenderlove: Yes.

miyagawa: I'm recording this on Monday after RubyKaigi. We're doing this at my hotel room near the venue of the Kaigi. And here's the guest, it is a second appearance on my show - Aaron Patterson, or tenderlove. Welcome to my show again.

tenderlove: Oh, Thank you. Thank you for having me.

miyagawa: So, yesterday you gave a talk about Rack and HTTP/2. I don't think this is the first time ever you've given this talk?

tenderlove: No. First time in Japanese.

miyagawa: Right. I think you did a talk about Rack in general previously as well?

tenderlove: Yeah. I've been working on Rack for a quite while, but I mean basically dealing with API issues and stuff. But this is the first time we really focused on H2.

miyagawa: So can you dive into a little deep - what's the current state of Rack and H2?

tenderlove: Sure. Right now, most of the stuff I've done so far is pretty experimental. I posted some code up, a gem called ds9 - well it's not actually a gem yet, I haven't really released yet, it's just on my github. But it wraps up nghttp2 so that we can make H2 web servers easily. I integrated it in H2 web server with Rack - basically gave it a Rack API. I integrated that with Rails as well. Most of that was just for discovering what we need to do internally with Rails and Rack in order to support H2. I think I've figured out most of that by now.

miyagawa: DS9 is the ... web server?

tenderlove: Hmm, No it's not a web server. It's just ... so the kind of cool thing about nghttp2 is that it's ... the name is so hard to say (laughs) No, so the cool thing about it is it doesn't know anything about I/O or file descriptors or anything like that. Basically it only knows about the H2 protocol. So you can hook into anything that provides some sort of I/O interface. You can use this library with Puma or Webrick or whatever really.

miyagawa: OK, so ... currently Puma, Webrick and all the Rack web servers handle HTTP/1.1 and then convert it into a Rack environment, then call the app and get the response back from the app. You hook into the server side and the app side, to turn it into handling H2 in addition to HTTP/1?

tenderlove: Yeah exactly. At the time the connection is negotiated, we can determine whether or not they support H2 via the SSL connection. ... One thing I had to do was to add ... ALPN support or whatever to the OpenSSL wrapper in Ruby so that we could use it.

So right now, you can use ds9 now, but you can't tell if it's in H2 connection without using trunk Ruby.

miyagawa: OK. Trunk ruby?

Get Full Transcript