Code Story · Transcripts

S8 Bonus: The WebRTC Blueprint: Engineering Ultra-Low Latency Video and Voice Infrastructure for AI Agents with Kwindla Kramer, Co-Founder & CEO of Daily

June 7, 2023 · 27:14
Listen to the episode Download .txtDownload .vtt
Kwindla Kramer

Definitely we have, you know, non-trivial amounts of technical debt. I actually don't really think there's a way around that in the real world. So it's just how you box up and how you manage technical debt over time. That's the hard thing. But other people have other approaches that I think also work really well. I have a funny story about a core technology choice and how that evolved for us. We built the very first MVP on top of Firebase for part of our network layer. And by the time we had a few hundred users, Firebase was the single most painful thing in our DevOps and customer support world, including all of the super immature WebRTC stuff we had written ourselves. I'm Kwindla Kramer. I'm one of the founders of Daily.

Noah Labhart

This is Code Story, a podcast bringing you interviews with tech visionaries.

Sound bite

It's six months moonlighting. There's nothing on the bedpans.

Noah Labhart

Who share what it takes to change an industry.

Sound bite

I don't exactly know what to do. Who built

Noah Labhart

the teams that have their back. Keeping scalability top of mind. The stories you don't read in the headlines.

Sound bite

It's not an easy thing to achieve.

Noah Labhart

Dry the ups and downs of the startup life.

Sound bite

It's not just about technology.

Noah Labhart

on Code Story. I'm your host Noah Labhart and today how Kwindla Kramer developed the next generation video SDK using WebRTC and global infrastructure. Kwindla Kramer has always been interested in building things and his parents gave him lots of opportunity. He spent his early days learning to program on the Commodore 64 and playing old games like Lode Runner. He was super interested in the internet while in college, and in 1996, he got the opportunity to be a part of the MIT Media Lab. Outside of tech, he is a quasi-vegan and enjoys foggy beach living on the western edge of San Francisco. After exiting his last startup, Kwin took some time to figure out what he wanted to do next. During that time, he just started coding on projects and came across WebRTC, which allowed real-time communication for the web. This tech catalyzed a tipping point in his mind and led him to build video experiments on top of it. This is the creation story of Daily.

Kwindla Kramer

Daily makes developer tools for video and audio. Our roots are in real-time video and audio, So a standard called WebRTC is what we build a lot of our stuff on top of. And we really think of ourselves as building the infrastructure for the future of video on the Internet. Our job is to make it really easy for engineers to add video and audio to any website or app. And we try hard to handle all the networking, latency, scaling, cross-platform implementation issues that just come with video and audio. Our biggest customers do things like telehealth and online education, workplace collaboration. If you want to build a Zoom-like experience into an app, we make that really easy. If you want to develop something kind of mind-blowing and new that looks totally different from a video call, we try to make that possible too. I'm especially excited about a lot of the new things we see our customers building that feel like the future to us. the kind of social media and gaming and some robotics and things like live commerce. I've always been really interested in digital video and online video, and it feels to me like we've hit escape velocity and how much video is part of all of our lives online. I had a couple of years, or I ended up taking a couple of years between exiting my last startup and deciding whether I really wanted to do another startup. of. So I just wrote a lot of code for a couple of years and I've always really liked building large scale networking stuff and video stuff in particular. That itch didn't go away. So I was still sort of scratching an itch I'd been, you know, happy to work on for a long time. And at that time, this was like 2014, 2015, there was a new standard called WebRTC that Google and Cisco and a bunch of other companies were starting to get serious about about supporting that was going to allow real-time video and other interesting stuff to happen inside a web browser with no additional downloads. And that just seemed to me like one of those things that catalyze that tipping point. If you could just open a web page and you could have a video call or a large-scale, very low-latency broadcast or an audio conversation, that just lowers the barrier to entry and kind of changes the dynamic around distributing these new pieces of software, new user behaviors, new capabilities. And I also thought the WebRTC standard was pretty technically interesting. So I built a bunch of experiments on top of WebRTC and became convinced that it was a piece of the future, an interesting piece of the future. And so we started building a tech stack and thinking about kind of the first product we could ship on top of WebRTC.

