13: Gatsby and GraphQL with Kurt Kemple
Michael, Michael, and Kurt talk Gatsby, GraphQL, debugging Node, gaining buy-in on big teams, and the future of Gatsby.
Featuring
- Kurt Kemple — Twitter, GitHub, Website
- Michael Jackson — Twitter, GitHub, Website
- chantastic — Twitter, GitHub, Website
Links
- Implementing GraphQL at Major League Soccer
- NODESOURCE
- 5 things they don't want you to know about React-Apollo
- GraphQL NYC
- I'm fucking depressed, but it's going to be okay
- Up and Running with Universal Components
- Lona Tools for building design systems and using them to generate cross-platform UI code, Sketch files, and other artifacts.
Transcript
[00:00:06] Michael Jackson: This episode of the React Podcast is brought to you by reacttraining.com. In-person, hands-on training for development teams from React community leaders and experts. Visit reacttraining.com to learn more. Hello, everybody, and welcome back to another exciting episode of the React Podcast. I am your host, Michael Jackson. I have my my co-host with me here, Mr. Michael Chan. Hello. And we have a very special guest with us today, Mr. Curtis Kempel. Welcome to the show, Curtis.
[00:00:40] Kurt Kemple: Hello, hello.
[00:00:41] Michael Jackson: Kurt is joining us from Virginia Beach, from his new digs. He just just bought a home. What was it, like last week, Kurt?
[00:00:49] Kurt Kemple: Yeah, yeah, signed at the end of last week.
[00:00:52] Michael Jackson: Dude, congratulations, that's huge.
[00:00:55] Kurt Kemple: Yeah, it is, it's huge. Thank you so much. Uh, it was definitely a rough 5 months and and even rougher after the signing, but Oh my gosh. Powering through and love it, yeah.
[00:01:05] Michael Jackson: Oh my gosh, dude. So I bought a house like uh just just last year actually. And uh the whole thing, the whole thing was so stressful for me. I felt like curling up into a ball sometimes and just like crying. In fact, my wife who is like much more like, I would say, stable than I am, just like just like mentally, she's like a rock. And she was like, you know what, I got this. I'm gonna handle this. So she did she did the whole thing for me, basically, and I was like, thank you so much. Thank you.
[00:01:38] Michael Chan: Dude, it is stressful.
[00:01:39] Kurt Kemple: That's amazing.
[00:01:40] Michael Chan: The whole like loan process. I, um, we refinanced our house one year and there was some other stuff going on in my life too. But, um, when I, uh, when we refinanced, I got shingles. Like we finished the refinancing process and it's like, I don't know, supposedly it's like, uh, what is it? Chickenpox, but like their revenge. And you can get it by getting too stressed out and it comes back out, out in your system. It was, it was the most pain I've ever been in all. Related distress of freaking refinancing a house. It was stupid.
[00:02:10] Kurt Kemple: Yeah, that's horrible. Yeah, but that about sums it up, right?
[00:02:14] Michael Chan: Totally.
[00:02:16] Michael Jackson: Well, well, congratulations on making it through the gauntlet, man. That's huge. Yeah. I saw a tweet from you where you were like, uh, it was something like, "5 years ago, I could have never imagined that like any of this would have actually happened." So yeah, you still feel like uh still feel like grateful to be kind of where you are and everything. I thought that was that was really cool.
[00:02:39] Kurt Kemple: Oh, absolutely. Uh you know, I grew up really, uh really poor. Um you know, struggled through most of my young adult life, uh struggled with uh drug addiction, a lot of other problems. And just like at that point, depression. Uh I didn't see like a future for myself. It was more of like a day-to-day. Uh never really thought about a family or or owning a home or you know, any of those type of of uh things that I guess you would call adulting. Uh you know but uh yeah and you know here I am, the the exact polar opposite of of where I used to be. Uh and this was just like a monumental success of mine. It was one of the goals that I set for myself once I I flipped around was uh you know start a family and be able to provide uh for that family. So yeah, it's it's very uh interesting and surreal. Still doesn't feel real at times.
[00:03:31] Michael Chan: Man, that's amazing. Could could you tell us a little bit more about that? Like what is- so so I imagine that um that kind of all of your you know program experiences has changed some of that for you, but could could you elaborate on kind of your journey over the last handful of years and how that transition happened?
[00:03:49] Kurt Kemple: Yeah, so I mean, it's really, you know, the transition happened about like 7 to 8 years ago, really. Um so yeah, I got into a lot of trouble when I was about 22 years old. I wrote a blog post about this. This as well on Medium. Um, but yeah, so I actually uh was incarcerated, and I was incarcerated for about 6 years. Uh, and then uh I was released in 2010, January. I'll never forget, I got introduced to programming in prison. Uh, and uh it changed and saved my life, pretty much. Uh, not to take away from the hard work or the help uh that I received. Uh, definitely received quite a bit of help, but really, I I feel like uh without programming, I wouldn't have been able to turn my life around as quickly or as successfully.
[00:04:36] Michael Jackson: Thank you for sharing, Kurt. So you, uh, last time I last time I met you in person, we were hanging out, we were having pizza in New York City. You we were we were at Eataly and you were working at Major League Soccer at the time. You were uh you were doing a lot of GraphQL work there, as if I recall. In fact, You uh you head up the NYC GraphQL meetup, is that right?
[00:05:03] Kurt Kemple: Yeah, so I mean I I've just recently handed that off to uh some other awesome folks because you know I'll be in Virginia Beach majority of the time now. But yeah, yeah, so I started up the GraphQL meetup uh because we adopted GraphQL at Major League Soccer. And uh it was you know it still is in in a lot of ways kind of like the Wild West. And so there wasn't a ton of information floating around. And um I really don't like to work like in isolation or in a bubble. And I always want to check what I'm doing against what other people in the industry are doing. So I actually started the meetup to try and and convince and get people out uh in in the New York area talking about GraphQL and how they're using it or plan to use it.
[00:05:42] Michael Jackson: That's perfect. So you you use the meetup as kind of like a sounding board, let's share some ideas. Uh who who else did you find in the local community that was uh that was using it in uh in New York City? I'm sure Jared Palmer was there.
[00:05:55] Kurt Kemple: Oh yeah, yeah, absolutely, yeah. So Jared Palmer, uh New York Times, uh Artsy, uh just, I mean, the list goes on. There's a ton of companies uh utilizing GraphQL or like on the verge of utilizing GraphQL. Uh Priceline is another huge one. They're really involved uh in the meetup there. Uh of course, Major League Soccer. Uh yeah, but they're— you know, uh the list goes on. It's honestly hard to name them because there's so many. Mm-hmm.
[00:06:23] Michael Jackson: And so, were you building out like an API or something at uh at MLS in in this GraphQL? Is is that what uh is that what you were using it for?
[00:06:33] Kurt Kemple: Yeah, yeah. So I was actually hired as the tech lead of the UI team, and uh Major League Soccer started internalizing their tech. Everything was pretty much uh outsourced prior to my hire.
[00:06:44] Michael Jackson: Got it.
[00:06:45] Kurt Kemple: And we also hired um in-house designers, and as part of that, they wanted to essentially build a design system, revamp the UI. And when I got the first project uh for our new scores and schedule page, uh I noticed like there was a lot of cohesion, uh uh as in like the the data on the front end was displayed like it all came from the same place, but it was actually coming from like 4 or 5 different APIs.
[00:07:09] Michael Jackson: Got it.
[00:07:10] Kurt Kemple: And I was like, okay, so this seems like the right time for uh GraphQL, let's take a look. Uh spun up a you know a little spike, put it in front of one of our existing REST APIs, uh and everybody loved it. So once I got the buy-in, yeah, then we we built a API gateway uh that all of our like downstream, or now all of their downstream uh UIs use.
[00:07:34] Michael Jackson: Sounds like the perfect uh use case for GraphQL. I see a lot of people doing that type of thing, sort of piecing together multiple different APIs, multiple different endpoints uh into one GraphQL uh server.
[00:07:46] Kurt Kemple: Yeah, exactly. Uh it it's a great use case. The way I like to think of it is that um instead instead of having to adhere to like the schemas, like oftentimes when you build a REST API, in ways you're still very adhered to the underlying schema of your data, uh even how you structure those relationships, and with With GraphQL, because you get to define literally any any schema structure that you want, uh yeah, it's a really pleasing experience because it allows uh you to cleanly break away from the backend and say this is the frontend's concern, uh and here's the schema that we need to in order to move quickly.
[00:08:24] Michael Chan: So, in terms of pitching this to your company, um what did you find the most valuable uh kind of like aspects in terms of— like it sounds like obviously just hitting hitting one endpoint for all of that data and having that kind of make decisions about where to fetch the data from was huge. Um, but for someone who is looking to uh kind of get their company transitioned to uh GraphQL, um, what would you recommend to that person uh trying to implement it or get it started or kind of get it into their app for the first time?
[00:08:54] Kurt Kemple: Yeah, sure. Uh, that's a great question. Uh, and it's I'm glad you asked. Uh, please stop me if I derail too long. But this is a really uh good topic that I love to talk about. And it doesn't just apply to GraphQL. But it's just like how to get buy-in in general. So, as the tech lead, this was my sole job, was to evaluate uh existing and upcoming UIs uh or clients and and kind of envision what a revamped uh tech stack looks like, get the buy-in for that, and then build a team around it. So, I did that with the first project, which was Scores and Schedule. I did it with uh Amazon Fire TV app. Uh I did it with that GraphQL API, and then again with the React Native app. For mobile. So I had to do this multiple times. So I started reading, like at first I was having a lot of difficulty. I was at a company that's used to dealing with contractors and like set deadlines and not really internal teams like spiking, prototyping, building, presenting, and getting buy-in.
[00:09:54] Michael Jackson: Yeah.
[00:09:54] Kurt Kemple: So it was a very interesting dynamic. So I wanted to make sure that I was very careful about how I approached this. And so the the few things that I recommend is first off, know your stakeholders. So there's gonna be multiple different groups or people involved, and you have to know what each one of them, like what their investments are in in the project. Like what is the benefit that they'll get? Because what design cares about, uh you know, product might not care about, and what product cares about, engineers might not care about. So the first thing is like knowing who's invested and why, uh so that you can figure out what it is about your solution that tailors to them, or just make sure that like your solution actually does tailor to everyone involved. Mm-hm. Uh, you know, and so then when it comes to actually getting the buy-in, I'm a firm believer in like building the outcome. Like let let people, like words are very hard uh at times for people to like grasp or get excited about, but I feel like when you hand them something tangible, uh it becomes a lot easier to show like what the benefits are, 'cause they get to play with it, they get to experience it. So for GraphQL, uh for the front end, I was able to just show how easy it was to query for data. And pull that in. I did that building like a little React example, talking to one of our our APIs through GraphQL. Uh and then for the backend engineers, I showed them how uh easy it was to co-locate data as far as like resolvers. Once I got them understanding resolvers, it was pretty easy to get the buy-in. Uh and then uh for products, I spun up uh GraphiQL. So our product team loved to have like these uh API browsers, which were entire apps that people would build. Yeah. Developers would build, like a 2-person team over 2 months building this browser so you can explore an API. Uh and with GraphiQL, you get that for free, right? So so it was just targeting the specifics that they would want. And so then the question becomes not like, well, what is this? Or what problem is that? Generally, it's like, oh, like how quick can we start using this? So I I've found great success with just trying to build like a micro example.
[00:12:00] Michael Jackson: Now, you've you've actually written uh I think that's so important, by the way, to to understand as an as an engineer, which probably the majority of people listening to this podcast are are in engineering, uh how to get how to really get buy-in and how to understand your stakeholders and and and speak to their needs and get them excited, get them on board uh whenever you're undertaking a project like this. So many times, uh you know, the engineering just engineering decides, well, we need a rewrite or we need a whatever, and they don't really explain it that well to the rest of the company, and so then the rest of the- there creates a lot of friction there, right? Yes. And it creates a lack of trust. Well, why is engineering taking so long uh doing this thing?
[00:12:42] Michael Chan: Yeah, I'm always I'm always interested, and and that's why I asked, I'm always fascinated, uh you know, when you hear those success stories, um you know, part of it is obviously the tech. Like if if if the tech's right, that makes it easier, um but But so much of it is, as you said, um being an advocate for change in general, um that you understand the problems of the other people on your team and the the the needs of the stakeholders. Um and it's just really interesting to hear you uh uh kind of echo that as as we've heard from a lot of people who are successful in making change or pulling for change, um that you really have to be familiar with the needs and and communicate in terms of what other people need.
[00:13:24] Kurt Kemple: Yeah, absolutely. I always like to say, you know, you just have to learn how to speak everyone's language. Uh, you know, and I I believe cross-functional teams are a really important part of that. I try and spend a lot of time working closely with product, with designers, with QA, with with any department that touches engineering essentially. Um, you know, because uh you can't understand their problems if you don't understand their workflows, and you can't understand their workflows if you're not like spending time with them literally while they're working. You know, because a lot of times that stuff is undocumented. Uh, and so, you know, uh, if if you're not familiar with what's going on around your department, I, you know, it's hard to make your department successful.
[00:14:05] Michael Chan: Totally.
[00:14:07] Michael Jackson: So, uh, so you've actually written uh quite a bit about your experience with GraphQL. You had a a post on the Apollo blog. Um, let's see, this is uh about a year ago, actually. You had a post on the Apollo blog, 5 Things They Don't Want You to Know about React Apollo. You were talking about pagination, you're talking about, uh, you know, conditional data fetching, batching of requests. So you you learned quite a bit about, um, you know, about, I guess, the specifics of Apollo's implementation of GraphQL, uh, along the way. If if I recall, when we were having dinner together in New York, you were talking about kind of an interesting, not really, uh, I guess I guess you could call it a bug, but it was kind of something that you ran into on a pretty high-traffic day uh one day at Major League Soccer. Could you tell us uh tell us that story?
[00:15:02] Kurt Kemple: Yeah, sure. Yeah, so uh this is actually a little more um on the backend, but still an interesting story nonetheless. Um but yeah, after building out that uh API gateway, um I I just learned a lot of neat little patterns, and and like it just really clicked for me, the expressiveness uh of like uh Apollo or other other really GraphQL clients and how they let you uh treat the data management almost essentially as like part of the UI in a way, which is weird and and some people dislike, but I kind of like. Um but not to digress too much, but yeah, so to jump on this, uh um you know, any any technology is new and uh you know, that is new and that you don't have a lot of experience and you have to uh know that uh there could be potential issues, right? And so, like, number one, having an environment where failure is okay and like not looked down on is important. And then the second thing is just being able to quickly work through issues. So I don't know if you're familiar with Aaron Hammer.
[00:16:05] Michael Jackson: Yeah, absolutely.
[00:16:07] Kurt Kemple: Yeah, okay. Yeah, yeah. So yeah, you know, responsible for getting Walmart onto Node. And as an early adopter, you know, he said something that resonated with me. You know, you know, if you want to like move faster and stuff, you can do that. And this is like paraphrasing, it's not an exact quote. Um, but like to do that, you have to be on the bleeding edge. But if you're on the bleeding edge, you have to understand that like you may hit issues, uh, and you have to either like work through them or like be willing to support the people who can work through them. Uh, and yeah, I successfully hit one of those issues. Uh, so Major League Soccer has uh uh this There's this big event, what they call a tentpole event, uh which is decision day. And on decision day, it's actually 2 days, oddly enough, not uh not just one, but on the first Sunday, half the teams play each other at one time, and then half the teams in the league, other half, play each other like right after. So say like 3 to 5, and then 5 to 7 PM. Uh so this is our second largest traffic day. The following Sunday is the full decision day where all teams play each other at once. So this is the most stressful time on the systems at Major League Soccer, uh because literally all teams are there, all the fans are in, like everybody is hitting the system at the same time. Mm-hmm. All the uh uh stats events are coming through, uh you know, so it's just a lot, a lot of traffic. So on the first Sunday, uh and we'd done some load testing against GraphQL, uh quite quite a decent amount, but you know, this is like heavy traffic. So yeah, so long story short, the first Sunday, everything seems fine, and then out of nowhere, the CPUs for our servers that are running GraphQL just start spiking and dropping, spiking and dropping. And then eventually, they they just start spiking so much, once traffic got enough, that they couldn't recover, right? So one would go up and spike and then crash, so we're just like in complete uh disaster mode at this point. You know, PagerDuty goes off, uh, you know, uh, the new uh scores and schedule page that uh is being powered by this is unavailable. So it was, needless to say, not a good day. Uh, so what happened was, uh, it was actually a misunderstanding about a tool called Data Loader, uh, which is pretty widely used with GraphQL. Mm-hmm. And so it's like I said, you know, it's not quite a bug, it was more of a misunderstanding. So, what DataLoader does under the hood is it actually uh like caches the promises that you use that represent like fetching certain data, right? So, like you choose what actually happens under the hood, but for our case, it was fetching data. So, let's say, uh you know, 10 requests come in for the same match. Because they go through DataLoader, it's just one promise is created while it fetches the data for that match, and then when it resolves, all of those uh you know uh callbacks would be fired, right? So if there's 10 requests, 10 callbacks are fired, and they all process the data. So what I didn't realize is that that is what was happening. It was caching the promise and not the data response. I thought it was like a quick cache where it just cached the data response and returned that, so it wouldn't have to hit the system. Mm-hmm. So what happened was, because we had such a high traffic volume, a promise would come in and there'd be like you know 100 or 1,000 or more requests waiting on it to resolve, and then it would resolve and then have to call all those callbacks. Uh and because that part was serial, so it would just take forever. Uh and so we would hit those CPU spikes. Uh so we ended up having to like implement our own internal caching that happened behind DataLoader. So then it went like DataLoader to the cache and then to the remote request. Mm-hmm. But I had to bring down uh the entire API, put up our old system that we still had running just in case of emergencies like this. And then I had one week to figure that out, get a caching layer implemented and documented before the actual decision day. So that was a very very stressful week, very long hours.
[00:20:13] Michael Jackson: So so how did you how did you figure that out, man? I mean, how did you how did you figure out that that was the problem? Did you uh
[00:20:23] Kurt Kemple: yeah. So the the first thing we did was at first we couldn't even tell that the CPU uh was spiking because it's GraphQL. And so, I mean, you can use Engine, uh, if you want to, like Apollo Engine, if you want to uh get tracing data about your resolvers, but there was nothing really like New Relic that we were using that could just tell us about the server. So all we knew was like our our our like lower level data, like in AWS or Sysdig, or you know, uh it's basically saying, hey, these servers, these CPUs running these containers are messing up.
[00:20:55] Michael Jackson: Yeah.
[00:20:55] Kurt Kemple: So that was it, right? So that's why we had to, we had no idea at first. That's why we we took down the API and put up the old system. Back in place. And then step 1 was actually use NodeSource. Uh, I got the I'd been trying to get Major League Soccer to uh uh get a license with NodeSource for quite a while. And then this was finally like, I I need this to see what's happening to uh the CPU. And so once I had NodeSource in, it was very easy. I spun it back up, hit it with load tests, way up the traffic in the load test. So I was spinning up large servers in AWS. And then just like bombing uh the API. And so once I was doing that, I was able to recreate those spikes, but now I had NodeSource, so I could do like complete introspection with with DTrace, right? So I just click on it and then it would you know spin it out for me and show me uh you know through which methods the holdups were in. And so then I would see that it was always after DataLoader, um that's where we would get the crazy spikes. So then that made me just dig into DataLoader source and I'm like, wait a minute, this is like not caching anything at all except the promises. So that means like as soon as it resolves, it just sends another promise. That's another thing. It was throttling our backends as well. Um, like the REST APIs. So all that stuff uh combined together was just like catastrophic.
[00:22:17] Michael Jackson: It's it's more like a- DataLoader is more like a mutex.
[00:22:22] Kurt Kemple: Yeah.
[00:22:23] Michael Jackson: Instead of an actual cache, right? Yeah. It's just like all requests that are coming to me, uh I'm only gonna let one through at a time, and then I'm gonna resolve them, but I'm not actually gonna keep the data around.
[00:22:34] Kurt Kemple: Exactly. Exactly. And so that was that was uh because it was always explained to me as a cache. And so again, another reason uh for prompting me to start GraphQL NYC. Uh you know, misinformation, not a ton of information around. Uh the README didn't really explain it. It actually kind of displayed like the language speaks like it's a cache. Um, you know, there is like a short video, so that's what I get for not reading the manual. Um, but yeah.
[00:23:01] Michael Jackson: Well, I've looked through the data loader source because I think I initially thought it was a cache as well, um, and I was like, oh, that's interesting, like that sounds like a lot of work, you know. And I looked through the data loader source and I and I obviously didn't didn't read it as uh as closely as you did, but it um it's just a single file, if I remember. It's just like one- yeah, it's just like one file. And I was like, oh, that's- these guys must be really smart or or this doesn't really do that much.
[00:23:33] Kurt Kemple: Yeah. Um, yeah, I thought it was— uh, because I did a first pass and I really just thought it was an in-memory WeakMap, which which is what it is, but it's actually just storing the promise, not the result of the promise. Yeah.
[00:23:47] Michael Jackson: Well, I was just gonna say, I think I could probably use some of that NodeSource magic on Unpackage.
[00:23:56] Kurt Kemple: Yeah. So, yeah, quick quick plug for NodeSource. Uh, it's it's amazing. It's it's really fantastic tool. Uh, that immediate introspection is great. Uh, you can set um like limits. Uh, so like CPU over 60% or memory over 60% or you know different things. Uh, yeah, and then it will just record the dump for you. Like just dumps, you know, um, all the information from Node and stores it for you. So you can go back and look at it anytime, or you can just click one and open it in real time and just get complete introspection, you know, from all the way from Node core through userland code. So it's pretty nice.
[00:24:33] Michael Jackson: That sounds lovely. I I I right now, I have I have these, um, you know, I have I so I'm moving, I'm currently working on moving Unpackage over from from Heroku over to Google Cloud just so I can like get some more details. And and they have this thing called Stackdriver, um which is which is up to up to this point is you know I've I've only used it just a little bit, but it's been pretty cool because it's it's you know instead of just having a raw log file, it's actually like parsing the logs and letting me search the logs and everything, which is really nice.
[00:25:06] Kurt Kemple: That's cool.
[00:25:07] Michael Jackson: Um but uh but I think the next step for me really is you know getting in and and and watching that that, you know, like what you're talking about, like watching a request come in, seeing the whole stack, all the all the different functions that are called, seeing where I'm where I'm taking my time. Um because there are a couple of errors that I'm I'm kind of looking at and I'm like, I'm not exactly sure where that comes from. And and at the at when you're at scale, it's it's hard to it's hard to know unless you get good tools. So I think I'm gonna talk to those guys. That's a that's a good idea. Good plug.
[00:25:41] Kurt Kemple: Yeah, exactly. Yeah, I would definitely recommend it. And you know, you hit the nail on the head. Without like the proper tooling in place at scale, it's about impossible to figure out what's going on.
[00:25:52] Michael Jackson: Yeah. Well, we've talked a ton up to this point about your experience at Major League Soccer, about uh all of your experience with GraphQL and stuff. But you recently just made a switch. Oh, yeah. Yeah, you you made a big switch, which uh which I think is really exciting, which I definitely want to talk about. You joined uh Gatsby Inc., which I think uh was announced just a couple weeks ago that that y'all raised like, I think it was I think the round was like $3 million, 3 plus?
[00:26:23] Kurt Kemple: Yeah, it was over 3, yeah.
[00:26:25] Michael Jackson: Yeah, which is awesome. So that gives you quite a bit of runway to make, uh obviously Gatsby, if if uh in case listeners haven't heard of it before, they've probably been living under a rock, Gatsby is the uh static site generator for React. It's uh it's been used on quite a few uh high-profile React projects. Uh the the one that I'm most familiar with is, I I think, the new reactjs.org project that launched uh about a year ago now was done with Gatsby. Um but I'm sure it's been used on on much bigger sites than that that I'm that I'm probably not familiar with. Anyway, Kurt is part of the founding team, part of the- I think there are 6 people there at Gatsby right now?
[00:27:05] Kurt Kemple: So I think technically right now we are 8. Okay. It might be 7. And you had a- I think we're like on the border of 8.
[00:27:13] Michael Jackson: You had a kickoff meeting in uh in Europe somewhere, right? You were all-
[00:27:18] Kurt Kemple: Yeah, in Berlin.
[00:27:19] Michael Jackson: Yeah, you all went to Berlin and partied for a week.
[00:27:22] Kurt Kemple: Yeah, yeah. If by party you mean uh code furiously and prepare for a release and then basically pass out. Shortly after. That's exactly how it went.
[00:27:34] Michael Jackson: Well, that's awesome. Tell us a little bit about, uh, first of all, a little bit about your, uh, you know, your experience at the at the at the launch, and then uh and then a little bit about uh Gatsby itself. So, so uh what was that what was that kind of like? You you guys were just kind of uh just kind of syncing up, you just raised a round, you're getting ready to kind of push forward and and make a big push on Gatsby. Gatsby. Um, you know, Kyle was there, I'm sure. He's the the the the CEO. Kyle, by the way, is a a friend of mine from uh from my BYU days. He and I have have the same alma mater.
[00:28:09] Kurt Kemple: Yeah.
[00:28:09] Michael Jackson: And uh and so so you guys were all there, your programming, your your coding. What was that like?
[00:28:14] Kurt Kemple: Oh, it was great. So uh Gatsby is a remote company, uh but we we do a gathering uh once a quarter. And so we try and like target uh you know larger things that we need to focus on and save for that time. Uh and so yeah, of course, company launch is a perfect fit for that. Um yeah, and so because we're also remote, uh we have people in Europe and the United States, so jumping back and forth is nice. So like the last one was in San Francisco, then this one was in Berlin, so next one will most likely be in the US or somewhere on um. Uh you know, uh like South or North America, somewhere in that area.
[00:28:52] Michael Jackson: That's awesome.
[00:28:53] Kurt Kemple: Yeah, but sorry. Yeah, yeah, it is. It's awesome. I love it. Uh I love being remote, which is what enabled me to purchase a home and move uh to Virginia Beach. Uh I mean, that was kind of already in the works for like some other reasons, which is the main driver for me leaving MLS. They uh currently don't support full remote. Uh yeah, so that's what really like put me on the market. And then uh I was on the market and Kyle reached out to me and Sam, who's the other co-founder. And they were like, hey, we just saw that you're on the market, which is really odd because we were just talking about you and we're saying how awesome it would be if you could join Gatsby, but you're at MLS.
[00:29:32] Michael Jackson: Oh, no way.
[00:29:33] Kurt Kemple: Yeah, yeah. And so, a little uh backstory to that is uh I was actually investigating Gatsby at Major League Soccer for the mlssoccer.com property, which is like the main content site for MLS. So, you know, so there were some problems to figure out to solve there because that's like a million-plus-page site when you roll back like all of the content back to 1996. So, uh, yeah, so there were like some problems there. So, you know, dealing with Gatsby and a site at that size. So I was talking already very closely with Kyle about like how we could make that happen. And so that's how that's how we actually met and that's how all that started. Um, yeah, so to jump back in, yeah, so the the week in Berlin was amazing, we got to meet. Uh, so uh Contentful, I don't know if you're familiar with them, but uh headless CMS company.
[00:30:23] Michael Jackson: Mm-hmm.
[00:30:23] Kurt Kemple: Um, and uh it's very common to pair Gatsby with Contentful. They they work really well together. Uh, and so we see a lot of that. So anyway, they're they're located in Berlin, so we got to meet up with them. Uh, we got to meet up with the Prisma team, uh who I don't know if you're familiar with them, but they do a really nice work uh in the GraphQL tooling community as well.
[00:30:44] Michael Jackson: Yeah, I'm gonna get, I'm gonna get, uh, oh gosh, what's the founder's name? Uh, but anyway, I'm gonna get Prisma on the show before too long. I've been talking to them.
[00:30:53] Kurt Kemple: Yeah, yeah, absolutely should. They're uh really stand-up smart people. Uh, I love them. Yeah. Uh, yeah, so yeah, so we met with them and then we just got a WeWork, you know, and it was just the 8 of us uh in a room, uh spending, you know, some time uh working on uh the www site. Gatsbyjs.com. And then doing some other stuff. So, like every 3 months, we like to retro the last 3 months and then goal plan for the next 3 months. So, you know, just kind of like taking care of all that stuff that keeps us on track and a healthy remote team.
[00:31:27] Michael Chan: So, as someone from the outside, someone who uses Gatsby and is excited to see kind of all this development around it, what are some of the things that that are on the horizon for you that you see as things that need to be, I guess, fixed, created for the first time, new features? What are some things that you're excited about for Gatsby and the Gatsby community at large?
[00:31:54] Kurt Kemple: Oh, that's awesome. Yeah, that's a great question. So the the one thing that I'm most excited about is just the amount of help that we'll now be able to get on the open source project itself. A large uh amount of uh money and time is going into improving the open source project, uh which is awesome. Uh and so, uh yeah, like so is as part of that, there's a few things. We want to get uh way better tooling support. Uh and what I mean by that is uh much like Create React App, like having ESLint uh only you know for like error checking, not really stylistic stuff, but ESLint. Uh integration, also uh linting your GraphQL schema so that if you try to query for things that don't exist, you can get warnings. Uh but then also exposing that tooling, that schema, ESLint config, Babel config, making it super easy to tie in things like Storybook uh or use like your own ESLint um uh configuration like inline in your editor. So you're getting inline uh warnings instead of having to wait for the terminal or or view it in the webpage like with uh Create React App. So that that's one big thing for me. It's just like improve. Improving the already great developer experience, but trying to really like push it to the very top. Um, yeah. And I think like a big part of that is exposing all the configuration. Right now, it's hard to uh run other things inside of Gatsby. It can get kind of tricky. You know, like setting up good Jest configuration with Gatsby is like a pain because they like fight over Babelrc. So.
[00:33:25] Michael Chan: That's really interesting. I I feel like you see this conversation come up a lot, the idea of a a project project going from kind of opinionated, uh like air quotes, like zero config, um and then kind of developing. And we saw this a little bit with, um uh was it SixtoFive kind of turning into Babel and kind of its transition from Babel 5 to Babel 6 and Babel 7. And it kind of opening up and exposing a lot more of its um its internals to to to to the developer. Um do you feel like that's a like a pretty good way to- Yeah. Get a strong start with your open source project? So if someone has kind of a pet open source project and they kind of want to hit like a Gatsby or Babel level of success, like would you recommend the same path to them?
[00:34:10] Kurt Kemple: So yeah, I mean, it's a really tough uh thing to answer. And I think it it mostly depends, like I guess no difference from a business, but like who's the target audience of your tool? So in the case of Gatsby, uh or something like Babel, it's interesting because they range from very experienced users to very uh inexperienced users, right? Like as someone who's just starting with development, um I could start out trying to use Gatsby to build sites because it's pretty quick and easy.
[00:34:40] Michael Chan: Yeah.
[00:34:40] Kurt Kemple: And so for those people, you want zero config. They don't you know they don't want to have to learn the ins and outs of webpack before they can use your tool. So I like to think of what it like what I've been calling sensible defaults.
[00:34:53] Michael Chan: Mm-hmm.
[00:34:53] Kurt Kemple: So basically, it's zero config if you want it, but it's just sensible defaults that are overridable. So like what we're going to do is if you have a local .eslintrc, we'll just disable ours, right? You're saying, hey, I'm in charge of the ESLint for this project. You know, I know what I want and what I don't want set, so we're not gonna interfere. We'll just get out of your way, get out of your hair. Uh, the second way for more advanced users is because Gatsby has a plugin architecture, you can tie into the webpack config. And so, you know, so advanced users can alter it uh instead of disabling it. And then beginner users, people who are just running, you know, uh gatsby init, right, or creating an or gatsby new, creating a new project, you know, they have no development experience. Uh we we see that a lot. We see a lot of people using Gatsby who have never, who don't know what Node is. Mm. Uh and so, yeah, so so in that sense, yeah, I think it's there. I think it's a combination of two things. Things. Making sure your defaults are sensible but overridable. And then two, uh if you want to— like if you have a project of that size, notice how Babel and Gatsby both have a plugin architecture. And as much as I hate that, it's like without that, you end up in this world where you're just kind of like adding all these one-offs to solve people's problems.
[00:36:09] Michael Chan: Yes.
[00:36:10] Kurt Kemple: Or or you're over-configuring. Like like you have this really complicated config. Like back in the world of like jQuery plugins that would have like like a literal page of options, you know. Yeah, but it's tough. But I definitely say, yeah, you have to make things overridable, especially if you're in the tooling world, because everybody's tooling and and infrastructure and processes and workflows are different. Yeah, show me two teams, yeah, that have the same workflow, I'll I'll lose it.
[00:36:41] Michael Jackson: Yeah, there was a there was a tool for create React app that was like- that would basically just like open it up and expose its webpack config. Do either of you know what that's called? It was something like-
[00:36:57] Kurt Kemple: Isn't that React custom scripts? So there's React scripts and then like React custom scripts or something like that?
[00:37:05] Michael Jackson: Oh, is there? Yeah. That's not the one I was thinking of. But but yeah, it's it's but it's the same kind of idea, right? It was like a- But yeah, it was- it was uh I I think the the you know the the goal of zero config is an admirable goal, but it's so, so hard to actually get there. It's uh like especially like you said, especially when you're building tooling, you know, it's everybody's got slightly different needs and they need to plug in and tweak this little piece. So, but at the same time, a plugin architecture Like a good plugin architecture is also very tricky to build.
[00:37:44] Kurt Kemple: So hard.
[00:37:45] Michael Jackson: I haven't actually seen uh many examples that I really, really like. We we were saved from doing that in React Router when we decided that, you know, because we were starting to like develop a plugin architecture for React Router and we were like, wait a minute. React React already lets us, because these are just components, right? So so what if our whole router was just components?
[00:38:11] Kurt Kemple: Yeah.
[00:38:11] Michael Jackson: And then uh and then anybody who wants to quote-unquote plug in to the router can just wrap our components with their own components, and then and then they can do whatever custom stuff they want, right? So if they're doing code splitting or whatever. And so that was, I think, the thing that saved us is we, instead of building a plugin architecture, we were a React library, so we just built React components and said components are your That's your- that's our plugin architecture. That's our- that's the- that's the common language that we all speak, right?
[00:38:40] Michael Chan: Components are my plugin architecture.
[00:38:42] Michael Jackson: Yeah, yeah, yeah. But, uh, but obviously when you're, you know, you're- you're building a tool basically that runs on- on Node, like a Webpack or Gatsby, what you're doing, uh, you- you can't just- can't just do that. I would- I mean, I assume there's a lot more constraints that you guys are working with that we didn't have. So-
[00:39:00] Kurt Kemple: Yeah, there's quite a few constraints, and the weirdest part is it's actually honestly a 3-part process. So you have like the the Node part, which is the initial part that's gonna pull in the data, do the data transforms and all that, and you can tie into that. Then you have the server-side rendering part, which is what actually renders the HTML or you know React to HTML uh in a in a Node process, right? So that's the server-side rendering. But then you also have the browser hook-in, because you know once the client loads, it's just a React app and you might You also want to control things like injecting scripts you need into the head or things like that, right? Like um uh or the body or wherever you you decide to put them. But yeah, point being that uh yes, there's a lot of different places where you need to tie in. Um and so yeah, yeah, it gets it gets tough. And I agree with you there. I haven't yet to really see a plugin system um that— you know, one one that I really don't dislike is Happy, Happy.js. They have a decent uh plugin architecture. I really like it. And uh Gatsby is nice, too. But you know, honestly, it could use some improvements, which it's getting a few of in v2. Which is coming soon, by the way. Gatsby v2 coming very soon.
[00:40:14] Michael Chan: What are some of the things that we can expect uh in Gatsby v2?
[00:40:18] Kurt Kemple: Yeah. Uh also a great question. Mike, did you have something quick before I answer that?
[00:40:23] Michael Jackson: Yeah, no, I was just I was just gonna say uh one of the things, just a little bit more on the on the topic that we were talking about. I was just gonna say, um, I think, like, I wonder what it would look like to build a static site generator, um, including all of the configuration and everything just as React components. Like, it's- Oh, I see, yeah. And it's kind of a weird thought, but, but, like, I was experimenting the other day with building, um, So, so like currently when you're configuring servers for the cloud, like the current standard is Kubernetes, right? When it's all just YAML files. And honestly, you look at a YAML file and it's, uh, you know, it it you could you could do the same thing in JSX, right? I mean, YAML is is the new XML. JSX is basically just like an XML syntax on top of JavaScript. And and in that case, you're not you're not building these components and running them in the browser. You're um you're really just interpreting the components as if they were XML, as if they were XML configuration, you know. It's I don't know. It's just kind of a it's just kind of a thought that I had. Like, what if what if everything was just JSX?
[00:41:43] Kurt Kemple: Well, you could do that, right? Because it's just a DSL, right? Like just like YAML is. You know, just describing something.
[00:41:51] Michael Jackson: And then plugging into your system is as easy as uh create a component.
[00:41:58] Kurt Kemple: Yeah.
[00:41:59] Michael Jackson: Right? Which which I think is, again, like that's the that's the uh that's the that's the quote unquote plugin architecture that we decided on for React Router. And it's worked pretty well for us so far because we don't we we found ourselves like um like scenario solving Right? For every single use case, somebody would come to us and say, I need to do X. Oh, okay, well, let's give you a little bit of API. I need to do Y. Okay, well, let's give you another little piece of API. But uh, but if if if the component model really is complete, which uh, which so far I have found that to be the case in my like 3+ years of working with React, if the component model really is complete, maybe we could model other kinds of problems with that same, with that same, with those same building blocks, you know?
[00:42:49] Michael Chan: Well, it does definitely seem interesting for a project like Gatsby where, um, like it it would match, there's a lot of cohesion with the uh kind of JSX as kind of the the main building block of a Gatsby site. Or sorry, like React components is the main uh building block of a Gatsby site. So to be able to kind of have that, uh be able to use similar tactics uh when configuring your app, um that does sound like kind of an interesting idea.
[00:43:16] Michael Jackson: Yeah.
[00:43:16] Kurt Kemple: It absolutely does sound interesting. It doesn't even sound too much different than Proton, which is the uh um React component-based Electron runner.
[00:43:27] Michael Jackson: Yeah, I saw that thing. Yeah, I saw that thing.
[00:43:29] Kurt Kemple: Yeah. So, you know, that like there definitely is a world um where, you know, I think that that makes a lot of sense. Uh the more things that move to components, I also think is better. You'll get no argument from me if you watch my React Europe talk on universal components. I go into a lot about how It improved communication, just getting design thinking in components and product thinking in components and QA thinking in components improved our our workflows and processes greatly. Got us all speaking the same language.
[00:44:00] Michael Jackson: Awesome. Well, hey, Kurt, it has been— uh we should probably wrap this up, but it has been an absolute pleasure having you on the podcast today. Uh for those of you who don't who do not know, Kurt Well, we talked a little bit about the move right now, but Kurt has joined us at a probably at a time where I would have opted to not be on the podcast because he's moving right now. And so he's slept on an air mattress last night and his house is kind of all in disarray, but he joined us on the podcast. So my most sincere thanks to Kurt for joining us today. I just got one last question for you, Kurt, and this is the same last question that I put to everybody that we have on the show. And that is, uh, what are you excited about right now in the React space? Or maybe a different way to say it is, who is doing awesome stuff and maybe you don't think they're getting enough attention? You you mentioned Proton. I'm I'm super stoked about uh Proton, by the way. I want to get them on the show. Any other ideas for uh people who are doing awesome stuff who aren't getting getting who aren't getting talked about as much as you think they should
[00:45:09] Kurt Kemple: Yeah, absolutely. I think that there's uh two projects that I'm watching super closely right now. Uh the first one is by uh Vincent Ramer and it's React Native DOM. Uh and so this is a really interesting um project that uh is— I I don't want to say competitor, but in the same space as React Native Web. Uh and essentially it's uh a way to use React Native APIs and this time now even the underlying React Native code. And libraries and uh applying that to the web and running it. Yeah. So it's it's very interesting that it adopts the two-thread model uh and does basically all of the processing in web workers uh and just uses the UI for rendering. Uh and they've been uh he's been able to recreate a ton of the APIs so far. He's been working on this for about a year, but just announced it at React Europe. Uh and I think it's one to watch closely for anybody who's interested in uh multiple platform targeting, universal components, It's definitely something to keep an eye on. And the second one is actually by Devin Abbott, who is working at Airbnb currently. And it's a project called Lona. And so Lona is really a tool for like defining your design system. So it's like a GUI. I guess you could kind of compare it to like Sketch or maybe like xBuilder or something like combined. But essentially you design You design your components in the design tool and it exports the code, like React code or something like that. Uh, from what I've seen, this one uh is by far what I feel to be the most promising. And having worked with universal components, one of the biggest pain points was getting the components back to the designers. Like getting the components we're using into Sketch is a huge pain point. And when you think about it, that's not unidirectional, right? That's like a two-way data flow.
[00:47:10] Michael Jackson: Yeah.
[00:47:11] Kurt Kemple: But using Lona creates a unidirectional like component flow, right? Like design designs them, but what they're actually designing is the actual component output. So it's very interesting and promising. And it's on GitHub. It's under Airbnb/Lona, L-O-N-A.
[00:47:30] Michael Jackson: Yeah.
[00:47:30] Kurt Kemple: But yeah, I would definitely check it out. It's very cool. You know- Those are really the two things that are most interesting to me right now.
[00:47:37] Michael Jackson: Dude, those are both excellent recommendations. You know, um, that Lona project, I hadn't actually heard about that, um, which is why I ask smart people like you to come on the podcast and tell me about stuff that you're interested in. Um, but that that project is what I thought React Sketch App was. There was a there was a project from like a couple years back, again out of Airbnb, called I think it was called React Sketch or Sketch React.
[00:48:06] Kurt Kemple: Yeah, React Sketch App. That's the one.
[00:48:08] Michael Jackson: And I thought I thought that that is what- I thought that it was you draw stuff in Sketch and you generate the code. Um but the the actually it was like the inverse. You write the code and then it and then it creates the Sketch files. So this thing, this Lona thing, I think is um is what I was what I was what I kind of thought that was and what I think is What I think is probably the right uh flow. Or at least the the flow that to me sounds sounds kind of interesting. So, um, so thank you for bringing that one up.
[00:48:40] Kurt Kemple: Oh, yeah. No problem. Yeah, it's something that uh not only am I watching closely, but um as soon as I get moved and settled, I plan to start diving in and contributing, too. Uh from all my experience with working on universal components, uh I I see that as the only possible future that can improve process and workflow around that. And I mean, it's just having one source of truth created by the people who should be creating it. Uh and then engineers uh just get to pick it like a UI library, right? It's like bringing React Bootstrap or something in uh to your project. So it's pretty nice.
[00:49:14] Michael Jackson: Awesome. Well, hey, Kurt Kemple, it is an absolute pleasure to have you on the podcast, sir. And uh congratulations on all the the uh all the big You know, you you new job, new house, lots of big things happening for you lately. So huge congratulations for uh for all the strides you're making. And uh again, thank you for joining us. We will see you again next week on another episode of the React Podcast, so don't miss it. And uh goodbye for now.
chantastic.fm