The Changelog: Software Development, Open Source - Mad science, WebTorrent, WebRTC (Interview)

Episode Date: November 11, 2016

Feross Aboukhadijeh joined the show this week to talk with us about his backstory, passive income, WebTorrent, WebRTC, Electron and the ins and outs of packaging apps for all platforms....

Transcript
Discussion (0)
Starting point is 00:00:00 Bandwidth for Changelog is provided by Fastly. Learn more at Fastly.com. I'm Firas Aboukdij, and you're listening to The Changelog. Welcome back, everyone. This is The Changelog, and I'm your host, Adams Dekowiak. This is episode 227, and today Jared and I are talking talking to Faraz Abugadije about WebRTC, his project WebTorrent, some fun stuff around Electron. Faraz also shared his history, kind of where he came from, his passion for hackathons. He also is a huge fan of Electron. And during the show, you'll find out why. Our sponsors today are Rollbar, TopTowd and node.js interactive first sponsor the show is our friends at rollbar rollbar puts errors in their place head to rollbar.com slash changelog get the bootstrap plan for free for 90 days and today i'm sharing a conversation with you that i had with paul bigger the founder of circle ci and he talked deeply about how they use Rollbar and how important that tool is to their developers. Take a listen.
Starting point is 00:01:10 We operate at serious scale. And literally the first thing we do when we create a new service is we install Rollbar in it. We need to have that visibility. And without that visibility, it would be impossible to run at the scale we do. And certainly with the number of people that we have. We're a relatively small team operating a major service. And without the visibility that Rollbar gives us into our exceptions, it just wouldn't be possible. Oh, that's awesome.
Starting point is 00:01:38 So listeners, we have a special offer for you. Go to rollbar.com slash changelog, sign sign up get the bootstrap plan for free for 90 days that's 300,000 errors tracked totally for free get rollbar trying today head over to rollbar.com slash changelog all right we got faraz abkadeje joining the show today, talking about some cool stuff, Jared. This show's been on the books for a bit. We learned about Firas via Standard and some other things in his fame and the Node world and some fun stuff he's doing, but WebTorrent.
Starting point is 00:02:18 Who doesn't love that? Sounds like everybody loves it. It's got thousands and thousands of stars on GitHub, and it's one of these things that makes you say, I didn't know you could even do that with web browsers. So anytime somebody can put together interesting projects that kind of stretch the limit of what we can do inside the browser, that gets our attention. So for us, thanks so much for joining us on the changelog. Yeah, I'm honored to be here. Thanks, guys.
Starting point is 00:02:41 Let's dig into your background. I understand that you're you know i guess uh to a degree famous now we've known about you for a while with your uh your success with web torn and standard of course we're familiar with that project but uh where did things come from for you what's your origin story um yeah i got started with computers and my dad brought uh brought home a computer from a yard sale and he let me play with it for a little bit and set it up in the house. So I learned, he showed me a couple of DOS commands, how to change directories, CD, and
Starting point is 00:03:16 then DIR for listing out the stuff in a folder. And I just learned how to like start up games basically uh from there you know really wasn't aware of programming as a thing until probably around middle school um that was when I can't remember how I heard about heard about it but I basically somehow stumbled upon like the idea of like html and the idea of making page web pages tinkered around with that made like a personal home page it was it was pretty silly i got really into um i got really really into ebom's world and new grounds and like flash animations on the internet nice i don't know if you guys remember remember those those days like back when like video really wasn't a thing on the web but you could like you do flash animations
Starting point is 00:03:59 for days adam you remember those days right i love those days my favorite days i remember ebom's world is that still kicking yeah it's still around i don't know if anyone goes there anymore but uh yeah but yeah newgrounds is actually still seems pretty healthy especially their audio portal people post lots of good stuff um on that still but anyway i was like a huge fan of of those sites so i i actually in high school i was part of this like tech team where we would, our job was to like fix teachers' computers and like take malware off of the computers. And we would actually just, we'd just get called by the vice principal to like a teacher's classroom. And he, you know, he would tell us like, okay, so this teacher needs, you know, something installed
Starting point is 00:04:42 or, you know, oh, they're complaining about like pop-ups on their computer, even when they're not browsing the internet. So they would have us fix it or try to fix it. That's so funny. And whenever there wasn't work to do, we would just sit around in the computer lab and just like watch flash animations. And we actually had to use web proxies to get around the school filtering in order to just download the like antivirus stuff because they blocked a whole bunch of sites
Starting point is 00:05:08 including download.com which was where the different ad scanners, like AdWords scanners and malware scanners were hosted. So we were learning about proxying stuff and then we would share the proxies with our friends so that we could all get around the web filters and play games and stuff on the computers. are some days too back whenever like you had download.com and like i think even cnet was a part of that was yeah owned by cnet right and like right
Starting point is 00:05:33 how just like those big buttons were there and like anytime you wanted to get something you had to like go here and and it seemed like this black box thing. And it was a unique time in the web. Yeah. Internet Explorer 6, Firefox version 1. Source Forge. Source Forge, yeah. Very much of that. Lots of toolbars, you know.
Starting point is 00:05:57 Choosing your mirror. Yeah. I was like, okay, do I choose the one closest to me? I suppose so. That makes the most sense. Why can't you just tell me? I guess you didn't have geolocation back then. Yeah.
Starting point is 00:06:08 I don't know why. I guess that was just back when the internet was a lot nerdier and people didn't really think about user experience as much. And everybody who was using it actually knew what a mirror was. So they're like, oh, I'll just choose my mirror. Yeah. Yeah. And so, yeah, we had a lot of fun just going around.
Starting point is 00:06:23 I remember one of the teachers had a whole computer lab full of computers with AutoCAD on it. It was the, it was drafting. So, you know, people making like floor plans for houses and stuff. And in order for AutoCAD to run, you had to, you had to, actually had to set up the computer so that it was running as an administrator. So people would, you know, you know, the students, student accounts could install anything. So those computers were always the worst. We were always going in there, fixing stuff on those computers. There was like games, you know, and like,
Starting point is 00:06:51 just like people were torrenting stuff, just like all kinds of stuff going on on those computers. We gave out, we actually ended up giving out the web proxies to the other, to all of our friends. And we made like a password on the, on the proxy. So you had to type like, Feroz is awesome or whatever in order to access the open web. Nice. So we were kind of legend. And I remember sitting in the library one time and I was on the computer and I tried to visit a site and it was blocked. And then somebody next to me leaned over and was like, oh, I know how you can get around that. Just go to this
Starting point is 00:07:23 site and type Feroz is awesome. And I was like, I'm Feroz. I think I know how to do that. Yeah, that was when I knew I made it. There you go. That's a sign of success right there. It is. Use your own name as a password.
Starting point is 00:07:39 Yeah, yeah. So it was all fun high school shenanigans. But then I wanted to like basically so we got the idea, like my and I that we should like put all of our favorite Flash animations onto a website. And so I learned PHP and made a site called Free the Flash. You can go to it still. It's online, I think. Free the Flash dot com. It was basically just we just stole a bunch of other people's like Flash animations, our favorite ones, and just hosted them on the site.
Starting point is 00:08:06 And it was pretty cool. There were forums and people would come and talk and stuff. And it was pretty fun. So that was kind of like my first exposure to real programming. Bought a book on, I don't know if I bought it on Amazon or if that was back when Barnes & Noble was still around. But anyway, a book on PHP and MySQL. Yeah, it was kind of my first
Starting point is 00:08:25 first uh foray into programming is barnes and nobles gone i don't know maybe no maybe maybe it was borders is the one that's gone yeah borders is definitely gone yeah anyways back when they were yeah in their heyday of course uh if you read the news around the dot com still there what is borders.com barnes and noble well barnes and noble still exists i think borders closed yeah but brick and mortar bookstores are making a comeback that's uh it's the new cool place it is where the wi-fi is at there's a great quote from one of the amazon's media people uh pr people who you know amazon has started now investing in brick and mortar, uh, stores.
Starting point is 00:09:06 And they said something like, we realized that, uh, like a bookstore is a great place for people to discover books or something really ridiculous like that. And that was like their major insight to why they wanted to, you know, buy some buildings. So that's funny.
Starting point is 00:09:19 For us, it's, it's funny to hear how your story to early programming or to even to pique your interest is, is kind of around just you know in some ways just being a kid you know just just kind of having this innocent just draw to something that they kind of get you and then in your case you know proxying around things or you know being in the in the club and trying to help take care of the teachers and
Starting point is 00:09:40 install some stuff or whatever like that's that's really interesting and you mentioned games too like several times on this show part of someone's origin story has more times than not it kind of stems from games it's it's sort of this curiosity place why do you think it's why do you think that's true for for you and then maybe even other programmers out there yeah that's totally true i i remember when i went when i first got to college and i started taking computer science classes, I kind of expected that all the other people in the class that I met would be into games. And I assumed that's why they got into computers was because they wanted to be a video game designer or they played a lot of games. But I actually was surprised that that wasn't the case
Starting point is 00:10:19 as often as you'd think. It was actually a pretty low percentage of people. Like, I don't know, maybe 20% of people got in for games. So I don't know. I think back when I was getting into computers, it wasn't, I mean, it was like, it wasn't as, things weren't as polished. And so sometimes you'd have to like debug things and try different things to get things, you know, to get games on your PC to work right. And so there was a natural, I think, a natural kind of requirement to figure things out a little bit. It's not as easy as installing a game on an iOS device today.
Starting point is 00:10:56 So that might be part of the reason why you're kind of forced to learn about things. Certainly getting malware on your computer and having to figure out how to get it off so that you can keep using your computer or so that you don't have to admit to your parents that you accidentally installed a virus or something, you know, is like, right. But there's like, that's some serious motivation right there. You know, you don't want to like ruin the thousand dollar family computer. Back when, remember back when people had like one computer in the house that everybody shared. I recall that. Yeah. That's actually part of my story. This isn't about me, but I share a similarity where I just got to a point where I was just like,
Starting point is 00:11:30 I want to install everything. Cause I'm just kind of like just playing. And, and, uh, it was, it was more around just kind of like, I've broke the computer several times. I got like a blue screen of deaths or like I did something and like like it just wouldn't start up anymore so I had to like find out how to get there but then I had to go to a bookstore to read a book because my computer wouldn't work anymore I couldn't get on the internet to search for the information to help me to get to the next step so it was a much more antiquated process than for me so for us one thing that we we notice about you you know your projects specifically web
Starting point is 00:12:06 torrent but you also have had a lot of other things you made a virtual reality piloting program you have all these kind of i would consider them like tinker or uh almost like experimental type of things and one thing that you say about yourself is that you're a quote-unquote mad scientist programmer and you like to work on quote unquote mad science which you define as projects that make people say whoa i didn't know that was possible where does that come out of does that come out of your childhood a little bit does that come out of this this these formative experiences in middle school and high school or is that something that you've kind of realized as you've grown older? Yeah, I can't really pinpoint where or when I first started being into mad science stuff.
Starting point is 00:12:50 I've always wanted to surprise people with what computers could do, though. And I don't really know where that comes from. But if I think back through all the things I built in college, they were always basically surprising in some way. Like, I remember, I used to like to go to hackathons back before hackathons became really corporate. And like, pretty much now, like all hackathons are connected to some company, and it's some kind of recruiting thing. But I remember, like, we used to have like, quarterly kind of hackathons at Stanford, where I went to school, and they were always kind of just organized by the student group, the CS student group. And the, the kind of the trick to winning a hackathon is really
Starting point is 00:13:32 to just shock, kind of shock or surprise people with, with what you do. So building something completely practical is not really the recipe for success there. And so maybe that's where it comes from. Like you really want to kind of, to win you, you need to think of like what's the minimum thing I can build because you don't have that much time. Um, that will, that will just, that will just knock people's socks off that they're going to be talking about like for the next couple of days afterwards. And so, um, you don't want to build like, you know, actually at every,
Starting point is 00:14:01 almost every single hackathon I went to, I'm pretty sure there was always somebody who built a textbook textbook sale site so like you know because it's a common student problem i have all these books from like the classes i took last quarter um who's gonna buy them from me and you know those never won because like you've seen those before and they're just kind of boring but maybe actually useful to people but not not the right thing for a hackathon. So I built things like the virtual reality drone piloting things. That was back when Oculus first came out. We took an AR drone and we used the camera on the front to feed video to an Oculus Rift that somebody was wearing on their head. And they could pilot the drone by looking around. And the drone would move to orient itself
Starting point is 00:14:47 so that you're basically controlling it with your head. And then we demoed that, and everybody was blown away. Except then, at the very end, the guy who was piloting it for our demo, he got really excited. Because we had a little cool feature where if you flipped your head back like really quickly, then the drone would do a flip. And he did that, but the whole headset flew off his head
Starting point is 00:15:13 when he moved his, he jerked his head back and then the drone just like crashed into the audience. So it was kind of anticlimactic. But yeah, that's like one example. There's another one we did that was really, I thought, really cool. It was back before HTTPS was pretty common on websites. So you could like, if you just sniffed the network, you could see like what websites people were visiting. And there was a big deal about this one extension for Firefox
Starting point is 00:15:46 that was somebody released called FireSheep, I think, and it let you... Oh, yeah. Remember that? You could log in as anyone who was visiting Facebook on your network. You could click their name and then you would just be logged in as them because it would sniff the cookies up the network. Yeah, just go to Starbucks, hop on the Wi-Fi,
Starting point is 00:16:01 and everybody was wide open, and FireSheep made it dead simple to do that. You don't have to even, it was like ScriptKitties, you know, times 10, because it's a browser extension. You just install it and go. Yeah, so this was always possible, right? But then Firesheep just basically said, okay, like, only the bad guys are doing this. Let's make it so that anybody can do this. And then finally, you know, these websites will be forced to fix it.
Starting point is 00:16:23 And so it was very kind of surprising. It's a surprising thing if you don't know that it's possible. And so they just made it more accessible. And then that's kind of the surprising moment for people is when they see that, wow, anyone can do this. So that's kind of, so we were, a group of my friends and I, like about four of us, we decided to do the same thing. But instead of sniffing cookies, we would just show the URLs that people were visiting. So we made basically a news feed that would show you in real time the sites that were being visited on the network that you were on. So you could see like, oh, someone just watched this YouTube video and it would embed the YouTube video. And then a second later, another story would appear at the
Starting point is 00:17:02 top with the Wikipedia article that somebody's reading and so on and so forth and so then we showed that to people and they were like oh my goodness wow you can do that and uh you know it's very uh we won of course so like anytime you surprise people i think in that way it's just a very good experience for them they're like their eyes are opened mad science mad science yeah exactly i like and there's all i mean there's this there's this like group of people in the node js world that um call what they do mad science and so i kind of got the name from that like uh substack dominic tar um matthias boost um big group of guys who like uh just a published prolific number of modules to NPM. And they were calling what they do mad science long before I was. So I just kind of thought I liked what they were doing.
Starting point is 00:17:51 Yeah, I barred it. That newsfeed idea is such a unique and interesting idea around sniffing traffic on a network. And I can see what you mean by hacking a hackathon, so to speak, to figure out how to win. And that's a perfect example of like, well, I didn't know you could do that because I mean, it makes sense, right? If you're a network manager, it totally makes sense. But to like turn that into a newsfeed and make it about discoverability,
Starting point is 00:18:17 that's interesting. So you do any hackathons nowadays or you hang up your, your what's the saying? Hang up shoes i don't know i'm saying have you quit your shoes have you hung your hat i believe is what is the term yeah i haven't done any recently mainly just because they they all seem kind of corporate and um yeah and like a lot of times you have to use the apis of the companies that are sponsoring the hackathon in order to um in order to like get extra points and like that just doesn't that seems pretty limiting to me um i i've i don't mind if like companies want to be there and like have a representative who can help you use their api if
Starting point is 00:18:56 you're interested in incorporating that into your project of your own volition but if like you have to do it um or like you're really encouraged to do it then it's it's not as fun i think so that's that's part of the reason it seems like you're from a day when hackathons were more about the purity of the the street cred versus the the prize you win at the end yeah i mean i'm not that old but but yeah i feel like in the last four years they've gotten really kind of like sponsorship oriented and and uh that's not really what it's about to me. But you haven't stopped doing side projects. So you had one in 2010, perhaps some of the listeners remember YouTube instant, which was a really fast way to search YouTube. I recall that
Starting point is 00:19:34 I think it blew up and was on every kind of aggregation site, probably on the internet for a day or two and got tons of traffic. But perhaps even more interestingly, you have a side project now. We're going to talk about what you're up to with WebTorrent probably after the break. But one thing that's interesting is that you allow yourself to work on open source via some passive income that comes from a side project. So we'd love to hear about that before we take our first break. Sure. Yeah. So Study Notes is a site I started when I was in high school. I basically was taking some classes, advanced placement classes or what they're called. They're basically just this common type of class that high schoolers in the US take that gives online. So if you wanted to, you could read my notes and they would be more succinct than the textbook. So my mind were like 10 pages in the textbook was like 30 pages. And that kind of started out as just a
Starting point is 00:20:36 way to just play around with making more websites. But in the year since I created it, it's just been getting slowly more and more traffic, kind of growing like 25% each year. And now it's, I mean, I've just maintained it, you know, kept the site online, basically. Not shut it down, not let it completely, you know, not completely neglected it. And I think about four years ago, I was forced to basically just, I looked at the traffic and I was like, Whoa, there's a decent number of people using this. Maybe I should spend a little bit more time working on it. You know, maybe I can make some money from this. So I was like, well, I'm not going to go back now and, you know, try to add more notes to this site because I'm not in high school anymore. And that's that just doesn't sound very fun.
Starting point is 00:21:27 So I went around and paid people to basically give me their notes. And I posted them to the site and expanded the number of classes that I could give people notes for and put a couple of ads up on the page. And, yeah, I mean, from there, it's continued to grow because I made the site better. And I even added a section a couple years ago where I got a bunch of people to give me their college essays that they used when they applied for college. And I posted those up there. And so I think like the longer your site's around, the more Google trusts it. And so the SEO has just kind of gotten better and better over the years. Also, like teachers are linking to it now from their teacher webpages. So just from mostly Google traffic, I'm able to make a decent amount of money where I can basically sustain myself
Starting point is 00:22:18 while I work on open source and travel and stuff. So that's been really cool. It's actually a huge lesson, I think, in not abandoning projects that you don't have any, like that you're not interested in anymore. Like just putting in a little bit of time to maintain them and keep them online for the few people who are finding value in them is a great idea
Starting point is 00:22:39 because like you might change your mind later and want to like, you know, wish that you didn't shut that project down. So I've basically never shut down things. I just keep them up in case that I decided, you know, that I want to work on them later in case they continue to grow on their own. Is the main way you make money from it is just through Google ads or is there other ways? I know you said you pay people for their notes, so's some income and and and some expenses too yeah so there's about three there's three main ways actually that i make money from the site so at
Starting point is 00:23:10 first it was just ads because that's pretty easy to get going you just uh sign up for google ad sense and then you paste a little bit of code on the page right um but then uh i as an experiment i decided well i've always thought it'd be it'd be nicer if I could just charge people for something. And then, you know, instead of making like a penny from somebody using your site for a whole week, you know, from ads, if you could just charge them like $10 and then have them happily give you their money because you're providing them some kind of value that's worth that to them, then that would just be a lot simpler and a lot nicer. So as an experiment, I decided to try charging for the ability to read those essays. So after you've read like three or four, then you get kind of basically the equivalent of a
Starting point is 00:23:53 newspaper paywall where it's like, you have to pay in order to keep reading. And I thought it was going to be a terrible idea, but it actually is working fine and people are actually paying. So I charged like $14 to unlock the content basically, but you can get around it pretty easily if you, if you use an incognito window, then it resets the number of, of essays you can read. So it's not like, it's basically the way I see it is people who don't care enough to like try to get around it are probably people who can afford it. And so I want to take their money because they can afford it. Right. You know, and then people who, people who really care, uh, or where that much money, they'll get around or they'll email me and ask for like a free pass.
Starting point is 00:24:30 And I've done that for for several people who've emailed me already. So it seems kind of like a nice compromise. I think this is interesting, too, to to just see how you've yet again been able to be this mad scientist, so to speak and in terms of like and i know this isn't exactly mad science it seems pretty straightforward but just the hacker mentality of being a mad scientist to like say i'm gonna find a way to like not throw things away for one but then also kind of keep track in the web traffic to a degree to say is this viable to people and if it is then do something about it and And you found a way to like do what you want in open source or in your own dreamer way to kind of keep doing the things that interest you around open source in a passive way or to have the passive income to afford you the ability to do that. Just kind of curious.
Starting point is 00:25:19 My needs are different than your needs and Jared's needs are different than yours. I'm kind of curious just generally how much money you make from this so I'm doing pretty well this year um it's it's um I'm not sure I should say exactly how much I'm making but like uh it's about equivalent to having a job I'd say like it's it's it's only gotten that that nice in the last couple years so there were like you know it's been going I've been working on this for like 10 years at this point since high school. It's like minimum wage, basically, to a degree, because how many years you put in. Yeah, exactly. If you go look back at all the time I worked on it in the early years when it wasn't making any money.
Starting point is 00:26:02 Actually, when I first put AdSense on it, I remember thinking at the end end of the month, like, Oh my gosh, Google sent me a check for, uh, $40. Like, wow, this is so cool. I'm making money even when I'm sleeping. And that was kind of cool. And that was actually pretty addicting. Um, I don't know if you guys ever visited, there's this website called webmaster world. Have you guys ever heard of it? No, I have. Yeah. Yeah. It's like a forum where people who own websites that have basically AdSense on them talk about it. And there was a post I read one time, like back when I was working on this stuff in high
Starting point is 00:26:36 school. And he, it was a guy, I don't know if it could have been a girl, but somebody was talking about how they had a site that made them enough money that they could just travel the world and then with their laptop and just check, check on their site every so often, make sure that things are going well. But, you know, basically do like a four hour work week kind of thing. And they, nobody, nobody ever shared the URL of their site because they were worried about competition and about people copying, you know, their, their strategy. But, but so you can never really know whether it was a true story, but, um, but
Starting point is 00:27:07 every so often someone would publish a story like that. And, uh, I remember that being really inspiring. And so I was always had that in the back of my mind. Like, that seems like a good way to go, you know, instead of just exchanging my hours of my life for money, like a one-to-one exchange, I work, I work an hour, I get a certain amount of money. If I want more money, I have to work more hours. Um, instead of doing like that, just putting in a bunch of work without getting any money, but then kind of solving the problem once and for all
Starting point is 00:27:32 so that you have something that automatically, um, allows you to live without you having to like continue to, to actively work on it. You can work on it if you want, but, but on the whole, it's pretty passive and it just kind of generates money for you. That's awesome. I mean, that might potentially tee us into the next topic, which is WebTorrent, uh, just in terms of you now have a passive income and you're able to work on what you want and you're a mad scientist. So you, so you've said, so I imagine that what you're doing with WebTorrent is pretty interesting. So let's tee that up before the break, though. When we come back, we'll dive much, much deeper into that. So we'll be right back.
Starting point is 00:28:10 Before we go to this first break, I want to mention a conference we're going to very soon. Node.js Interactive in Austin, November 29th through December 2nd. We're actually going to be there producing a podcast miniseries called The Future of Node. We're doing that in collaboration with Node.js Foundation, the Linux Foundation, and also IBM. This conference is all about education and community building. It's a great way to get out there and meet people in the Node.js community and learn about the future of Node and where it's going.
Starting point is 00:28:39 Rather than give you a URL to check out, check the show notes. It's in there too, but Google Node.js Interactive. It should be the first thing that pops up in your browser. And for those planning to attend, use our code CNGJS16. Once again, CNGJS16. That'll get you 15% off. If for some reason you can't find it, check the show notes. The link will be in there. Hope to see you there. And now for our first break. This message is for all those team leaders out there that are looking to easily add new developers and new designers to their team. Easily scale up when you need to. You got a big push coming.
Starting point is 00:29:21 You got a new area of the product you've got to go into. You've got more need than you thought you could. You've got to go through all this hassle of putting a job out there and hiring people to find the right people. Well, that's a bunch of hard stuff that you don't need to even deal with. Call upon my friends at TopTal. That's T-O-P-T-A-L.com. The cool thing about TopTal is you can hire the top 3% of freelance software developers and designers. And what that means is they've got a rigorous screening process to identify the best. So when you call upon them to help you place the right kind of people into your team, then you know you're calling upon the best people out there. Once again, go to toptal.com. That's T-O-P-T-A-L.com. Or if you'd like a personal introduction,
Starting point is 00:30:04 email me, adam at changelove.com. And now back to the show. Hi, we're back with Frost. We're talking now about WebTorrent. We talked, Frost, quite a bit about your journey to where you're at. And I think it's interesting to kind of look back, as you said earlier, and have that introspective look towards yourself. And maybe you weren't even fully expecting it or even you weren't really sure what would
Starting point is 00:30:28 come out even. But it's always interesting to look back to where you were and where you came from and your interests. And we learned about your mad scientist attitude, your love for hackathons, and ultimately your ability to persevere and create a passive income to be able to work on things like WebTorrent. And so maybe open it up for us, what is WebTorrent? And maybe debunk what people might think it might not be or what it is. So WebTorrent is a torrent app that works in your browser.
Starting point is 00:30:57 So the idea is, what if we could take BitTorrent, the most popular and successful peer-to-peer protocol in the world with hundreds of millions of users and make torrents work from your browser so you don't need to install a separate application on your computer in order to participate in the torrent network. So imagine going to a website. Imagine it's something like a YouTube style site. You push play, a video starts to play, and that's coming from other people who have that video, other people who are on the same page as you
Starting point is 00:31:32 watching the same video. And so no servers need to be involved. There's no place where that video is hosted. That video can come from your peers, from other people just like you who are interested in the content. And so that's basically the goal. Let's just make this a browser protocol instead of something that requires an app on your computer.
Starting point is 00:31:55 Does that kind of make sense? Totally makes sense. The only thing I think about when you say that is, you probably get this often, is the chicken and egg. You know, somebody's got to hit the page first. So how do you, how does this work? I know how web torrents work and I know how torrents work, but what do you do for that first few people that visit the page? How does that begin to spin up? Yeah, that's a good question. So I mean, it is a chicken and egg problem, right? I mean, if no one has the file that you're looking for, then
Starting point is 00:32:25 obviously you can't get it from anyone. But what you can do is, so in BitTorrent at least, there is no guarantee that a file will exist forever. There has to be enough interest in the file. And so all files, all torrents get created initially by somebody who wants to share the file. And this is the same thing with websites, right? I mean, like you can't get content unless someone initially creates the content and then tells you about the content. So for a website, I create a piece of content, I publish the content, I pay to host the content,
Starting point is 00:32:56 and then I give you a link to the content or you find out about the link via Google or something. But so there's two components here. There's the person who made the content, wants it to be available. They personally ensure that it's available by hosting it. And then there's another step, which is you have to find the link to the content.
Starting point is 00:33:12 You basically hear about that link through some other party, Google or a friend, right? So torrents are the same way. There's an initial creator of the torrent who ensures that it's available. They're called the seeder. And then there's the link that you use, the magnet link or the torrent who ensures that it's available. They're called the seeder. And then there's the link that you use, the magnet link or the torrent file, which is basically the reference to that torrent that you have to hear about somehow. You get it through a search engine or you get it through a friend or whatever it is. You get it somehow. So it's exactly the same as
Starting point is 00:33:42 normal websites. The real difference for WebTorrent is that web browsers can't actually connect to people's desktop torrent apps and get files from those desktop torrent apps. So if you have uTorrent or you have Transmission or you have Vooz or one of these other popular desktop torrent apps, you can't connect to a browser and give a browser user the file that they're looking for that's because browsers aren't allowed to open up tcp sockets and talk to the network in that way it's too much of a security risk so web pages are kind of sandbox and not allowed to do that level of of networking so one of the biggest challenges of web torrent was figuring out how to how to get content into the browser from those desktop apps. And the browser can only talk in this one protocol called WebRTC. Have you guys heard of that?
Starting point is 00:34:34 We have. WebRTC? Yeah. We have. Yeah, and mostly I'm guessing you've heard about it in the context of video and voice calls, like Google Hangouts and Skype using WebRTC. Right. But a lot of people don't know this, but WebRTC is actually more than just a way to do video and voice calls from your browser. It can actually send any kind of data, an arbitrary kind of data, across this channel.
Starting point is 00:35:00 And so it's a way to make like you know browsers talk to each other but if one if these desktop torn apps add webrtc to them as a as another protocol that they can speak then um as far as the browsers are concerned browsers can connect to these desktop torn apps and not know that they're talking to a desktop app they're just talking to another webrtc endpoint and so we can have this big network where where the des where the desktop apps talk to the browsers and everyone can talk to everyone. It's really happy and nice. Unless you got to get a lot of the,
Starting point is 00:35:31 all the desktop app creators then on board, right? They got to add this to their app. Yeah, that's the hard part. So getting desktop app creators to see the value in web peers is pretty hard because a lot of the initial criticism people have of this is like, well, aren't people who are visiting a web page going to be a really bad peer? Aren't they just going to come consume the content that they're interested
Starting point is 00:35:56 in and then close the tab and leave and not share back anything? Which is a fair question. Yeah. But we've actually seen that on modern internet connections, most people actually finish downloading really quickly. And just the time that it takes to consume the content, if it's audio or video content, actually lasts long enough that they're seeding for quite a bit of time. And then there's also the phenomenon where people leave their tabs open. People have 50 tabs open and they'll leave a tab open and that tab will be seeding the content for as long as the tabs open so it hasn't been too much of a problem you also see that most uh torrents have like way more seeders than than leachers so this is actually mainly an issue for when a torrent is new and
Starting point is 00:36:40 the ratio is really imbalanced um and you have more leechers than seeders. That make sense? Yeah. Because you have that chicken and egg problem, basically. You have that startup timeframe that you have to pay the price, so to speak, to get it to enough people or have enough interest in the content for it to have enough people to serve it. Right, and BitTorrent actually has a great way of dealing
Starting point is 00:36:59 with that initial startup situation. This is what made BitTorrent such a beautiful protocol. It's this thing called tit-for-tat, where people share with the people who share with them. So if I send you a piece of a file, I might do that optimistically, assuming, oh, you're probably a nice guy. You're probably going to send me some stuff back. But if you don't, then I will stop sharing with you. And so in the beginning of a Torrent's life, the seeder will give different pieces of the file to different people. And then actually the seeder can go away, technically. And as long as at least one person
Starting point is 00:37:32 has every piece of the file in the whole network, then they can all work together to reassemble entire copies of the file. So there might be nobody who has an entire copy themselves, but as long as together, the sum of everybody's pieces can reproduce the full file, can actually uh you know everybody can actually end up getting a file from each other and it'll be really efficient does the original host maintain like their their own
Starting point is 00:37:54 kind of peer i suppose like even let's say there's 10 people serving the file and and they have 90 of it right but the original host still has the other 10% they're missing. Do they act as a peer? The original host, you mean like the seeder? Right. I guess, yeah, in this term, using that term as seeder. So like in the case of web, you know, I go to a page, I want to serve a video file. I'm assuming just based on how this works and knowing torrents and how that works is
Starting point is 00:38:24 that the idea might be to one, be able to serve the bandwidth originally myself, but then leverage the crowd to maybe save myself some bandwidth or whatever to, to be able to, you know, have this peer to peer network to serve this video file. But if, um,
Starting point is 00:38:39 as you said, you know, during the time you watch it, you might actually download most of it, but let's say, you know, there's 10 peers, but they, you know, those 10 peers only comprise 90% of the file. Does the original seeder or host, and as I said, does that still act as a peer?
Starting point is 00:38:55 Yeah, yeah, that's totally possible. a website owner and you're trying to use WebTorrent to reduce your bandwidth costs, then you probably care a lot about your stuff being available no matter what. And if it comes down to it, you are willing to pay the hosting or the bandwidth costs in order to deliver that file. So what you can do is, torrents have this feature called web seeds,
Starting point is 00:39:20 which are basically just HTTP URLs, like a location, an HTTP link that is the location of the file that torrent apps can use as a last resort if there are no peers. And this is actually something torrents already supported before web torrent. And so we, of course, support that as well. So I've actually seen video sites doing this where they'll have a video, they'll host it themselves, but then they'll use web torrent to actually play back the video and it'll only use their server if there's no peers available. I kind of tease up the next question, which is kind of like why, you know, interesting. You love mad science, obviously. We've talked about that. But, you know,
Starting point is 00:40:00 why does this attract you in terms of that? Is it to help, as you said there, to offset the bandwidth for certain sites? Or is it simply because the protocol is very interesting to you? It's both, right? The protocol is really interesting. But there's actually a really good argument for why torrents should be in the browser. I think that if we want this kind of peer-to-peer technology to take off, if we want to have the internet be owned by the people and be not, you know, we want to fight back against this kind of constant centralization, constant unification on just a few big services that we all use to do everything. Then we need to find ways to make it cheaper to build sites and host them.
Starting point is 00:40:41 I mean, for example, no one can really create a YouTube competitor because YouTube just subsidizes the costs of video hosting. I mean, video hosting is not free. Like it's actually really expensive for YouTube to take, to allow you to upload your home video. That's an hour long that no one's going to watch. That's going to get like two views in 10 years. Right. But they'll host it for you forever and they won't delete it. And they're just sitting on a hard drive somewhere and they're not charging you for that. I mean, that's crazy, right? And smaller sites like Vimeo actually charge you if you upload over a certain amount per month because they don't have a giant business that subsidizes the YouTube business.
Starting point is 00:41:20 So the smaller guys really can't compete with that. And so, yeah, this stuff is not free. It's just that it seems free because it's being subsidized by Google. And so, yeah, there's that aspect of it where I think like, okay, this actually levels the playing field. So smaller players can actually do the same thing, not worry about the bandwidth cost too much. But then it also kind of decentralizes the control as well. So it's a lot harder to take down content if it's in a torrent form because you have to shut down like all the different people who have it
Starting point is 00:41:49 and prevent them from sharing it. And the interesting thing is like with normal websites, you can mirror things. Like if I see something and I like it, I can save it to my computer and I can like re-upload it later and kind of get around censorship that way. But the link changes, right?
Starting point is 00:42:05 Like the original link is going to be broken and you're going to have to find the content at a different location. And so peer-to-peer systems that use content addressing, which is what torrents use, it's really nice because the link itself is basically a hash of the content, meaning that the link is a description of the
Starting point is 00:42:26 content. So as long as somebody somewhere in the world has the content, they can send it to you. And you'll be able to say, oh yeah, this is the content. This matches what I was expecting because I have the hash. So when I get the content from them, I can hash it and I can see and compare it to the hash I already had and say, all right, this is exactly what I was expecting. So I don't have to trust the person sending it to me. And if that person goes away, but someone else has the content and they, you know, they are also just as capable of giving me it. And I'm happy to receive it from anybody because kind of my link, the link I'm using to describe it is actually based on the content, not on, not on the location of where it exists.
Starting point is 00:43:04 It's, that's really powerful. So you've, you on the location of where it exists. And so that's really powerful. So you mentioned the one big gotcha, which I didn't realize, with web-based torrents, is that the desktop torrents need to support WebRTC. You also mentioned that sometimes people leave tabs open, and that can be a bit of a boon for those who thought that they would be leeching, but they end up seeding for a while. What are some other gotchas?
Starting point is 00:43:24 Obviously, this is like bleeding edge. It's not even in Safari, and I assume Mobile Safari as well. WebRTC supported in Chrome and Firefox, I believe. Perhaps others, help me out there. But what are some other things you ran into with regards to like, let's take this traditionally desktop thing,
Starting point is 00:43:41 which has full networking stack and all this, and let's put it in the web. What are some other web gotchas you've run into? You're right. Chrome and Firefox support WebRTC. Microsoft Edge also supports WebRTC, but not the data channel yet. You can do video and voice in Edge, but you can't do WebTorrent yet, but they're going to add it soon. Opera also supports it. You're right. Right now on iOS, since Safari is the only browser that you can use on iOS, and Safari hasn't added support yet,
Starting point is 00:44:12 you can't use it on iOS at all. But on Chrome, you have a lot of choices. You can use, sorry, on Android, you can use Chrome, Firefox, or Opera, and they all support it, of course. I think that there's definitely trade-offs, but one of the nice things is that it's not that hard to add WebTorrent support to your desktop Torrent app if you're the maintainer of a desktop app. It's basically 95% the same protocol. Once you actually connect to a peer, everything you send to them, every bit of communication
Starting point is 00:44:43 is exactly the same as it would normally be if you're talking to another, you know, like torrent app. It's just the way you get connected that's a little bit different. So instead of opening up a TCP socket, you'll open up a WebRTC connection. And so there's libraries for WebRTC support that they can just add in. And so you're actually seeing clients start to support it. In fact, I mentioned earlier, Vooz is one of them. They used to be known as Azureus, but now they go by Vooz. They've actually added WebTorrent support. And so you're starting to see it happen. And rather than waiting for it to happen, we've actually, at the WebTorrent project, we've
Starting point is 00:45:19 decided to go ahead and just make our own desktop Torrent app to kind of push the process forward. So the web torrent library itself is a JavaScript file, right, and that's the main way it was being used before was as a script that people would add to their websites. And then they could use our API, basically, they call functions to basically download the torrents that they're interested in and render them into a video tag in the page or an audio tag or whatever, however they want to view the content in the
Starting point is 00:45:48 web page. But because it's just JavaScript, that same code actually worked just fine in Node.js. And in Node.js, if you ran it, it would, because Node.js is more privileged than a browser environment, it can actually talk to normal torrent peers. So it's been this nice library that works in both places. And so we decided to make a desktop app that incorporates both types of environments
Starting point is 00:46:14 in one app that you can use on your desktop and use in place of uTorrent or in place of transmission. And then in doing so, make the web network stronger. So we created this app called WebTorrent Desktop that does just that. That's funny, I was gonna ask you why the need for a desktop app when the whole point is to put it in the web, but now that becomes full circle
Starting point is 00:46:36 and totally describes it. So the end goal there is you can help be a part of the solution as opposed to being a part of the problem in terms of why you'd wanna use that instead of like a transmission or a uTorrent native client. Well, there's also other reasons. I mean, it wouldn't be enough of a reason for people to switch if it's completely like, oh, help us out. You know, I'll help the network kind of a reason. There has to be like a real incentive for them.
Starting point is 00:46:59 So we tried really hard to make WebTorrent Desktop be the best torrent app that you could possibly use. And so it doesn't have any ads. It's completely open source and it supports video streaming. So you can drop a torrent onto the app, you know, and then immediately push play and play any of the files that are in the torrent back immediately. And even if you seek to part of the file that hasn't been downloaded yet, it will reprioritize the pieces that it fetches from the network in order to basically allow you to play it back before it's fully downloaded. And this is, I mean, this isn't like that crazy of an expectation. I mean, this is how YouTube works, right? You can seek and seek around and like, it'll load the part that it needs, but for torrents, this is kind of unheard of. So it's pretty magical and it works really great.
Starting point is 00:47:50 And yeah, I mean, if you look at what's out there with existing torrent apps, it's really not that hard to do better. I don't know if you've used any torrent apps recently, but there's... Transmission is the last one I've used. Yeah, same here. No, transmission is pretty good, actually. I used to use that. Yeah. It's actually pretty good.
Starting point is 00:48:02 Yeah. Although, didn't it have some malware in it recently or something? I'm maybe misremembering. Yeah. They had malware twice get into their installer files on their website. Yeah. I'm not really sure like how that happened. They didn't really give a full explanation of how they got hacked. But it was pretty sad.
Starting point is 00:48:19 Yeah. If you installed transmission from their website during a certain period of time, um, you would get this Bitcoin ransomware on your computer that would, it would encrypt all your files and then try to try to get you to pay a Bitcoin in order to get your files back. Dang. It seems like you can apply the open source, uh, uh,
Starting point is 00:48:38 philosophy here, at least for the, for the clients that are open source. And instead of just trying to convince them that they should support WebRTC, you could just go have a pull request or something against the ones that you'd like to support WebRTC and just add it. And that might be a more compelling way
Starting point is 00:48:54 to get it onto more desktop clients, at least the open source ones. Yeah, yeah, it's a good point. I mean, I'd like to do that. It's just quite a bit of work and I haven't had time to do it. Yeah, it's hard. Yeah, but WebTorrent Desktop's doing, I mean, the strategy. Yeah, it's hard. But WebTorrent Desktop is doing...
Starting point is 00:49:06 I mean, the strategy is working quite well. I mean, WebTorrent Desktop has been downloaded over 300,000 times already. And we have around 30,000 people using it, like monthly active users. So people have made it their daily torrent app and are happily using it. So that makes me really happy. That's very cool. And famously built on top of electron we recently had zeke sikellianos from github on the show talking about electron and i believe web torrent desktop got one or two shout outs yeah during that show so we're hitting up against our next break but for us i'd love to hear about your experience
Starting point is 00:49:41 working with electron and how that's enabled you guys to build your desktop client of a web torrent. So let's take that break and we'll talk about that on the other side. Our friends at ThoughtWorks have an awesome open source project to share with you. GoCD is an on-premise, open source, continuous delivery server that lets you automate and streamline your build test release cycle for reliable continuous delivery. With GoCD's comprehensive pipeline modeling, you can model complex workflows for your team with ease, and the value stream map lets you track a change from commit to deploy at a glance. The real power is in the visibility it provides over your end-to-end workflow so you can get complete control of and visibility into your deployments across multiple teams. To learn more about GoCD,
Starting point is 00:50:28 visit go.cd slash changelog for a free download. It is open source. Commercial support is also available and enterprise add-ons as well, including disaster recovery. Once again, go.cd slash changelog. And now back to the show. All right, we are back with Firas talking about WebTorrent.
Starting point is 00:50:58 And now let's change focus a little bit to a desktop client for WebTorrent that we talked about before the break. And it's built on Electron. And so it runs on Mac, Windows, and Linux. And yet, as Firas said, it uses the same web technologies and Node.js core and other such things. I'm assuming also WebRTC to do its thing. Firas, tell us about Electron. We've had a lot of attention around the Electron show and a lot of people using it and people thinking about using it and even us here at the Changelog wondering, hmm, how can we use that? Because it just seems so neat. But love to hear your experience as a user of Electron and something that's building on top of it. Yeah, I'm a huge fan of Electron. It's so good. It's basically like, if you remember the early days of Node.js when people,
Starting point is 00:51:40 when web developers first started writing JavaScript on the server side and that feeling of empowerment around like, wow, I can use the same language that I know, you know, that I'm familiar with and I can do server things like a lot of people felt so empowered by that. And I think Electron is the same thing all over again. So, you know, there's so many web developers out there who can do JavaScript, CSS, HTML, and now suddenly they can use the same skills and they have this whole, you know, crazy world of desktop apps unlocked for them. So I think it's like really exciting just from like an accessibility perspective. But then it's even more exciting. Even more than that, I think, is the dream of like write an app once and have it run anywhere on all platforms.
Starting point is 00:52:27 That was kind of the original idea of Java. But for like various reasons, it never really came a thing. And it's definitely that's dying off now. But Electron actually delivers on that. I mean, that's mostly, I think, credit is due to Chrome. Chrome works on all three platforms. And when you write a web page, you write the CSS for it, it renders basically the same on all three platforms. So Electron is just using that and basically benefiting from all of the hard work that the Chrome team has done to make the font rendering work good and the WebGL
Starting point is 00:53:04 and the graphics acceleration and the page layout, all that stuff work the same on all platforms. It's really great stuff. Yeah, it's, I don't know how, so you said the listeners have already heard the other show probably about the Zeek, about Electron. Yeah, it's good stuff. It's like, I like to think of it as, I mean, it is just basically Chrome plus Node together, the two together in one environment. And you can write JavaScript that assumes either environment. So like if you want to do some DOM stuff, you want to like use a canvas to draw something or you want to do WebRTC connections, you can do that.
Starting point is 00:53:37 And if you want to install modules from NPM and you want to use those, you want to require those modules and use the functionality that way, that works too. And that means that basically everything, you know, like hundreds of thousands of things that are on NPM are suddenly accessible to you. So you can do lots of stuff. There's libraries for everything. Nice. Curious what specific features that you're using in termsorrent desktop, the experience or the interface or the entire application polished and to rival desktop clients or even perhaps outperform them.
Starting point is 00:54:12 Because like you said, the pure reason of help us get WebTorrents everywhere doesn't really, you know, that plays with a small crowd, but not the larger crowd that you're trying to get. What in Electron or even in Chrome, have you guys used WebTorrent Desktop that's allowed you to create that native feeling or rivalry experience? We use basically every feature of Electron. I mean, so, of course, the main benefit for us is that the WebTorrent JavaScript code just works right out of the box in Electron. And it kind of auto detects the capabilities of the environment that it's in, you know, the networking capabilities. So it sees that the WebRTC object is there in the global namespace.
Starting point is 00:55:00 So it's like, OK, we can do WebRTC connections. Great. And then it sees that, you know, it can require the Node.js, you know, the net module and the Dgram module for TCP and UDP low level socket connections. And so that's great. So it uses both those in the same process, in the same, you know, environment. And then Electron itself adds on top of all the web and node stuff with its own kind of OS integrations that are really nice. So things like desktop notifications, you get like menu bar and taskbar and dock integration and like menus on all those things. Electron comes with an auto updater that's as good as Chrome's. so you can have silent auto updates in the background so the user's always on the latest version always has the latest and greatest code
Starting point is 00:55:49 without needing to manage that themselves or be notified or be bothered with it and it can do delta updates so it only downloads the diff between the current version and the new version so it's really fast to download new versions and there's probably more things I'm forgetting, like it has crash reporting and lots of other stuff. And
Starting point is 00:56:10 you can even build installer files for Windows, so the user double-clicks the thing and then the app installs itself, and on Mac you do the little DMG thing where the user drags the app into the application folder and all that stuff. So there's modules for all that stuff. So you can really have a very polished experience
Starting point is 00:56:28 that's, that's literally indistinguishable from a native app. Like, I mean, not exaggerating, like you can't tell that it's, that it's really a webpage there. It's, it's, it's, it's actually indistinguishable. You need to do some things slightly differently. So if you're a web developer, you have to kind of change some habits. Like it's very common on the web, for example, to like to make buttons have a little hand, you know, the pointer hand that shows up when you hover over the button.
Starting point is 00:56:53 Right. To show you that it's clickable, but that doesn't happen in native apps. Like native apps don't do that. So if you keep doing that, then it's going to feel a little weird. But it's just like small things like this. And there's certain kind of differences in how apps behave across os's too that you have to kind of think about so like on mac when you close all the windows of an application
Starting point is 00:57:14 the application continues to run in the dock uh but it doesn't have any windows visible but on windows and linux when you close the last window the app kills itself so you have to think about that and you have to be aware of the differences. But there'll be some if statements throughout your code, kind of like, you know, do this one thing here and do this other thing on this other platform. But it's totally manageable. It's not that bad, really. And the breaks, we were on that note, even the breaks, we're talking about Michael Rogers
Starting point is 00:57:42 roll call, which I'm not sure if anybody has seen it out there, but it's on his GitHub. And I think it's actually Roll Call. What's the URL for that thing? Rollcall.audio. .audio, that's it. So I think one thing to mention there too on what you're talking about there
Starting point is 00:57:57 is just like for people out there that have built a web app that they're like, man, I wish I can like have access to the file system or do different things that an application like, man, I wish I can like have access to the file system or do different things that an application would, a native application would, that Electron is the perfect fit to like take what is typically stuck as a web experience and take it to those different platforms. Or it's at least a good option to offer people. I mean, like the Slack app, for example, works just fine in the web browser. But if you want to have a dedicated app for it, you can install the Slack app.
Starting point is 00:58:28 Right. And that's built with Electron. And that thing's, I mean, the latest update they did to it, I'm pretty happy with it. Because the other one was a little bit more laggy, a little more slow. Yeah. Some of the recent improvements have definitely improved, for sure. Yeah. In fact, the Mac app used to be written in, in, um, like written specifically
Starting point is 00:58:45 for the Mac. It was a separate code base from the rest. Um, when the windows and Linux app used electron, but then the Mac one used, I think it's just like they built it with X code or whatever, but now, now it also uses electron on the Mac and that's, that's why it improved. It's just funny because people think like, Oh, it's going to be, it's a webpage. It's going to be slow. You know, it's going to be like pretty hefty. But it's not really, that's not really the case. I mean, the apps are shipping an entire Chromium rendering engine inside them. So the app size itself is actually, you know, decently big.
Starting point is 00:59:18 You know, you could probably make a smaller app if you didn't use Electron. But that's just the kind of the size on disk. In terms of performance, it's possible to build an app that's indistinguishable from native apps. And if you don't believe that, just give the Slack app a try. Give Atom a try. Give WebPrint Desktop a try. You can really see it. It's really surprising, I think,
Starting point is 00:59:38 that it's actually that good. So the hype is real. Yeah, I feel like I'm hyping right now, but... You are hyping it a little bit. It's made it so... I'm hyping right now, but I mean, it's... You are hyping it a little bit. It's made it so... The hype is real. I'm just really happy that, like, we took the WebTorrent library and just dropped it into an Electron app and then put
Starting point is 00:59:51 a UI on it, and then we had a Torrent app. I mean, it was, like, a really good experience. And it was not that hard. Yeah. The hardest part, honestly, if you want to know, like, the downsides of Electron that's useful, like, the hardest part right now is you have to ensure really that you're not using any node modules that contain native code, like C code that needs to be compiled for each platform.
Starting point is 01:00:19 So I don't know if you know, sometimes when you install things from NPM, you'll get this little build step where it's compiling some C library or something like that. And if you use any modules like that in your app, then now when you go to ship your binaries to your users and produce the.exe file and so on and so forth for all different platforms, then you have to actually have either a VM or a physical machine for each of those platforms to actually build the app. And that's a little bit annoying and hard to do for every release. So with WebTorrent, we've just avoided any libraries like that. I mean, WebTorrent has to basically be pure JavaScript anyway to work for the browser version.
Starting point is 01:00:58 I mean, because you can only do JavaScript. Right. So it was pretty easy for us to avoid it. But I recommend people trying to just try really hard to avoid, like try to find a pure JavaScript version of whatever functionality you need, because then if you, if your app is fully JavaScript, you can actually build for all three platforms from one platform.
Starting point is 01:01:15 So on my Mac, I can build the windows and the Linux and the Mac app. It's great. It's just, it works by the building. The build script just downloads kind of these pre-built Electron binaries, and then it reaches inside them and changes the app JavaScript from this default sample Electron JavaScript that's in there. And it puts your JavaScript in there, and then it changes the app's icon, and then that's it. You ship that to your users.
Starting point is 01:01:39 It's really simple. And you don't need to have a Windows computer or Windows VM to do it. So you've moved WebTorrent to the desktop. And nowadays, you are trying to move WebTorrent into Brave. Can you tell us about that? Yeah, so Brave is another Electron app. Brave isn't really widely known yet. So you guys are the first to hear it. But I'm trying right now to add WebTorrent to Brave.
Starting point is 01:02:03 So Brave is a new browser founded by Brendan Eich and some other guys. And they're trying to make a private browser that respects your privacy, doesn't track you, blocks trackers. And they're doing some interesting things with paying publishers as well. It's kind of interesting. The browser has a Bitcoin wallet in it, and it'll anonymously send money to the SIC visit if you're down to do that. But yeah, so they're trying lots of interesting ideas and experiments and stuff in Brave. And one of the things that they're open to is a torrent support. So the idea is like if you install Brave, you should be able to go and click on a magnet link or a torrent file and have it just play back right away or you know show up right away in the browser without a separate program and so uh since web
Starting point is 01:02:49 torrent worked so well in web torrent desktop you know the the js library just works great with electron we just thought well why not put it in brave and uh let you know let brave users just torrent things really easily so that'll be another perk for using brave over other browsers on the note of brave we did have brendan ike on rfc so for the fans out there listening to that show we're recording this on november 1st this conversation with for us i'm sorry november 2nd um so the published date will be a couple weeks from now but likely uh the show with brendan on rfc will be published i know it's already episode number 10, so just go check that out. Change all to come slash RFC slash 10.
Starting point is 01:03:30 But on that note, he talked about some very interesting things around the advertising world, the history of the web and essentially how everything is just crazily funded. It's just, you have to go listen to that show. So if, if what frosh has mentioned around Brave and all that interests you,
Starting point is 01:03:48 listen to RFC 10. You're going to love it. Yeah, I really like how Brave is going about things, like building in all the things that make sense for a browser to have. So like blocking ads by default, blocking tracking scripts, and maybe even torrents.
Starting point is 01:04:04 We'll see how it goes. If it works well, we'll hopefully be able to ship that in Brave. tracking scripts, and maybe even torrents. We'll see how it goes. If it works well, we'll hopefully be able to ship that in Brave. You said that about Brave and the breaks. When we were in the break, that's how we knew about this new information that the world's first hearing right now. It made perfect and total sense for you, given your mission with WebTorrent, to take it to the masses. It makes perfect sense that Brave is a partner for you to given your mission with WebTorrent to take it to the masses. It makes perfect sense that Brave is a partner for you to work with, at least first.
Starting point is 01:04:30 You know, maybe Chrome and Safari eventually inherit it through, you know, some contributions through you or whatever. But, you know, that makes complete and perfect sense, having known the story that Brendan told on RFC 10. Firas, do you mind if I ask you a job interview style question? You're not actually interviewing for a job. Okay, sure. Where do you see WebTorrent in five years?
Starting point is 01:04:54 Yeah, that's very job interviewee. Sorry. No, it's all good. At least it's not one of those trick questions or puzzle questions. That one's next. Yeah, so right now we're trying to ship 1.0 for the library and for the desktop app and make it really
Starting point is 01:05:10 solid and fix all the edge cases and stuff, but I'm not really thinking that far ahead. If I was forced to think about it right now on the spot, I would say that I imagine that the desktop app, WebTorrent desktop, will have a few million
Starting point is 01:05:25 users happily using it instead of other alternatives. So we'll make a bunch of those people happy. The app will still have no ads in it. The app will still be open source. And it'll be growing. And I think that will be a nice critical mass. Within five years, I definitely think there'll be enough people using desktop apps that support web torrent that basically anything that you would want to access from the current torrent network will be accessible to web pages so you'll
Starting point is 01:05:54 be able to just drop in the web torrent script in any page and pass it a magnet link or a torrent file and it'll just be able to get the content that you want and you'll be able to show it in the page and so that's really the vision i think i mean five years is a long time um and that's already starting to happen now so i think i think it'll be definitely the case that like most torrents will just work from browsers and i'm hoping too that we'll actually see more creative use cases of web torrent that are are not just related to getting stuff that's currently in torrents and just more new app ideas that are built and powered by torrent technology. So I've only seen one,
Starting point is 01:06:36 the most creative one I've seen so far is this app that takes a star data set, like a star map from the recent Gaia, like NASA release, that they released this map of all these stars, and it plots them in 3D, and it renders them with WebGL in the browser and lets you fly through the stars.
Starting point is 01:06:55 But because the star data set is really big, it streams it in over WebTorrent. And it literally, when I say streams it in, it literally streams it in, where as it gets more of the data, it actually renders the stars, so the stars just kind of show up like in the sky as they come in. And I thought that was a really cool, um, non-conventional use for, for web torrent. And I hope to see more like that where people are really just, you know, using it as a, as a utility to make their apps better
Starting point is 01:07:19 and using it where it makes sense. Well, I think this is certainly a new thing that is similar to your origin story, which was like, you know, I need a proxy to kind of get around this, get the downloads.com to help my teachers out. It's like, there's this new thing. And if you think about it creatively, then you can do some pretty interesting things. But, you know, on your FAQs,
Starting point is 01:07:40 you've got, you know, who is using WebTorrent today, and you've got lots of stuff listed there. But just kind of curious what, if you want to share some stories about some of these or any particular creative use cases that you're thinking of that aren't even in existence yet like where i think that's kind of where jerry was asking you like where are you going to be at in five years is more like cast some vision for us you know be mad scientist for us. I think there's a lot of potential in live streaming with WebRTC. So figuring out how to do live streams. And I mean, WebTorrent will be sort of tangentially related to that.
Starting point is 01:08:16 But fundamentally, torrents are immutable. They're not able to be updated. And with live content, you're constantly adding, you're appending new data to the stream. So I think that's probably like a situation that's probably even more in need of innovation of a peer to peer nature, just because I don't know if you've ever tried watching a live stream, but like lately online, but they're all, they all pretty much fall over when a couple million people join. And it's because they literally can't provision enough servers to handle the load of people who rush in at the same time
Starting point is 01:08:51 and all need to get the same video content. So it sounds like exactly the kind of problem that peer-to-peer should be able to help with. So I can see something there with WebRTC and live streaming, and maybe WebTorrent plays a role in some, in some way there. Yeah. Um, I don't know. I mean, that's sometimes two people build what you've built to build their own thing. And since you've got some history of building products, um, I'm kind of curious if you plan to dog food your own thing.
Starting point is 01:09:22 Oh, to make a live streaming thing? You know, you did the YouTube instant search, completely different, of course, but still, you know, you're kind of in that world of like, hey, now that the, I guess to a degree, that's what you're doing with Brave is you're integrating it there. But, you know, not just creating the tool, but also building something on top of the tool. Yeah. I mean, actually, to be honest, I don't really have a use case that I'm dying to use WebTorrent for. I kind of mainly made it just as a way of showing people that WebRTC is real and we can do things with it today
Starting point is 01:09:57 and we can do crazy things with it that people don't expect. And I was hoping people would come along and do crazy things with it. And that's kind of like that list of sites that you see there on the faq that list out all the things people are playing around with it uh yeah i i honestly don't have like a use case i'm dying to use it for what i do have though actually is i've been thinking about like just in the process of making the
Starting point is 01:10:19 desktop app i've actually seen a use case for helping people ship production Electron apps that maybe we could talk about. Tell us. Let's talk about it. So while working on the desktop app, like I mentioned, getting started with Electron is really easy if you have web development skills like JavaScript, CSS, HTML. But I wasn't familiar at all with how to like make native apps and how to ship those to people. And there's actually quite a lot of things you want to get right to make the experience really seamless for them. So one thing, for example, is like code signing. So if you don't, if you, if you, if you want to do things right, you sign your app binaries, meaning that there's a code signature on it that tells
Starting point is 01:11:05 Windows and Mac that this comes from a developer that has this name and that the code hasn't been modified by a malicious party during transit. And if you don't do that to your app, then when you try to run it on Mac, it'll literally just not run. It'll say, like, this app comes from an unidentified developer. You've probably seen that before on some. Yeah, control click and open that way. And you kind of get around it, but yeah. Right. So if you have to do that, then you're going to lose, you're going to basically lose all your like non-developer users because they're not going to want to do that. And that's just like
Starting point is 01:11:38 another bird, another like step in the funnel where you're going to lose people. Right. So you have to sign your app and That's a little tricky to do. And same thing on Windows. If you don't do it, then they get a big red scary warning that tells them like, this is a not commonly downloaded file. Are you sure you want to run it? So getting that taken care of, getting like the 32-bit versus 64-bit installer files figured out,
Starting point is 01:12:04 getting the auto-updater endpoint set up so that if a user on a 64-bit machine accidentally downloads a 32-bit file, you can auto-update them to the 64-bit build later, after they've installed the app. Things like this are actually pretty tricky to get right. So I was thinking that what I'm starting to work on, actually, is a kind of software as a service sort of a electron app builder thing where you
Starting point is 01:12:32 can give it your electron endpoint or give it your electron github uh repo and then it'll build your app for you and take care of all this like tricky stuff that like people don't want to worry about so that's something i've been thinking about like i think that would make electron adoption go a lot better like there's a lot of apps that look really promising on github but they're they're just you have to get cloned and run it yourself and i'm guessing that's just because like the developers of the repos haven't figured out how to actually ship a real you know solid production version of the app and build for all three platforms. Right. And you can do it.
Starting point is 01:13:07 You can do it today if you're dedicated and you really like look into it all. But I had to learn a lot of things. Like I had to package the DMG, like set a background image on the DMG that tells them to like drag it into the apps folder. And then there's like on Linux, there's like.deb files. And there's like, then there's Windows portable apps. I don't know if you guys remember those, but like Windows portable app is an app you can put on a usb stick that keeps all its settings in one folder on the usb yeah oh yeah yeah there's like all these different types
Starting point is 01:13:34 of things you you might want to do then there's the mac app store that you might want to package for so like you can figure all it out if you're dedicated like slack and adam and and uh you know brave and visual studio code and all these different people using Electron are certainly doing this today. It's possible. But I think, like, making it easier would definitely help to create more Electron apps and get more, you know, make it more accessible to people. So I've been thinking about ways to do that. I don't have anything to, like, talk about yet, but, like,
Starting point is 01:13:59 I've been thinking about it and playing around with it. So maybe soon there'll be some stuff there. I'm just really excited about Electron, in case you can't tell. We can tell, we can tell. That was certainly a curveball. We weren't expecting this new idea from you. It's aiming more at the indie hackers like us
Starting point is 01:14:13 that doesn't have, like all those ones that you named, they have dedicated teams working on projects like Microsoft or GitHub or Brave, the company, or they all have teams that are like, we can actually take the time and do each one right. But like you said, you find a cool thing, it's an Electron app on GitHub,
Starting point is 01:14:34 and the developer doesn't have the time to do the packaging and put the care into the distribution. And so I think it would be a good, it would be a boon for indie developers. Where does the web torrent play in did web torrent play into this idea or no it's all electron that's all electron yeah I know
Starting point is 01:14:52 web torrent played in I mean when I we were making web torrent desktop is where I like learned all this stuff about making a solid app right so I was thinking maybe you can not only do the packaging for them but host it for them and web torrent only do the packaging for them but host it for them and and web torrent can do the distribution oh right exactly exactly yeah yeah and and we and building
Starting point is 01:15:12 that automatically uh yeah yeah yeah so so doing the distribution would be really cool that'd also be a really nice way where you could say like all right maybe we should charge for the people who are doing this in a closed source way maybe they they pay for the um for the hosting and then we put it on a cdn for them but then for for everyone else maybe we use web torrent to kind of keep it cheap and not uh have to like host all that stuff i don't know it's an idea i like it indie apps man indie apps out there is like helping the indie developers you know better package their apps for all platforms if they're using Electron. I love it.
Starting point is 01:15:47 Yeah, it's really cool stuff. If you guys had a chance to actually try playing around with Electron yet, it's pretty neat. We're waiting. I read through the source code so when Zeke was on the show, he gave us a specific repository to check out, which I think is in the show notes for that episode. So check that out
Starting point is 01:16:04 listeners if you're interested. It's it's like a nav bar application i can't remember what it is now but i read through the source he said just go check it out you can see how simple it is to create a menu bar application i think it was all about emoji or something yeah emoji bar something like that yeah like emoji bar or something and i went i read through that and i was impressed with i i understood it pretty much immediately it's just called Moji bar now that I recall there you go Moji bar so that that got us excited about it with how easy it is to get started but
Starting point is 01:16:32 that's as far as we're taking it we just as you may know we just relaunched our website change.com and we just open sourced all the code for that so we've been doing that mostly recently but we have ideas and we'd like to do something with electron and get we do have this embedded player coming up so we do have a lot of design and user experience
Starting point is 01:16:50 thoughts into this player so i can see us playing with electron very soon like maybe soon just don't give time just okay commit to a time commit to a time come on tell us when your electron packager app app is going to ship, Ross. Oh, yeah. That's okay. Fair enough. By the end of the year, I'm sure. Yeah.
Starting point is 01:17:13 Well, I've actually just. I bet you can't do it before the end of the year. I'll accept that challenge. Oh, there we go. So Christmas present for everybody. Yeah. There you go. Well, cool cool you got a name for this thing is it is it just called uh electron app builder i don't have a name for it yeah no name he just came up with it here on the show so i yeah it was at um node conf eu and another node conference in italy like uh two weeks ago and uh i did a little electron
Starting point is 01:17:43 workshop there so helping people get up to speed with electron and people were basically all asking about this stuff so I think there's like there's maybe a need there so it would be cool to take all the things we've learned from from web point desktop and then put it into a reusable service or library or something and just for for those people and also just for myself, honestly, because I want to make another Electron app and I don't want to have to copy-paste all this building code. Solve it once, man. Solve it one time.
Starting point is 01:18:12 Just solve it once. Yeah, solve it once, right? Yeah, and then give it away to people. That's the lesson learned from this podcast is WebTorrent is the future. Electron is awesome. Solve it once. Yeah. For us, we love your story we love what you're doing we fully
Starting point is 01:18:28 support you in all you do obviously and we're excited about Electron just as you are hopefully we meet in the middle and when we're getting ready to launch our thing and with Electron we'll be able to leverage the work you've done here or plan to do before the end of the year since you've committed to it we bet you you couldn't
Starting point is 01:18:44 do it and you said I I'll take that challenge. So we'll see. Yeah, maybe we do a show about that. When you guys make a podcast recording app, like instead of us using Skype right now, maybe you guys could have like a branded changelog like podcast studio app where I install that.
Starting point is 01:19:03 Terrible idea. Terrible. We're more interested in distributing content than than I guess that we like to the side too but that's that's our next step for sure is distributing the changelog content that we make you know RFC go time future shows a lot of fun stuff around that but let's close this up so what's uh if we haven't asked you yet like what's one closing thing imagine you have the ear of the open source community. What's one thing, one piece of advice?
Starting point is 01:19:28 What's one closing thing that we haven't asked you that you want to make sure you share on this show? Be nice to open source maintainers. They're really overworked and it's a thankless job. So keep that in mind when opening issues. And remember, there's another human being on the other side. And, uh,
Starting point is 01:19:48 yeah, just, just be, have a little bit of sympathy. Don't expect, uh, instant responses. Um,
Starting point is 01:19:53 yeah, be a nice person. Be a nice person. I think we said that a couple of shows ago, wasn't it? Jared, like the maintainers nice. So we are nice.
Starting point is 01:20:01 Something like that. Wasn't it? Do you recall that? No, no. You were on that show. I you were i don't know you forgot anyways there was a there was definitely a tweet out there about that and they liked it so i i remember that part of that show it was it was yeah like nice to maintainers you know and and listen to request for commits if you're a maintainer right there you go that's right yeah i mean i hope request for commits if you're a maintainer, right? There you go. That's right. Yeah. I mean, I hope Request for Commits does a show about a counseling session for maintainers, how to cope.
Starting point is 01:20:30 How to cope. Coping as a maintainer. We'll do that show. We'll talk to you about it in the green room. We'll figure out what that show could be about. That's a good idea for sure. And if you're out there listening and you've got great ideas for requests for commits, we have an open inbox for the changelog but you can always email us at editors at changelog.com if you get
Starting point is 01:20:52 some ideas either for requests for commits, go time to changelog or future shows we do or even future show ideas so to speak so Frost, thank you so much for coming on the show today man, really appreciate you sharing all of your origin and the fun things speak so frost thank you so much for coming on the show today man uh really appreciate you sharing all of your your origin and the fun things happening around web torrent and obviously your excitement for electron and the future of what you plan to do there but uh listeners thank you so much for tuning in as well but that's it for this show fellas so let's say goodbye see you later. Goodbye. Thanks for us. I'm out.

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.