Noah Labhart

Tell me about the MVP for Daily, that first version of the product you built. How long did it take you to build and what sort of tools did you use? Maybe even including WebRTC, but give me all that too. And how long did it take you to build and what sort of tools you used to bring it to life?

Kwindla Kramer

How long the MVP took depends on when you start the clock. I mean, there are some aspects of, you know, what we shipped when we shipped our first product that went back a couple of years of my kind of experimenting. Like, I think the MVP probably took us about six or seven months to put together. And what we settled on when we settled on a product direction was actually a little hardware appliance. And that's kind of surprising sometimes to people who think of us today as a developer tools company. But WebRTC was so new that to give people something that would really work in the real world, we kind of needed to control the whole thing we gave them, like all the way from the CPU and the GPU up through the UX. like the web browser's implementation of WebRTC, which was kind of the point and what we all thought we were aiming at was just not very stable. And, you know, it worked okay if you were a contributor to the libwebrtc standard implementation at Google and you had a super high-end machine and a really fast network connection. But if you tried to give a WebRTC based experience to people in the real world on real world laptops and whatever version of Chrome they were stuck on at the time. Just that was a recipe for lots and lots of pain for everybody involved. We thought we could enable screen sharing and video calls for small business conference rooms at a price point nobody had done before. And we could do that by designing these little pieces of hardware and choosing off the shelf, small form factor computer components and assembling them in small batches. And we did that. And that was really fun. I really like building hardware in a garage. product let us get our tech stack into many thousands of people's hands and collect a ton of data about what was good and what wasn't working about what we built and about the broader space of kind of real-time video for end users, consumers of all kinds. We eventually decided that hardware was painful enough that it wasn't going to be the core of our venture scale efforts. But I'm actually really glad we did a hardware product initially. And the reason for think it helped us understand these real world pain points much more deeply. We benchmark really heavily against all our competitors and basically every adjacent kind of solution in the market. And we're super proud of our tech stack's ability to deal with real world networking issues, plus a whole bunch of other stuff that real world users face like camera and mic permissions. And I think the reason we have that DNA that we are, I think, very hard to beat in terms of actually working on real-world devices for real-world users is because we started by shipping a product that we supported for real-world end users.

Noah Labhart

So then you've got your MVP. It's working and you're feeling those pain points you're learning. How did you progress it from there? Tell me about how you matured it and, you know, went towards where you are today. And I'm curious about how you built your roadmap, how you went about deciding, OK, this is the next most important thing to build or to address with Daily.

Kwindla Kramer

So we had a few thousand users of hardware. We knew we could keep growing that user base, but hardware is super hard in a bunch of ways. And I really love hardware. So I think I'm like wired to forget that. But we were definitely sort of seeing what the economics were going to look like of trying to scale a hardware business and thinking that there were a bunch of things that were kind of separate from the core video infrastructure and tech stack that was in some ways the most interesting thing to us and the motivation for us of building Daily. So we had a decision to make about whether we wanted to keep pushing on the hardware product or whether we thought there was kind of a broader market software only approach that made more sense. bunch of experiments, including a bunch of experiments kind of opening up our capabilities to developers in various ways, and got some really interesting traction and use cases going for the developer components that we were kind of throwing out into the world little by little. During that kind of period of experimentation, Apple finally supported WebRTC pretty well in Safari, which opened up kind of the rest of the market of, you know, web browsers and particularly particularly important on mobile, obviously, because the default browser on iOS is Safari. So we felt like, OK, we've got this tech stack we're proud of that we think we can make great. And we've got a lot of experience helping developers at this point kind of build on top of our stuff. And we've got a vision for where the world is going. And now we can target any browser. We should really be a DevTools company. And in some ways, that was an easy decision because it's super fun as a programmer to support other programmers. And once we kind of built a model or a vision for how big we thought the market would be for video-oriented developer tools, we felt like we had a good direction to go in. We'd always believed video is going to be everywhere and it's going to be a huge part of what we all do every day with our digital devices. And enabling that for other developers felt like a clear path. I mean, we explain that to investors as we make it easy to add audio and video features to any website or app in the same way that Stripe makes it easy to add payments to any website or app. So I think end of 2018, we decided to end of life the hardware product. We supported it for a long time for the customers who had it, but we knew that our future was DevTools.

