New Ethereum talks, every Monday. The week's conference uploads by event, in your inbox.

Loading player…

The Real Way to Host Workloads on Web3 - Eric Zietlow

Ethereum DenverSun, Oct 9, 2022, 12:00 AM

Transcript

my name is eric zietlow i am a the director of developer relations at the akash network um what we do is essentially um the same thing that like aws web services does on the compute side but we do it in a decentralized way and we'll dig into that a little bit here my background is largely in solutions architecture software development and networking i've pretty much spent the majority of my career working with distributed systems and complex compute um something i actually have a passion for i'm a little weird in that i came from that world into the crypto space rather recently i've been about six months in the actual token space um but doing a lot of what i used to do in web 2 taking it to web 3 and hopefully make the world a better place as a result so we're going to talk about a user today and this is uh could be anyone but this user has a problem they want to stand up a website or a web app they want to actually do something that is you know online everything online runs on servers this user needs access to those servers and this user also doesn't have them sitting in their you know bedroom or basement or garage they need to go to a service now this is a common problem actually in the crypto space because everything in crypto runs on computers do anyone know how much uh what percentage of ethereum nodes are on aws right now anyone it's about 80 that's a scary number because if you take a look at alibaba and what happened last year with you know chinese legislation basically de-platforming every crypto project from alibaba anything similar to that happens over here um ethereum's going to be in trouble a lot of other networks are going to be in trouble too because ethereum is not unique in that regard so our user here let's say they want to actually stand up an rpc node um what chain doesn't matter whatever chain you want but they want to stand up an rpc node so what would they have to do well typically they would have to go to one of the big providers and they would have to say you know i need compute i need to rent some resources from you in the cloud um that provider says great i'm happy to take all your money swipe your credit card here and we're off to the races now you'll notice the names have been changed there to protect the innocent or guilty in this case but um essentially there is a very small playing field when it comes to who's actually providing resources that we are utilizing in the crypto space so it's basically four major players and if you're not working with one of them um your quality of service starts to degrade really fast and there's a whole lot of other kind of nuances that start to appear all right so the concept of a provider i'm going to use this term a lot a provider is just someone who is providing computational resources to other people right so amazon is a provider if i were standing up a server and selling you a little bit of you know power on my server to run your web page i would be a provider anyone can be a provider as long as they are providing compute to someone else so in the akash network we took the concept of okay well look at the hotel industry what was the last major disrupter in the hotel industry anyone know just shout out airbnb exactly why was that well they essentially took all of these people who had these resources extra rooms extra houses extra you know whatever and said hey now you can actually turn that into an earning asset you can actually take that and turn it into something that's now active for you instead of just a static thing that you're having to maintain we're doing the exact same thing with server compute so we're creating a many-to-many relationship between providers and users um for compute now this is not file coin this is not sia this is not skynet any of the the storage stuff they do storage we work with them we do the compute you put those two things together suddenly we can start throwing rocks at amazon pretty hard which is in my opinion very very cool all right so how do we actually achieve this how do we make this safe because right if you have a computer and i want to run something on your computer how do i trust that you're actually going to provide me those goods and services that you are going to not be malicious you could be a black hat for all i know and you're here to mine data right so we need to actually start to create trust in an inherently untrustworthy world of you know the internet so that's where blockchain comes in because blockchain allows us to do a lot of really cool things around public auditing around relationship management and around payment assurance and we'll dig into that here so before we get into that though we have to take a look at container hosting versus virtual machines so traditionally if you went back 10 years and you went you got a cloud machine it would have been a virtual machine it's basically a computer that is not real it's actually a program that lives on another computer but behaves exactly as a computer would so when you'd go to amazon or google and say i need a server that has these specs they're not pulling a server off of you know a truck and putting it in a rack and plugging it in they're just spinning up a virtual machine handing you the credentials and voila you have a computer you don't know any different they don't care they take your money you're happy as long as it stays online well there's a couple problems when it comes to pricing and actual functionality around these first one is you pay for the overhead that that virtual machine actually has so the operating system that everything you're doing needs to run you actually have to pay to have that operating system on your vm so that's number one number two is generally these are kind of predefined boxes so if you have a workload that's very obscure for example maybe something that needs a ton of ram but not many cpu cores you're kind of locked into what their offerings are and typically that would mean you'd have to get a really really big box with tons and tons of cores even though all you wanted was the ram right so you actually end up paying for a lot of resources you aren't necessarily using the more edge casey we get which this is web3 we've got some pretty big edge cases out there the more educated you get the worse that problem is and so some of these infrastructure problems become very very very expensive very quickly with containers we're basically changing the approach now containers are not something we have invented at akash um if anyone's heard of docker kubernetes all of these have been around for a long time they all deal with different parts of the container ecosystem um the cncf or cloud native computing foundation actually does a really good survey every year where they ask people basically how are you running your production workloads that website when people go to it what is it running on back in 2016 um it was about i believe 70 of the workloads in production from everyone they they uh surveyed were running in containers since then that number has spiked to about 85 and it's going up basically if you're not running in a container today you're trying to get there so what we did is we sat down and said well why would we make a virtual machine hosting you know kind of recreate the traditional web too when everyone's moving to this cloud what they call it cloud native it's kind of a buzzword basically it just means the a very portable um extendable way of doing things why won't we just build it that way so what we are if you want to think of like a web 2 service that's roughly equivalent would be like eks or google container service that's basically where we would fit into the stack all right containers are always built using a generally well declarative files and these files essentially are recipes if i were to bake a cake and i took a recipe i could follow the instructions put the right ingredients in and at the end of the day if i put the right amount of temperature the right amount of time the right ingredients i should end up with a repeatable result that's the same exact concept behind a container in akash we use something called an sdl file and it's the exact same concept of if i have an stl file and i can hand that to someone and they can follow the instructions in that sdl file i will always end up with an exactly identical image of the container i want so it's actually really useful and it's really cool here we'll walk through one if we have the time here okay so just understand the sdl file turns into a container if we've got that we can all be done here and i can go home no i'm just kidding so it is kind of the core piece of this whole thing all right so user they've taken the time they put their sdl file together and it has all the parameters of how much ram how much cpu all those things are laid out there the container image they're using it's all defined but they now need to actually get that on a you know have someone host that someone has to bake the cake so to speak so what do they do well they go to blockchain and they basically post this out on the chain as a request for bids and what happens is providers on our network and remember these providers could be anyone from like amazon could provide our network they never would they hate us we're obviously threatening their business but they could provide our network could be someone you know i know a guy out in france who has like a bunch of old dell blade servers he stood up and he's a provider it could be anyone so they're all watching the blockchain and when a request comes through that they can fulfill they get to put a bid on that request now this is the other really cool part because if you want certain things like you care maybe about gdo pr compliance or you have hipaa compliance right now we don't have any of a compliant provider it's just full disclosure but if if those things were concerns to you you might be willing to pay a little more for those things or maybe you'd be willing to work with a cheaper provider who isn't offering those things so it's actually creating a free marketplace where people can transact not just as big corporations with this kind of corner on the market it actually gives the freedom back to us as the the users so okay so the bids hit the chain the user actually manually gets to select the bid they want it's not programmatic you actually click the one you can look at the attributes of the provider you can tell who you're working with and you can select the bid you need then the user is going to send a lease which is essentially the yes i accept your bid we now have a relationship we have a working business relationship i'm going to transact tokens with you in exchange for your compute and they send an escrow that escrows are really really tiny it's five tokens what that escrow actually does is ensures that people get paid and no one can run away with the money so payment happens every single block for that last box compute the worst case if someone were to like cancel a lease and try to run with the money is they'd get six seconds worth of uh you know burn time that's nothing right that's like fractions of a cent so there's no incentive to actually behave badly here because all of the payment transfers through this escrow to get from point a to point b if i as the user were to cancel my lease early because maybe i just needed something up for a week and maybe i had you know six months worth of burn time in that escrow account i would get my funds back so it's a very equitable and trustworthy way to actually handle this and it's all on blockchain so it's actually all auditable it's queryable it's it's a really really cool thing all right so once that relationship has been established and that lease is taken out now as the user i would send my sdl file to that provider if you remember i said sdl file is essentially like a recipe for a cake once that provider has the sdl file they can quite literally bake it into the container and now my website or my miner or my rpc note or whatever it was i was going to go spin up is now running i'm returned endpoints i returned all the things i would need to actually manage it and i am now running in a decentralized cloud the cool thing about this too is since we're using a repeatable recipe i can work with multiple providers and like start putting load balancers in front so people always ask me like how do you handle durability on the akash network well take out two leases on different providers throw a load balancer in front now they both have to go down or maybe i could do it on like i don't know 10 or 15 or like whatever level of durability i need to achieve i can do as long as there are more providers okay so tons and tons of providers exist out there i need to know who i'm working with is honest right so what do i do well that's where these things called assigned attributes come in this is kind of in some ways like airbnb how you can give someone a rating and a review except it's all stored on chain so it's all publicly queryable and it's all based off of addresses so someone can tell that such and such address took out a lease at this time they terminated elise at this time oh and then they assigned a bunch of these attributes to the provider of like unstable or maybe it was super great experience or something like that or trusted or whatever the problem is is those are just user reviews i could rate myself a hundred out of a hundred because i like myself doesn't make me any more honest or good or providing what you want how do we actually accomplish that well that's actually done through a bunch of community members now currently this is a brand new thing that the community took on as their own initiative a company called akash audit was actually formed it's a former dod pen tester he actually used to do go around to different dod sites and basically perform network analysis um he now is working with a bunch of the providers to validate that they're actually providing what they say they're providing he's doing some tamper detection on container stuff a whole lot of different levels of security with these providers and when he does that with them he signs them with his address which he's published publicly and gives them attributes so now we can actually trust as long as we can trust his process which he's published open source every single piece of it whoa sorry about that every single single piece of it you could go and download his tooling right now start a clone of his company with everything he's provided so very very audible the auditor is audible and we're encouraging more and more people to get in this space to help decentralize that auditing process if we can get you know 10 or 15 auditors suddenly now we have a pretty good decentralization for this type of a model all right so when that actual bidding process happens if i filter in my sdl file off of i'm searching for this person's signature and these specific attributes only the people who can satisfy that the providers that can satisfy those conditions will even be allowed to bid so i don't have to sit there and like sift through and double check they don't even get to bid if they can't satisfy those requirements so end of the day this is my like you know pencil scribble drawing of a tiny little slice of the akash network but basically this is truly a many to many relationships one provider can work with many users and one user can work with many providers and through that we can achieve high durability just the performance people are looking for they don't have to pay for other things than what they're actually using now if i have i think about two minutes here i'm gonna take and i am going to actually run a quick deployment can you all see that okay thumbs up okay good cool so um what i've got here this is a community tool so akash is truly an open source network most of the tooling most of the different pieces of it come straight from the community this was two guys out in montreal who basically quit their fiat jobs to develop full-time on the akash network they built probably one of the best deploy tools i've actually seen it it's not quite like heroku but it's about as easy as heroku if you're familiar with that so we're going to go ahead and we're going to create a deployment now it's going to check that i have wallet balance which i do up there there is a built-in wallet to this tool so i could send receive tokens do whatever i got to do it's also going to check i have a valid certificate which is something i did beforehand so we didn't have to sit here and wait for it um but essentially that just validates that yes i am who i say i am this is associated with my address i can make changes to my deployments yada yada yada i'm not screwing with anyone else's stuff okay so once we've done that we're now going to go ahead and we're going to select a template now if i made my own sdl file or i pulled one from someone else i just hit empty there and i'd copy paste it into the next window but for the sake of time here i'm just going to choose tetris and go ahead and continue now you remember i was talking about these sdl files this is an sdl file what we have here is i am pulling literally from docker hub a tetris image to a tetris game i am setting my resources so you'll notice here this is not a typo 0.1 cpu units i am literally renting a 10th of a cpu unit because i don't need a whole cpu to run tetris so i'm saving money that's that's one of the other kind of like cool things about container hosting okay i am filtering by a specific set of providers they have to have been signed by this address in order for me to trust them and then here is the max amount i am willing to pay per block uakt is a millionth of an akt token i'm willing to pay up to a thousand uakt per block which is like six point uh five eight two seconds i think um i'll pay that much for compute now that would be an absurdly expensive deployment i'm really only gonna pay like one or two uakt but just for the sake of demo here making sure i'm getting everything returned okay lastly i can actually scale straight from here if i want multiple deployments like i wanted two or three of these containers i could change this number where it says count and i'm sorry grammarly is in the way where it says count i can change that number and increase it and deploy multiple containers in one go so i'm going to go ahead and i'm going to just say demo this is just for my own purposes so i can keep track of the container now you remember i was talking about the escrow that's this step right here so i'm going to go ahead and i'm going to deposit 5 akt and i'm going to approve the transaction this is literally that step where i'm taking that sdl file posting it to chain so there's a little bit of gas now this isn't like a theory of gas this is cosmos gas is like fractions of a penny so i can do you know i can do operations all day i don't think i've ever paid more than like a cent for gas ever on cosmos um so let's see here we have a whole bunch of different providers and i can go down and i can drill into any of these i can see a lot of attributes that people have signed to them i can also see what resources they have available because those things are published so this one has 80 virtual cpus 8.7 gig of memory i'm going to guess this is one that was actually set up for a minor we have a lot of people that provide resources to miners on our network it's a very very popular use case i'm going gonna go ahead and click this one um you'll notice it was one uat per block i'm going to accept their bid which is now doing the transaction where i'm setting up that lease i'm setting the escrow doing it and in just a moment here we should see this container spin up now if i've done this all right which in this tool it's really hard to mess anything up unless i had like a trashy sdl file that i had to clean up um we should be playing tetris in just a minute and i'm going to go ahead and mute it because it's got the music and i don't want to like deafen everyone in the room so all right here we go it is spinning up as soon as this part right here stops spinning i'm going to go ahead click on the url that's provided there and we will be playing tetris and so keep in mind as well that this doesn't have to be tetris this could be anything this could be whoops okay that's lovely let me go ahead and we're gonna do it there we all right so yeah i'm playing tetris on the akash network that took me a minute and a half to spin up maybe two minutes something like that um that could have been anything that could have been a database that could have been um a web app that could have been a whole micro services architecture you can set uh you can set up multiple containers in a single sdl and deploy an entire microservices architecture like one shot um it's really really really really functional and um it works this is mainnet this is live this isn't a you know like proof of concept demo this is actually out there right now and you can go get akt and you can transact and you can do it so um i think that's my time um yeah and if you have any questions come on talk to us we love to connect

Automatic transcript — names and jargon may be misspelled.