J3 SAY 04 Eric Tang Video Livestreaming on decentralized internet
Ethereum Paris·Tue, Oct 9, 2018, 12:00 AM
Transcript
hello everybody welcome to the talk I first want to thank all the organizers and the volunteers we can make this happen really it's really great to be here also thanks for you guys too for skipping last talk to be here so so I'm from life here and one of the core devs and life here is a decentralized video live-streaming network that's peer-to-peer so what that means is instead of using a centralized video service provider that provides video streaming services in live here people stream video from from and to each other in a peer-to-peer matter and before I get started I'm going to start broadcasting to my mom who lives in Japan because I told her that I would do this and now I just have my phone here to show you guys a little bit of how this works so right now what's happening is this is all running on the on the rinkeby test net it's streaming from my phone into a peer-to-peer network and it's it's using the incentives in the peer-to-peer network to stream the video around and to do the processing of the video it's also using some protocol level verification to make sure the computation can happen in a trustless way so today I'm gonna you can see there's a little bit delay and in regular internet broadcasting there's about thirty Seconds to a minute of delay so today I'm going to talk to you a little bit about how this works tell you I'm not gonna go into all the details because there's not enough time but I will talk about some of the decisions that we've made in water for this network to work with etherium as it is today to overcome some of the challenging challenging problems for scale for scaling on the network and then tell you a little bit about the future of the of the network and what it holds so let me go back to my slides so to to understand how video works inside life here we first have to take a step back and talk about how video works today in the centralized web right so you know when I'm pressing stream for my phone it's not just it's not just going the the picture is not just going directly from my phone into into some on to some device on to some device right there's this kind of treacherous process that the video has to go through in order to reach all kinds of devices and all kind of all over the world so so just a quick walk through when you broadcast a video from any video source usually it gets input it into a cloud hosted media server this media server does a few things that are really important one is that transcodes all the video into all kinds of different bit rates and all kinds of different formats in water to be able to serve it in in any network condition right think about like your foam being on a 3G network versus sitting sitting at your home maybe you have high-speed or net that's a very very different requirement and also all kinds of devices with all kinds of you know a video on the phone is a lot smaller than a video on on HDTV right so you order for the video to be consumed by all devices there's a lot of processing that that's involved another thing that it can do is to store the video for a later playback and also it can potentially apply DRM on top of the video to preserve the privacy of the video itself and if you want to send the video to a lot of people you have to send it into into a content delivery network which multiplies the video and then sends it to the edge of the network where where all the devices are to consume them so on top of this complexity we also have this issue of capacity planning right it's kind of like building roads when a city builds roads even though most of the time the roads are empty but they have to build this these wide highways in order to account for when when peak traffic happens which often happens like this right so what you end up having what we end up having is to you have to you have to build a lot of infrastructure and hold it in place just to account for when a lot of people are coming into your service and using your streaming service even though like AWS and spot instances are making it a little better this is because you can as an on the application level you can spin up and down these nodes but on the infrastructure level they a lot a lot of times you still have to keep the Headroom in order to account for the capacity and this is a really systemic problem in the video industry right because this introduced a lot of cost in the industry so if you want to do a video transcoding if and you want to use a SAS service cost about $3 per screen put out or you can license proprietary software if you want to build your own technology own stack but also that's very expensive because there's no good open source solutions no open source media servers out there the people don't have a lot of options on top of that the delivery of the video is so so very expensive it comes out to be about a dollar per user per month for for a popular you know service like twitch or YouTube and you know when you add that up if you have millions of users you could be specific you could be spending millions of dollars just to deliver the video right and this is a big problem because this prevents existing videos video applications and video services to be independent in it independent entities right because if you look at all these popular services on the internet that serve video a lot of times they eventually get bought up by these giant corporations with big big pockets right YouTube for Google you know twitch for Amazon so and so forth and there's a reason behind that that's because it's - it's simply too expensive to run these services as individual entity and then the investors eventually get tired of funding these projects they don't know how to make their money back well so so being able to cut down the cost is it's very crucial in this industry and that's why people have been trying to do this peer-to-peer video streaming for a long time now right this is not a new idea people have been trying to do this for the past 10 15 years and the idea here is simple right instead of using the central decentralized services to provide the video service you try to use the we all try to chip in as a decentralized network right maybe we try to relay the video around maybe we try to do a little bit a transcoding for all of for each other and that seems like a good solution right like BitTorrent is founded on on a principle like this but in a video network the requirement is much higher right because in a in a peer-to-peer solution we eventually we never Lee happens is you have these trolls in a network right they are taking a lot of they're taking a lot of resources from the network and they're not giving a lot back and and these protocols don't really have a way to effectively protect themselves against bad actors in the ecosystem so even just a few bad actors can really grind the working a halt and so so what these peer-to-peer solutions end up evolving to is are these proprietary solutions where you know the client nodes are running proprietary software and and that's the only way they can they can prevent people they don't want from joining the system they have to you know whitelist all the peers that are in the network which takes away all the nice nice property of open peer-to-peer network where we're all sharing resources and pushing the cost down together right but that's the past because now we have this new paradigm of building peer-to-peer networks right we have the blockchain and the blockchain is amazing because it gives us a way to create an incentive for people to actually provide value instead of just taking value from the network right so if you look at if you look at the middle of this picture and imagine this as the decentralized internet in the future say like the big web 3 dream right what we want and what we want is we want these nodes to be able to do the video transcoding the encryption the storage and delivery all by themselves and on the protocol level incentivize these nodes to join a network and do that and also weed out the bad actors who are trying to take advantage or cheat so for for application developer with this with this kind of end goal all you have to think about is sending your video into the network and expect your your output video to be sent to your to your viewers without having to worry about all that complexity and that's what life here has started to do in in the industry centralized video world so I have another demo to show you guys which is how we do this this decentralized video processing so let me see so what I have done here is I have shared a video stream into my computer and what this is doing is in real time transcoding my video into many different versions right so maybe the big version is for it's for a laptop maybe even a bigger TV the middle over the middle sized version is for for a tablet and a small version maybe it's for film right and all of this is happening in a decentralized on a decentralized network using using a secure protocol so that as a broadcaster I can I can trust the video is done correctly and and this is this is what enables a really smooth playback experience on the internet called adaptive bitrate streaming and what that means is the player knows how to switch between the video format the the video bitrate depending on its own network condition so you know sometimes when you are playing like a youtube video on your phone maybe it starts out really blocky but he gets it gets crisper in a couple of seconds it's not because your phone was freaking out at the beginning right it's because your phone was consuming a small like a lower resolution video and it found out that there's your have more bandwidth so I started downloading a higher resolution so I'm not gonna go into all the details of the protocol itself but I will talk about some of the high level principles that we followed when we're developing this protocol right I think the most like one of the most important things when we're creating these decentralized protocols is to think about the participation how can we get people how can we get high level participation in the Indus protocol right Bitcoin is an example there were two parties that participate the miners participate by mining the blocks that that that then increase the security of the network and then the token holders by the token off of exchangers or they simply huddle or they trade but that also that increases the value of the token and because of the increase of the value that drives more miners onto the network it creates more security so so that incentivizes a high high quality participation but you can do that for something like Bitcoin because you're simply just doing your you're simply just doing calculating the hashes right but for something like video streaming it's a very special service that you're providing because when I'm streaming this video out I don't want anybody to be able to to be just providing the service to me right because if you know you're sitting in this room using a laptop I don't want to be streaming my video to your laptop and your laptop is doing the processing maybe you close the laptop in the middle of my stream and walk away that completely disrupts my stream so what we want is to have participants that have the ability to provide really high level services maybe these people have access to to a lot of computation power maybe they live in a location that has very very high bandwidth and maybe they have experiences in keeping in keeping services running so to do that we have to have a different model and what we use is a delegated proof of stake model and a lot of a lot of protocols use this there's a protocol called steam it which is a social social network they use delegated proof of stake to to verify transactions and in order to achieve very high throughput for for a use for a use for video sorry for social network so how does it work inside life here basically any service provider so in this case a transporter can raise our hands and say I want to be I want to be a transcoding the network and and they can campaign you know maybe they post their aetherium address on like in their social profile maybe they maybe they go to the live peer forum and they can campaign in a variety of different ways right maybe they'll say you know I know how to run a big cluster or maybe they'll say hey like I'm a damn important member of the community because I made a really kick-ass life here mobile app whatever it is they try to get people to delegate their token toward them and they can also provide on chain evidence to to tell people that they're they're credible right because as a transcoder you're gonna have you're gonna have history people can no definite definitively how long you've been a transcoder how much job you have done how many time you have cheated or been slashed and your maybe your rate which is how much we charge for the video for the video transcoding service you provide and also how much of the of the rewards that you get you're willing to share back to the people that delegate towards you which we'll get into you know a little later so during this campaign process token holders can pick any of these any of these and transcoders to to delegate towards and after this delegation process what we have is at the beginning of every round you know around could be you know a day a week a month we have this list of active transcoders that will then get get distributed jobs depending on their stake in the network so this is all good so I'm gonna talk a little bit about why why this incentivizes good good behavior and disincentivizes bad behavior right when we think about instant intensives there are a couple ways to do it one is using the fees right simply letting letting video transcoders to get paid for the for the work that they do and that's good because one it prevents this kind of like DDoS attack where where the users are like a spam you know network right because there's some cost I know so it kind of rewards the the providers for for the services they provide but also okay so so in the in the fee scenario the goal is to make it as easy as possible to pay the fees for the service for the service people provide so in this case all the fees on the life your network are paid currently in because most people a lot of people have ether but I think in the future the protocol will support any kind of token payment right for example I'm really excited about stable stable coins I think you know the maker - sorry the die token from the maker team makes a lot of sense in this case where people want to pay for some kind of commoditized utility and on top of that there's also rewards right so so that gets into the territory of inflation inflation is an interesting mechanism because it drives a lot of a lot of adoption in the early days of a protocol right Bitcoin has inflation and I'll argue that's why Bitcoin the Bitcoin network is able to bootstrap itself so quickly and in and in the live peer network there's also an inflation and the inflation is distributed to the service providers but for for the special role that they take and the service providers can choose to distribute a part of that inflation or reward to the people that stake toward them and because the the people that are staking are also participating in the network by pointing out who are good service providers and they're and they're kind of laying down their stake for the long term and aligning with in that work now we're gonna go into a slightly controversial topic which is how do you define the inflation right there are a lot of models out there specifically for live pure we think the inflation should be there for a reason right and and for a network like life live pure the value of the network comes from the service that it provides right so ideally that the bigger the network is the better service it provides the more valuable the network the network becomes and we talked about earlier right participate like high-level good participation means better value for the network so so what we do here is we peg the inflation against a participation rate so let me give you an example so say the current the current inflation rate is at 8% and maybe maybe our target participation rate is at 25% which means we want 25% of all the token to be bonded to be participating in the in the protocol and let's say we're currently at 23% so what happens in the next round is the protocol automatically increase these increases the inflation so that it it incentivizes more token holders to participate right because remember all the inflationary rewards are going only to the people who are participating in the protocol so if you're just holding a token and doing nothing you're slowly being your token is slowly being diluted from the inflation so this increase of inflation incentivizes more participation and maybe we overshoot a little bit to 26% and in the in the following round the inflation rate automatically adjusts adjusts down so so maybe some people unbond because of that reason and let's say we settle at 25% which is our target rate and from that point on the inflation rate will keep going will be keep going at 10% all right so that's some of the reward mechanisms that we use there's also punishment right because we want to make sure bad actors in the in the system go away then and they'll be punished and and there are a few different ways to punish people one is through slashing another is through kind of read the reputational punishment and and sometimes you can even kick people out from participating right so I think like token curated registries use this pretty extensively so in terms of life peer well we will be aim to do is to when we when we were punishing somebody we want indisputable evidence that someone is doing the bad work right so so I think the goal here is to make it so that it's automatically decided that someone someone has done the wrong work and the protocol automatically slashes them so what we do here is we have this trustless transcoding protocol that basically when the when the transcoder is doing the work for every segment that each codes it's it's creating these cryptographically assigned claims and when it finishes all this transcoding it creates a merkel root of all the claims and writes about rights head on to the blockchain and at that point the blockchain pics of a pseudo randomly picks a specific segment to challenge and and the transcoder has to provide the proof that it has transmitted correctly and in order to provide this proof the transcoder cannot be the one that's doing the let's doing the challenge work right because they can just do anything so in this case we use a computer Oracle to do the transcoding again who is not the transcoder itself and if the computer Oracle writes the same result back on chain it means true the transcoder has done the work correctly and if he writes a different result it definitely means the transporter has done the work incorrectly and therefore they will be automatically slashed so this computer Oracle is an interesting question right like how do we make this how do we make this decentralized and how do we make it really good and that's and this is an open research question and we're really excited to be to be participating in the in the tribute research we've been working with the team for a while and recently we we've made a lot of good progress on this front if you haven't checked out true bit you should definitely do that it's a really cool project use some really clever compiler level trickery to to narrow down the computation to a single computation step and execute that on chain and it's able to figure out who has done the right work I think they're looking for compiler engineers to join their team so if you're interested you definitely talk to them and so so where is the project today we've been we've been working on it for about a year and a half and we are very close to launching the the network as you've seen it's already running on rinkeby and we're hoping to deploy deploy the first version on to the May 19 the next month so so but this is just the first version of the protocol right there are many open interesting research areas that were they were working on one interesting area is an inflationary incentives for video distribution because we talked a little bit about video transcoding right but but video distribution is another really important piece for doing the video chain of online video transcoding right now the delivery works in a peer-to-peer fashion on a in a kind of tit for tat way so that in so that while it works it's not gonna scale to thousands and thousands of nodes participating but with the correct incentives this network can grow grow in a very scalable way we're working on we're working on some verification for non-deterministic of for non determinacy now deterministic computation and what that means is you know a lot of times in video transcoding and video processing especially when you're tapping into hardware acceleration the output is inconsistent right it's using some floating-point calculation and and the output is always a few bits off so being able to I being able to define that constraint in the computation and still verify the computation even though the output is not bit but bit by bit exact it's a really interesting area another thing we're working on we're working on is on chain randomness and this is something I think will benefit a lot of people because the the picking of the challenge fit is right now pseudo-random and we want to make it we want to come we want it to come from a better randomness source and finally the low cost payment mechanism is something that people are talking about a lot right payment channels this swarm team is working on a checkbook contract which is super interesting and we're and we're happy to participate in that and there's also probably probabilistic micro payments I think that came out of the the work hit team so so this is the this is something that the video industry has never seen write an open source completely open platform with permissionless innovation that anyone can come and build crew products it's really unique for the block ecosystem so what life here is essentially does is it brings that kind of innovation into the video industry right so we just talked about transcoding but there's all kinds of processing that you can do on top of videos to make it more engaging imagine watermarking right this is not just putting a logo on the video if you say if you're watching a sports game all of the date amount of data that's superimposed on the trend on the feed is is watermarking right you can do image detection image tracking video manipulation any kind of object rendering and all of this can be done in the same under the same framework another interesting opportunity is creating the bridge from the blockchain to the real world right because a lot of application developer maybe they don't understand crypt white as well maybe they don't hold crypto and they want to just pay in cash there's an opportunity to build a real business on top of the live peer network to just to just do that and finally there are so many DAP ideas that we have right and in this decentralized video service creates all kinds of new opportunities that was not available before something something I'm really excited about is unsensible journalism right when when when a war or a conflict breaks out the first thing that gets cut off is the is the live video feed but with a decentralized network it's much much harder to censor the video you can create auto scalable social net social video services because of the underlining economic principle in the blockchain you can create pay-as-you-go video services that really create that really creates a tool for small business small business owners instead of tying them to a centralized platform that charges anywhere between 50 to 30 to 80 percent of the transaction and there are all kinds of interesting DAP ideas that we have in we haven't even thought of so make it really easy for people we've created life here j/s which is a which is a newer project but it contains all the it contains all the components that's needed in order to create adapt on top of life here and a theory so the video players that I just showed earlier was was it was a completely decentralized application that's talking it's using live PHAs to talk to the peer-to-peer network and the blockchain so that's all for me again I'm from live peer you can find us in our Gator Gator I am slash life peer and am I do I have time for a few questions one question I'll be outside after can you expand a little bit on the token model very interesting yeah so the token is really there to incentivize participate like high-level participation right so as people are staking their token the token is not used for payment because we want payment to be as easy as possible so that people can pay with anything the token is really there to say as as you can say as a governance mechanism and and it's meant to say one I guess one use case is for it to reward people and attract service providers onto the network because anyone can provide their service but we want people to be to be participating from all over the world and in the G and the geographic element in in video streaming is important another is it allows people to stake their token to award certain certain service providers to vouch for them and basically that's a signal for the broadcaster's to come in and say you know I want to you know because I want to use high quality video service then I can I can pick the ones that they have more stakes alright thank you all for being here [Music] [Applause]
Automatic transcript — names and jargon may be misspelled.