Noah Labhart

Okay, let's switch to team then. about building your team? And what did you look for in those people to indicate that they were the winning horses to join

Kwindla Kramer

you? We stayed super small all the time we were kind of experimenting towards product market fit. And it wasn't until kind of end of 2019, I think, before we decided we were really ready to grow. End of 2019, we started calling friends we'd worked with before and said, you know, we're doing something I think you'd find really fun. What are you doing now? And made a few hires in 2020, early 2020, and then COVID hit and changed the landscape for what we were doing overnight almost. And it was just a scramble to build out our infrastructure, keep adding servers sort of every night to our AWS clusters, and get really serious about recruiting super senior experienced people gaps we knew we had in terms of expertise in. I've been doing this long enough that I feel like I have learned so much and templating on my own experience. We felt like our first 20, call it, engineering hires should just be people who had built some version of what they would be building here at Daily at least once and ideally twice before. And that's worked out really well. We We scaled with pretty experienced folks up to probably 35 or 40 people.

Noah Labhart

You just said the word, scalability, right? And you're hitting the tipping point. COVID hits and you need the scalability to start being triggered with team, with technology. Was this built with scale in mind from day one? or is it at that point or many points where you are having to fight this as you grow?

Kwindla Kramer

I think it's a super interesting question and I've really learned a lot from listening to people on your podcast answer that question. What it looks like to me is kind of what I try to use as a framing for that when we're making decisions is ideally we pick tooling and make platform choices and architecture choices that can scale. But at the same time, the stuff we build day in and day out, we build really as quickly as possible so that we can ship and iterate. Because it doesn't really matter how you build something if you don't ship and iterate. You just can't really learn what you need to learn unless you put stuff out there into the world. So it just can't take that long. So that like get the low level choices right and then build quickly on top of those, even if you're accumulating a lot of technical debt. That's kind of my approach. But definitely we have, you know, non-trivial amounts of technical debt. I actually don't that in the real world. So it's just how you box up and how you manage technical debt over time. That's the hard thing. But other people have other approaches that I think also work really well. I have a funny story about a core technology choice and how that evolved for us that it's a big part of our engineering culture because of kind of how much the funny path-dependent things that happen when you make certain choices kind of reverberate for years and years. we built the very first MVP on top of Firebase for part of our network layer. We needed a distributed state with pretty rapid updates, kind of pub-subby. It seemed pretty standard. It had a lot of respect for the Firebase product. It sure looked on paper like Firebase could do exactly what we needed, and that was something we did not have to build ourselves. And by the time we had a few hundred users, Firebase was the single most painful thing in our DevOps and customer support world, including all of the super immature WebRTC stuff we had written ourselves. We just spent so much time dealing with Firebase issues. And we're in Silicon Valley, small world, so kind of knew the Firebase founders just a little bit. We had really good access to their engineering and support teams. And despite the fact that they would make special shards for us, move us around, help us debug in real time, we just never managed to get past the Firebase issues. were just outside of the core Firebase user base enough at that time that just didn't work for us. I think we were very different maybe in ways that were not obvious to any of us going into it from their kind of mobile gaming core user base. And state updates would just back up and nobody could debug why. And WebSockets would disconnect with no kind of library level or application level ability to manage that. And what we needed were very long running, very reliable, relatively simple, but sub-second distributed state updates. And I really, really, really didn't want to build that. It seemed like it should be a solved problem. But I built a prototype version of our kind of signaling layer on top of two different AWS products, Pusher, and I think a couple other kind of platform as a service implementations. they all had roughly the same issues that firebase did for us so finally i blocked out two weeks over christmas because we knew that customer support would be light and we wouldn't be onboarding new customers and i built exactly what we needed on top of the most boring technologies we could possibly imagine so a sql database and http polling and i built it and debugged it and we And the reason that was possible is we had used all of those technologies, HTTP polling and SQL databases and the kind of application level shared state merges for 15 years professionally. We knew where the scaling issues were going to be. We knew where the kind of pain points developing the user level code would be for that kind of thing. It's not super easy, but it's not super hard either. And we called that library kitchen sink S-Y-N-C because we knew we were going to use it for all of our shared state stuff. And engineers like puns. And we still use kitchen sink today. And I'm 100% sure that we would have had more technical issues if we'd built on top of somebody else's system that we didn't have as much control over.

Noah Labhart

So, Kwin, as you step out on the balcony and you look across all that you've built, what are you most proud of?

Kwindla Kramer

You know, I really am proud of this technology stack that spans a whole bunch of pretty sophisticated UDP packet routing for audio and video, all the way up through client-side libraries that I think mostly make it really easy for developers to do super interesting things without needing to know how all of those low-level details work. and the fact that it's really a full tech stack from the backend all the way up through multi-platform client libraries. I am really proud of that. And that's not my code. That's now, you know, code from many, many other engineers who work here at Daily and do things that I could never have done writing those pieces of the system myself. But I do think it's tied together by this idea that we support our customers all the way through to their customer's experience. Like our customer's customer matters to us. We enable video and audio calls to work as much as they possibly can on every device anywhere in the world, on any network in the world. And for me as an engineer, that's a really cool thing.

Noah Labhart

Let's flip the script a little bit. Tell me about a mistake you made and how you and your team responded to it. and maybe it's around the Firebase area, but I want to know if you have a different story too.

Kwindla Kramer

Oh man, so many mistakes. Like life is just an opportunity to make more mistakes. It's okay to be wrong and it's okay to make mistakes because it has to be because both of those things are inevitable. It's a good rule of thumb to try not to stay wrong for too long and not to make the same mistake more than once. But those things happen too and that's okay. I think that the single biggest mistake we have made as a company, and this is totally on me, is it took us a long time to really focus on building native mobile libraries. I personally have done a whole lot of large-scale backend stuff and a whole lot of web stuff and relatively little native mobile stuff in my own career. So it was sort of easy for me to focus on the web front end and the big infrastructure stuff on the backend. But so many interesting use cases are mobile first these days. And we really missed out, I think, on a lot of interesting customers and interesting customer discovery by being slow to fully support native mobile as much as we have the web platform. We fixed that now, but for probably a year and a half longer than we should have, we kind of supported mobile as mostly a mobile browser experience and not mostly really, really terrific libraries you could build into native mobile apps. If we could go back and redo that, that's probably the biggest thing I would change about how we focused and what our roadmap and trajectory were at Daily.

Noah Labhart

So this will be fun, Kwin. What does the future look like for Daily the product and for your team?

Kwindla Kramer

I mean, the fun thing about working on something you really enjoy is there's just no shortage of things to build. Both things that customers ask us for, but also things that are just sort of our vision about the world. Our bet has always been that video is just going to get more and more important and more and more ubiquitous. And I think we see that today. TikTok largely replacing Twitter, for example, for mass user audiences just to use those two experiences as stand-ins for kind of larger user behaviors. So what we see a lot at Daily is people building really amazing co-watching of sports or live commerce or really funny gaming experiences that combine video with metaverse or contest type dynamics. And I just think there's going to be an incredible amount of innovation around how we all experience these kind of video heavy use cases over the next few years. the surface. And as much as something like TikTok has changed the landscape, it's inning one of a nine inning baseball game. And our goal is to support all those new use cases. We love supporting telehealth and education use cases because they feel like they really make a difference in people's lives. And that's really important to us on top of kind of the engineering stuff that we enjoy doing. But it's also super fun to think about, okay, what's the world going to look like in 10 years more kind of core to everything we do on our phones and our TVs and our laptops every day. And I think we got some good ideas about that. And in particular, I think we're building a bunch of toolkits that make it super easy to do like these really hybrid experiences where you might have a hundred thousand people in a video live stream, and some of them might participate ad hoc in the experience and then you record and clip the most fun parts out of that large live experience and post them later and remix them and then do it all again tomorrow. Okay.

Noah Labhart

Kwin, let's switch to you. Who influences the way that you work? Name a person or many persons or something you look up to and why?

Kwindla Kramer

I just feel really lucky to get to work with the colleagues that I work with every day at Daily. I think if we do our job right, and this is something we say a lot when we're hiring, because I think it helps us stay focused on what our goals are for the longer term as a company, in terms of being a great place to work for as long as any of us remain excited about what we're doing together. If we feel like everybody at the company has and is excited about teaching things to the rest of us and equally excited about learning things, then that's the right kind of mindset to have for what we want to do together. And I truly feel like that. Like I learn so much every day from everybody I work with, from engineers who've been doing this stuff a very long time, like I have to some of the slightly earlier career engineers who bring their own perspective on newer things to people in the other disciplines that we've added in addition to engineering as we've grown. I just learned so much from everybody at Daily. And I think that's a huge part of what makes the journey of growing a company together fulfilling.

Noah Labhart

Okay, Kwin. So last question. You're getting on a plane and you're sitting next to a young entrepreneur who's built the next big thing. They're jazzed about it. They can't wait to show it off to the world and can't wait to show it off to you right there on the plane. What advice do you give that person having gone down this road a bit?

Kwindla Kramer

You know, I think it's funny. I think it depends on kind of what world you're living in. I have a lot of experience with venture-backed technology companies. And it's a very particular business model. You raise money that you could not raise in any other sector of the economy because the the risk is way out of proportion that you're just going to go out of business in a couple of years because you're swinging for the fences. But the flip side of that is that a small percentage of venture-backed companies accomplish unpredictably amazing things. So if somebody's built some technology artifact that you need to continue to invest in before it's going to get the kind of traction that can support a bunch of people's salaries, then the venture-backed tech route is And I have a ton of advice about that in terms of how to think about technology company roadmaps and how to talk to investors and what all the tradeoffs are along the way. But I also think it's worth thinking at the beginning about whether raising money from professional tech investors is the right path. Because you can also build sort of smaller companies that are just as exciting to work at if you are one of the people who is excited about what that company is doing over the long term without necessarily raising from traditional tech investors. So maybe there's that fork in the road early on. Is this thing you've built the seed of a venture scale company? And that's not a value judgment. It's just something you should kind of think hard about. And if it is, do you personally want to not just build something you're interested in building, but then turn that into a company and try to attract a bunch of other people to be as excited about it as you are? and probably eventually transition a bit from actually building that level of artifact to managing people and managing relationships with investors as a company grows. Because if you grow a company, the job, the one thing that's true is that the job changes every quarter.

Noah Labhart

That's fantastic advice. Well, Kwin, thank you for being on the show today. And thank you for for telling the creation story of Daily. Thank you. And this concludes another chapter of Code Story. Code Story is hosted and produced by Noah Labhart. Be sure to subscribe on Apple Podcasts, Spotify, or the podcasting app of your choice. And when you get a chance, leave us a review. Both things help us out tremendously. tremendously. And thanks again for listening.

Transcribed with Whisper and reviewed for names and terms; speaker labels are automatic and may contain small errors. Timestamps link to that moment of the transcript.