A new way to do CLOUD for NodeJS developers - Serverless Cloud

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hello world and welcome to another episode of today we are going to talk again with jeremy daly we are continuing our discussion from last week and in this video we are going to see a demo a working demo of serverless cloud the latest release from serverless inc that will help developers to get started in the cloud so let's get started with the chat with jeremy i want to talk about what uh you have built in serverless inc but maybe you can guide us through well we have talked about all these developers and all these problems that developers have so how the launch that you have uh done recently well like in beta launch what it is yeah so yeah well why don't i share my screen yes yeah so what we've been working on so my whole um i think my whole serverless career basically so i started this you know very early on um what was it 2016. i can't even remember now i started working with lambda a very very long time ago um yeah we're pretty much right at the beginning and discovered serverless framework very early on and i loved it it was easy it was so simple to just deploy something but as we just talked about life has gotten complicated right i mean we've got all these different services there's all kinds of crazy things that are happening um all kinds of configurations you need to think of there's a whole serverless lens to the well architected framework in terms of how you should be logging and monitoring and observing your applications and then uh everything to do with you know how you're configuring security and some of these other things that we that we talked about um you know with impermissions and some of that stuff so i've been trying to build all kinds of you know open source projects that just make life easier i built something called lambda api that was basically like express but specifically for lambda and optimize for serverless environments i built dynamodb toolbox which was a way to sort of abstract single table design into entities and make some things easier and so about a year ago austin came to me and had this idea for serverless cloud and it was the idea of basically making it so you could launch and develop serverless applications but as a developer that didn't know lambda and api gateway and eventbridge and all these other things that were happening behind the scenes um so we spent a couple of months sort of talking about this i eventually joined the company developer we are talking here because for example when we talk about amplify and a lot of these type of tools is really focus it on a front-end developer but this is correct backhand development this is more for back-end developers right yeah so this is for people who like building express apps and things like that you know that that kind of uh that kind of level of developer um we are you know hoping that you know the front end developers can use this as well um and be able to you know build out their front-end apps maybe you're using versailles or netlify or even amplify or something you need to build some of the front end pieces of this um and then being able to use uh serverless cloud um you know as your as sort of the back end uh application piece so um so what we what we did is we said how can we make it so it's super easy for people to just launch applications and just write code and not have to think about some of those other backend things so um so this is the the landing page and if anybody wants to try this out it's open right now you just click the join the exclusive launch button here and uh you can sign up you get an activation code we're letting a bunch of people in we're gonna cap it at some point but right now we're just trying to get a bunch of people in and uh and see how they like it we are not in beta anymore this is ready to go you could build an application on this today if you wanted to um and we'll have custom domains and a couple of other things just to help you uh you know sort of share this with the world um coming very soon actually by the time this is live it'll probably be there um but here's the basic idea we want service development to be super fast right and and what we've noticed is if you're in this process of having to write yaml or even cdk or any of these things and then deploy it to the cloud wait for it run your tests maybe you run some integration tests things like that um it just it takes a while and i know people love mocking a local environment um and i you know i kind of don't like that i think in certain circumstances it works but it's really hard for you to test event driven applications in a um you know in a local environment and what happens if you have to test across multiple services and you need an event to be generated here and then go there and you want to test you know step functions and some of these other things it just gets really really complex so our idea is to basically make it super fast um i'll show some of these things but we have you know fast deployments fast feedback super fast performance this is all running on aws right now which is super you know super helpful um we or you know super powerful i should say we have a whole abstraction for apis right to make it super easy to do apis we have a whole abstraction for data which is also no need to learn dynamo you don't need to learn dynamo you don't need to set things up right it's just it's all there for you i mean again we're you know we're limited in terms of some of the things that you can do right not everything is in this yet but um but some of the things that we have as well and i'll show you is this idea of it being forkable um and so so basically you can write an application with data and then we're working on a way right now for you to actually share that with people so that then they can just go ahead and copy that um and and launch their own app right so it's like it's like github but with live applications right so it's it's super cool um i'm probably not giving it as full due but um but i'd love to show you um if i can do this quickly here jump over to my terminal um and i'm gonna resize this window here um so there's a uh there's a cloud package that you can download it's just npm if i do it right npm.com package servers cloud uh here so this is just uh this is the package that you can download um what we tried to do with this um is kind of interesting it's uh it's both your cli locally but it's also um it's also the package you include in your application code um and i'll show you that in a second but what's cool about that is that it's just one thing to deal with um you don't have to worry about uh you don't have to worry about like installing all these different dependencies it's one dependency and then we're doing a whole bunch of magic um on the back end so um even though you're installing this dependency we're only actually deploying the things that you really need and so forth so coming back to what we were talking before here you are running everything so you don't need an aws account you don't need to manage whatever resources so what we were talking before like running your own lambda functions then you care how lambda works uh here can you talk a little bit more about that because i think that's super interesting yeah so so right now what we do is we're managing all the deployments for you um and again you'll see how the deployments work and it's it's pretty crazy but because we're managing all that for you we're actually pre-provisioning aws accounts um and so we excuse me we control access to those accounts and so that you don't have to worry about um setting up aws you don't have to worry about impermissions you don't have to worry about any of that stuff you just create a account with serverless on serverless.com um and that allows you to log into the cloud and then you can authorize it through the through the cli which you can just log into the cli and then that gives you the ability to do that and we have teams and some of these other things that are all part of it and we'll be adding in more our back so more role-based access control who can deploy to what and some of those things um but the whole point here is like you can get started instantaneously so if i click this join the exclusive launch this essentially is going to take me right into um the dashboard now if i wasn't if i wasn't signed in let me sign out quickly but event say take me to this i just go ahead and log right in um and this logs me in or create an account if i don't have an account yet and this gives me um this immediately gives me access to uh to the cloud here so um so yeah so then once so it gives you a little thing you gotta download that you know download an npm and install um you know install the cloud package but essentially all i have to do now is just type cloud um and so i type cloud and this is gonna walk me through and we're even optimizing this experience and that looks like i am logged in to the wrong account here so i'm going to do cloud logout log out and then cloud log in here and this will just log me into the cloud um all right should be good okay good so now i'm logged in and now if i type cloud oops uh clear that cloud then this should walk me through yeah jeremy daily is where i want to be okay so i say so it says your default org is jeremy daily so yes i'm going to use that organization um enter an existing service name uh or a new service name to initiate in this directory so i'm just going to call this foo bar and i'll initialize this this will go ahead and create this and notice that it just dropped a bunch of files in here for me this is a test this is an example app and so it said okay now it's connected to my instance it automatically [Music] is doing file syncing and log streaming copied the personal instance url and it's seeded data so now i get this url if i open up this url over here i immediately have an application and i already have data so fast right right and so now and now i have a fully functioning application um that is running in the cloud and is live with a url now this url is your personal url so anytime i make changes to the code this will actually update so this is where it gets really really cool and i'll and again there's so much here so i'll try to kind of keep it brief but kind of give you something sure then you can share some links where people can go and learn right yeah there's all kinds of documentation and stuff like that and we'd love to you know as you you know give us more on the documentation side of things i don't know why that took so long to do the syntax highlighting but anyway so here is here is my code for this right now so basically there's a serverless cloud package um and we do what we call helper functions here so these are our little helpers um api data schedule params um so you can just go ahead and import this right from serverlesscloud right and so in our package.json you'll see it's just a standard json or package.json it's got the name of my app it's got you know um some information here there's some you can also run like npm start if you wanted to um and then just a couple of dev dependencies and um and then this little service thing that says this is my org and this is the service that i'm running but pretty straightforward nothing complex there um but i am importing this package serverless cloud now what this allows you to do those are like your primitives now right these are yeah these are sort of the the services primitives yes you can call them perimeters if you want to we kind of try to might create an api gateway but i don't care i don't know right you don't care exactly and so the idea here is though you know like you do api.get so this is very very much so um expressly um so this if you've used express this is gonna look exactly the same we're actually using most of express under the hood um and uh and we and we might even expose express so if you just wanna use express you could just use express you don't necessarily have to use rs but this obviously i wanted to walk through all this code but here's a get request to to-do's uh it uses this get to dues that i'll show you in a second this actually i don't know doesn't need to be in the sample app but that's okay um but then you've got a post thing here and you've got a couple of other other things that you uh you know there's a delete command here um and then you can use api use if you're familiar with express that's just a just a middleware function um but then we have cool things like schedule.every so here you can schedule something that every 60 minutes it'll go ahead and run and actually do something where it checks for in this case it checks for overdue to do's for example um kind of thingy it's like maybe it's a cloud watch rule right yeah exactly exactly um but anyway so and then there's just a little helper function i wrote down here that gives you the ability to um uh you know that just does does the query for you so you don't have to write this you know all the places you do the get to do's but the point of this which is pretty cool is i'm just gonna go and show you uh this piece first so we have a static folder right so you can do static site hosting or you can do static hosting for any assets that you need but if i go into this index file for example and i've got my welcome to serverlesscloud this actually shouldn't say serverlesscloudbeta i should say exclusive launch so i'm going to type in exclusive launch here and then i'm going to save this and as soon as i click save down here it's telling me that it's syncing um and this process here usually takes about five seconds this is probably the first time i'm syncing so it took seven we're actually working on this where we're hoping to get it to less than three seconds maybe even faster than that um but this is sync so now over here in my live application it now has updated this with with the change that i made here and what's cool about this is the workflow you know the idea for this workflow is basically to say like oh i need an api get route for something so i'm going to type in api dot get i'm going to have that respond to slash test right and i'm going to use my uh my rec res convention for um oops for uh oh i gotta put a comment sorry nobody's touching i'm never good at live coding yeah i'm just gonna put i'm just gonna put this in here just a simple test and i'm just gonna do res dot send and i'm gonna say it worked um right so i've created this this here and now again if you think about you know maybe i have to set up a yaml file with lambda function you know say point it to this and tell it how i want to work i have to do any of it i just hit save right and this does the syncing and this will go ahead and create any api routes that i need and anything that needs to happen and so immediately when i go here now and i just do slash test um i think we need to do another episode on how the hell the magic is going on here because well that's that's the other crazy thing a lot of really interesting magic behind the scenes here and that's and that's kind of the point right and so like the other thing that's kind of cool here is i'm going to change this to slash data and i just want to show you a couple of bits of the data piece of this um but so if i'm doing i'm going to do let's see uh result here so if i want to access data i have a very cool thing where i can just use this data this data helper function and i can just do data.get and i can actually request something so here i'm going to say i want to do well let me let me do this i'm going to make it a little bit easier i'm going to set something and i'm going to call this test right make it super easy and in test i'm just going to send a set of variable or set a a a value and i'm just going to do a string and i'm going to say you know string value here all right so what i'm doing here is i'm setting um i'm setting something called test a key called test with a value of string value i'm going to await this because this is how javascript works but then i'll do let result equals data i've got to weight it sorry a weight data.gettest like copilot automatically filling that information in for me so i'll save that so now i save this and this is going to sync and while that's syncing i'm just going to go over here and change this to slash data all right that's sync so i hit data and now i get string value here now obviously because i've saved it i can comment this out save this again let that sync um and then when that syncs that obviously that test value is now saved in my database so i can request it again and that's saved um so that's super simple you know set a value get a value right helpful for all kinds of things but just so you know you don't have to do anything data is just there it's just there for you you don't have to worry about anything to do with data it's just there and with this which is cool is you can do all kinds of really cool things like if i wanted this to be more complex so i say foo and i set a value of bar here i can set this as an object this can obviously be a nested object with a whole bunch of things in there why is it giving that wrong quotation marks wrong quote oh yeah look at that okay sorry it's on a small screen here um so i can go ahead and set this something like this we'll save it and we will get a refresh here in a second and sync so i refresh and now i get fubar right i get an object back and that's just scratching the surface because what i really have some cool things to do is i'm going to show you this data.json file so these are all those to-do items that i put in originally the ones that we see over oops let me go back to this the ones that we see over here these are those to-do items um and so these to-do items are just i these are not by the way again just sometimes get confusing this is not where it's pulling the data from right so if i make changes over here or whatever like it doesn't um it's not affecting this this is just a seed file where i can see data into it um but you notice that these are like two do colon one two do colon two you know two colon three i can use these very cool what we call collections right and so when i use the collections i can actually do something like this i can say i want to bring back to do and i could say i want to bring back to do number one or i could say i want to bring back all my to do's so you do to do star right and then if you save this i'm gonna i'm gonna open a new window or a new tab over here and slash data um so once that's synced so now what this will do is this will bring back all of those to do's for me right and i can even do cool things here where i can say like i want any to do that's greater than three for example um and i save that and that'll go ahead and give me um as soon as that's synced that'll go ahead and give me just the to do number four or i could say something like give me to do that are between two and four um with a little pipe character there um and that'll go ahead and limit these and should just give me two three and four for these um for the items that come back two three and four right so i can do some really cool things um i don't have well i guess i can um yeah well let me show you this so then the other thing you can do too is there's this really cool feature that we have that are called labels that act basically as like gsis right so um you can actually query things based off of um off of a gsi by using the labels so if i wanted to go in and i wanted to say get by global secondary index for those yes sorry global secondary indexes for those who yeah for that but basically what it is is i can say all right i want to find all of the uh i want to get by label i want to get by label one right because that's what i labeled them as and i want to go ahead and i want to get everything that oh it filled it in for me incomplete star right so this would just show me all of my incomplete um all my incomplete data or all my incomplete tasks here and that'll come back here and give me um all my incomplete tasks right so now i can just see these um if i wanted to just show my complete tasks like this i can do that that'll give me just the complete ones um and then if i did something just to get the thing so i can see it uh so incomplete incomplete uh so if i wanted complete that was greater than a certain time for example right so i can just go in and say i want all my complete ones but only the ones that are greater than this particular date uh oh i missed the two um something like this but anyway so basically it's super easy to write these queries you don't have to think about it um and there's a and there's a really cool it's not synced yet sorry sync now and there's a really cool workflow around this that will allow me to [Music] use different sets of data if i want to run different tests so for example if i go back to this post here let me delete this and i'll uh i'll go ahead and delete this one maybe i'll add a new one this is a test uh and add this in so i've gone ahead and i've added a couple of things deleted a few things but now i'm in my sample app and i'm like oh wait i want to restore the data that i had before so that i can go ahead um and do my tests again right i can just type in import and oh actually i don't even need to like that so import and then i can just do dash dash overwriter dash o and what this will do is it'll take any of the data that's here and it will rewrite all of the data for me here so now i have a fresh set of data like this and what's cool is is if i want to take this file and let me do let me open this up and i'll do file save as uh i'm in the wrong thing here file save as uh we'll call this uh i'll call this i don't know users or something like that um now i could go in here and if i wanted to i'm just going to change these so that it it's simple but i'll say test and i'll say uh you know test123 whatever it is so now i can do this and then i can come in here and i can say well that's syncing that there but i can go into my here and i can say import and i can say import users.json and overwrite that and then if i do this this will go ahead and overwrite these and give me updated updated things here with these right and so i have all kinds of really cool capabilities where i can overwrite the data i can refresh the data i can do all kinds of cool things and even if i even once i have all my data saved like maybe i get my data into a certain state with this then i can actually just do this if i want to create my own test files i can just do export and i'll do test.json or something like that and now this will actually take what i have export into test.json and now i can use this if i want to re-import this at another time right so i've got a really cool data workflow that i can do things with um but i want to show you this because this is where the workflow aspect of it well actually let's take a break just in case you have any questions um but the idea is there's a lot here i know i'm sorry i think i'm going to the same place on you because i want to see how the workflow works how it is for because that's normal to have maybe different stages or different like how you work with like your dev environment or production or things like that so i think you were going in the same way i mean this is super cool so the the cool thing about um the workflow aspect of this is so let me go in and just um i'm gonna make a change here and uh i'm gonna do so we we've got we've got this main page of our thing saying welcome to the cloud exclusive launch uh and i'm just gonna go into this and i'll say uh welcome to serverlesscloud and i'm gonna i'm gonna type in here um you know this is my personal uh or i'm gonna i'm gonna type in let's say let's say yeah uh dev or prod how about i do that i'll do this is production i'll type in production there so i i saved this here and this is just again upload updating a you know static html file so we haven't done anything workflow related yet but um once this is sync so this should say serverlesscloud production okay so now what i want to be able to do is i want to be able to take this and i want to move this into production because right now this is not production um this is just a this is what is called my personal development instance so if you and i marcia were working on this project together you would have your own copy your own independent stack your own database everything would be completely yours and wouldn't touch mine it's completely isolated separate aws accounts and everything all behind the scenes it's very very cool um how we do that isolation so um so you have that but if i say look i want to share first of all what i want to do is i want my front end team to be able to play with this application maybe i'm just deploying an a um maybe i'm deploying a uh just an api or something like that so i can just learn something right so i can just type in the word share and i hit share and what this is going to do is this is actually going to generate an entirely new um instance of this thing with its own data with everything completely on its own and now it's giving me this new thing it's called jeremy dash wxabz but now i've got a new url here so this is reliable stack and this is what i just published including all of my data right so now i can share this with whatever data i had seated in there and i can give people access to this and they can play around with it and if i go back to my other version of this here which is my local version if i go in now my development so if i go in though and i change this to um you know i'll say jeremy's oops that's not how you do that jeremy's version i can go ahead and save this and now this is syncing but this is only syncing with my personal development environment so this was so this one here pragmatic right this is the one that if i refresh this this will now say jeremy's version and then if i go back over to this one that i shared this will still say production and as i make changes to this one here you know delete things do whatever it has absolutely no effect on this isolated version here so i can continue to develop and i can continue to be doing these things and then actually as i make some changes and i do some other stuff i could actually go and i could share over this again now i won't get into the details of this but for cicd this can be set up so that you share every time you do a pr every time you do a feature branch every time you update those things so this can all be integrated into your workflow that makes it super easy for you to you know like preview builds essentially is what it is um but you can add this into i don't know code pipelines called build or something right yes like you could yeah i mean you can use github actions the github actions for this are so simple it's kind of yes and we're actually building in some cicd capabilities so you can just connect directly to your account but so here's another cool thing and this is what i talked about with the whole forkable cloud thing so i've got two versions of this now i've got my my local version and i've got this version that i've shared with people that can play around with it i can now do um clone i can type in clone and then i can type in the the one that i want to clone so i type in this one here now again these might well i'll get to where we name them something different where you're naming them production or whatever that did not work uh i missed the j do j there so it and now if i hit clone uh oh it's not supported in cell that's right i gotta exit out of this first and do cloud clone and then paste in this and then um yep cloud cloud okay cloud cloud clone hit jeremy here and then what this will do is this will oh it's not empty so i gotta overwrite it yes i do why is i cannot see that uh so i type in yes i wanna overwrite it get back into here yes and now what this does is this is going to clone this production version it's going to clone it back into this version here so when i refresh this version here this is now my product the production version that i shared again so the whole point is is that let's say that you share a copy of this app and you like hey i launched these changes check it out and i say that's great i'm going to make some changes to myself you can just go ahead and clone what you just did and then i can make some changes and then share and then you can clone it so it doesn't do diffs it's not like it's github you know and does some of the the vcs stuff but it is pretty cool in terms of how uh some of this stuff works so anyways so now i've got my production app back and i can go ahead and type in cloud again get back into this interactive shell um so now i'm back oh that's well that's why that's showing up there and i don't want that too there we go um so this is so i'm back in my interactive shell i've got my production here and now what i want to do is go ahead and deploy this to production i mean i could do staging i could do tests i could do whatever but i all i have to do is just go ahead and type deploy and i want to deploy it to prod so i do that this goes ahead and runs this deployment thing it takes five you know five six seven eight seconds seven seconds whatever it was i now have a live production app that i've shared now something interesting there's no data here okay and the point is is that there's no data because when you actually deploy something you don't want to be overwriting your data so as part of the sharing workflow you share the data because you kind of want to see that but as part of the production workflow you don't right so now that you've got this production app here and again if we wanted to go ahead and add uh to-do's and some of these other things you can do that here you can add those and if you deploy again it doesn't overwrite your data it doesn't overwrite the data right yes exactly um and what's cool here is that now in my dashboard um i have obviously my foobar service i'm going to click on my foobar service and now i can see that i've got my production stage you can see all the stages all the stages so here's my personal instance this here is a preview instance right and once i say you know these will automatically get deleted from ci cd but if you're like oh i don't need this instance anymore i'm just going to go ahead and delete this so now i've deleted that instance there and when i do that i think that was the reliable stack one right um it just takes a second but this eventually will go away and and this url will no longer be available um so again it gives you this super simple workflow to kind of move things through production now if i'm using git for example and i'm using github and that's how i want um that's how i want to move things through through production i can do a super simple get uh workflow um where i just you know check my code into git here uh that can merge into a feature branch or you can merge it directly into main or whatever you're using um and then you can have it automatically deploy to a testing stage or whatever we also have this cool command where you can type um what we call they're called promotions so if i actually wanted to deploy let's say i wanted to do a dev stack here i deployed to dev this will go ahead and create another instance for me which again should take about six seconds seven seconds or so um so now i've got uh my dev stage here um and then what's cool is i've deployed to dev and what i should do is i'm going to do test one two three oops hold shift down so i'm going to save this here this will sync obviously and give me give me the the thing there on my local instance but i'm going to skip over that and i'm going to deploy to dev again so this is going to go ahead and deploy the dev and give us that url which i think was here right so let me open this so this just deployed so if i refresh this oh is that the right one no no this is the dev url uh this one here so now it says test one two three right so i've got that there and then my production url which i'm gonna i've got too many things open so i'm gonna lose a bunch of these um but from here i have my prod my prod stage and you can just go ahead and launch your url quickly so this one says production this one says test123 and then right here if this is the workflow that i want to use i can do um promote and i just say dev and i want to promote to prod i hit enter this goes ahead and does the promotion for me this just takes a couple of seconds um should be a counter there and it's done and so now this was my test one two three here was my production app i refreshed this and now i'm at test123 so it's just super easy to move your code around and again we're working on other things to help so you don't know where your code is anymore when you have 47 different stuff well yeah i mean the cool thing is is that you always know you're working on your own personal instance right so you are always always on that development instance and the idea of that this idea of working locally and being in this interactive mode here is really about you know your ability to um kind of duplicate what we what we want we want this to feel like a local development experience so i'm here on my local machine and i make a couple of changes you know five six seconds sync hopefully that doesn't disrupt your workflow too much um you know you can be making multiple changes and things like that and then you want to go and test it or whatever and by the way you don't need to use front end for this like we just put that in so you can visualize it but you can just build apis right you can go ahead and access this with um you know whatever you want to access it with but one thing that i just want to show too because this is another really cool feature um and this has to do with end-to-end tests so if i'm in my local development instance right here i'm just going to import the data so that i make sure that the data is right and i'm going to import it hold on import and overwrite it just to be safe um so i've got my my data restored here um i have a oh actually that didn't overwrite let me try that again are you in the right uh thing because that might be the developer uh yeah well that's the other thing we want to find a way you know to kind of have some little symbol here maybe like netlify does you know so you know that you're in a particular thing um i think i am the pragmatic though is my is my development instance so let me just refresh that uh there we go i just the i guess dash o doesn't work so it's going to be dash over right um anyway so i've got all my data here now here's a really cool thing i've got a test directory here okay with an api set of api tests that post it to do checks to see if that worked checks the output of it all super simple right api dot get slash to do status equal all invoke and then it checks for a certain thing or whatever so it's all very very um very easy to write these tests and then if i want to run the tests i just type in test and then i'll go ahead and run these tests for me these might fail because of the because i did add some data to it but um but essentially this just writes it runs the test for me and spits it back so actually let me delete these so these data are not there and then run the test again um so i go ahead and run test and hopefully these will pass this time but essentially super simple for you to run these tests so all my tests passed and my even my schedule my schedule pass which is just a thing here that you know does a data set on schedule checks after it runs and so forth so it's very very simple to write tests and the other really cool thing with this is tests can be destructive right integration tests can be destructive because you want to manipulate data in the database so if i'm in my interactive development mode and i run tests this is running on my development instance so it's just like if i type just you know in my in my local development when i was running things locally right it would do the same thing testing against my code that i have right in front of me but if i hit exit here and i'm just here and i type in cloud test now and i run it from outside the interactive shell this spins up a whole new instance populates whatever data you need it to populate runs all your tests give you all the feedback and then clears that instance and shuts down that stack for you automatically how you're using the capability of the cloud to put environments up and down and up and down because that's the magic of the cloud like it's the map why you need a local machine when you have the most powerful computer in the world that is the cloud and everybody works with internet who which developer can call without connecting to the internet so i think this is super cool so the the point of this here is like we want people to be hyper productive right we want you to write tests we want you to feel good about it the ci cd process um let me see if i can bring up the um we've got we've got a sample ci cd uh github action that um uh that i wrote that that one of our team members wrote uh for one of the interactions that we do and i'll just see if i can find it quickly and i will share it with you because it is um uh it is pretty it is pretty cool uh what is it called um uh yeah here we go beta automation all right let me show you oh it's gone now uh we might have deleted it anyway so this it's it's basically like two commands like you you you run npm install um uh the serverless class server cloud and then you run um and then you run ci or right obviously to install any dependencies that you might have um and then you you do npm you run npm test uh or yeah you run cloud or cloud test or npm test whatever it is that runs the test and then you do cloud deploy prod or whatever it is and it's like four commands it's so simple um and it's just meant to make you hyper productive and we want to even get rid of those four commands um but there are some there are some really cool things that that you can do here if we if we started a new app um uh you can actually clone apps uh we have um i can show this here uh let's see let's go to github server slash cloud we've got some example apps um that are in here um so we have a booking app we have a cloud the last last questions i have for you is how people can get started after they get the access like right right yeah well the access will happen immediately you'll get access immediately just takes a couple of you know it takes not even a minute hopefully to get the access and then um you you know this is the sample to do app that we have and so forth um we have a ton of docs here so if you go into um you can go to you know github server cloud if you want to and this will just give you uh you know basically a link to the docs um but the docs are here uh quite a bit of information on getting started how to do some of this stuff and then under building applications you know a whole bunch of stuff on serverless data all the different capabilities i mean we didn't even get into you know being able to show metadata versus not metadata and ttls and collection namespace leave it for the people to read the documentation of if they're really interested you can come back again or someone from your team and go right and one other thing i i didn't even i didn't even mention this because i know this is important to a lot of people but so this fully supports typescript um and one of the cool things about the the whole typescript thing is that you do not have to worry about compiling or anything like that so you can just write an app in typescript um and we handle all the compilation the whole deal and all of it's taken care for you and it's the same amount of time that it takes to do the javascript as well and we do a little bit of magic that when we actually publish it you know we do you know when it's actually on a live stage versus in a development stage you know you're you know whether we compile it or not compile it we're using esm build under the hood or es build under the hood like we're doing some really cool things so um but again the point of this is just make your your stuff super simple and if you've got two seconds i would love to show you a new thing that we're working on that hopefully hasn't like a salesman store if you haven't right so uh because it's just well i want to show you this because this is not live yet but this is just one of the things where like if you're looking at this and you're like oh yeah that's great i can build an api and i can schedule some tasks and okay data's cool and i like the workflow there's a whole bunch of things you can like about this but one of the things that i'd love to show you is we have oops typing in the wrong place um if i go here and cd into uh data stream so anyway switch over to a dev environment so i'm going to go ahead and run cloud get into interactive mode here so i am in uh so i'm in a dev environment right now with a new thing we're doing that are basically data streams and this isn't complete yet so this is going to change in the next couple of weeks but it will give you an idea of where we're kind of going with with some of this stuff here so if i enter my interactive development mode here and again i i didn't even mention this but i mean you have live streaming logs right so anytime you do something you have live streaming logs so uh i didn't even mention parameters there's so many things that you can do or anything like that but yeah people to read the docs right exactly read the docs if you need to so but we added this new thing called data.on right and uh and right now it's changed but there's going to be like updated and created and deleted and some of these things but essentially what happens here is if i launch this app um or i launch this window over here so here's my um you know this is this is this test that i'm doing over here i've got this data.on thing so if i make a change to this data so i'm just going to check this off here this just takes a second but essentially what this is doing is now this is firing asynchronously after i make my data changes so all of any time i make a change of the data this is showing me what it was before and this is showing me what it changed to so now you can see that this says completed and so forth so anytime i make a change if i hit delete here this is going to go ahead and show me that here's what the item was before and then it was deleted so it's not defined so we're going to clean this up a little bit to make it um more standard whatever but this like how cool is this like so essentially this is like dynamo streams it's like dynamodb streams right and so you can just go ahead and write all of these change um uh all of these events right so you can just listen for the events so this essentially if like if you're thinking about building an application now or you've ever built an application we need to enable dynamodb streams and set up separate land functions and do all this stuff this is literally all you have to do data dot on change i mean again that's going to change to be whatever it is the name when it's released right whatever the name is when it's released but this essentially is this idea of this is where we're trying to move to with with serverless cloud is that all these things you want to be able to do workflows and you know in events being able to emit events when something happens um you know change data capture stuff like all that kind of stuff is just built in and it literally is one line of code and what the way that our system works because we have behind the scenes of what we're calling the serverless runtime and essentially what this does is this looks at your code and it says how do i go ahead and take this code and then deploy an infrastructure that um that it's going to be able to run on and so we call this infrastructure from code and so i don't know if anybody knows but there's no serverless.yaml there's no template.yaml there's no cdk constructs there's none of that here all you have to do is write this code and what's really cool about this is these are deterministic builds right these are going to be the same every single time it happens and if you look at this here we didn't even dive into the um we didn't even dive into the uh into the dashboard but here's a very cool thing i click into dev here this gives me all kinds of cool metrics and it also shows me all the api routes that i created and we're going to add more functionality we'll be able to dive down into these and see more numbers you'll be able to run tests against them you'll be able to invoke them right from here all my scheduled tasks are over here so i have all kinds of cool things and this is another thing and i should i should just show you this quickly um let me uh one more thing because this is another powerful thing that is a use case that everybody does in serverless um and is incredibly frustrating i think uh so i'm just going to unset a variable here cloud underscore stage all right and then go back to oh actually i guess i didn't even need to do that there let me just go back to my other one here all right so let me go i will exit out of this and then hit j again uh and then get back into my interactive mode so another really cool thing that we have here is if we're in if we're using any type of parameter right so right now i'm in i'm in my personal instance here so let me go back to foobar and go into my personal instance so in any one of these instances here um you have parameters that can be set um and so i have as part of my um i'm gonna go back to this data one here and i'm gonna rather than showing any data or doing any data commands i'm just gonna actually output um this params variable this this little helper function right there so i'm going to save this and then i'm going to make sure i'm on the right thing here which is this one pragmatic app and i'm going to open this up and go to slash data and this is going to give me a list of my parameters so this is essentially showing me by default i have my org name i have my service name i have my stage name so if i didn't want to write any um you know i want to write some feature flags or something like that and then cloud url is right there so now what i can do with this all right so we can actually just leave this open i'll go back into uh let's see close down some of these extra ones that i don't need apologies for having so many windows open but usually it's like five times as many right so i'm gonna go into the fubar service itself all right and i'm gonna go into parameters and so now i wanna add a new parameter and maybe i'm gonna call this something like you know this is my slack underscore api token right and i'm gonna go ahead and just put a value in here of one two three all right i click add now now i have the slack api token this is available in all my services and the cool thing is is that when i refresh this here that is immediately available right there's no ssm lookups there's no caching there's no anything like that we know every version and instance of your application that is running so we can immediately make changes so if you wanted to use this to do feature flags right this is a great use case for this so i do feature underscore flag underscore one and i'm gonna go ahead and here and say you know this is set to false i click add the second i add it i come back i refresh over here and my feature flag one is there and we say hey we just launched a new feature you know okay we're testing it whatever and then we're like all right well let's turn it on i come back over here i click edit i change this to true i i hit update here i come oops nope i don't want to change my password uh i come back over here i hit refresh and now my feature flag is updated to true instantaneously and the cool thing about this as well is that it updates on every instance that i have and i can even go back though and i can say like okay so this is this is on my fubar service but if i want prod to be something different i can go into parameters i see these two things here it tells me they're inherited but i want to overwrite this so in in um in in my production i want my feature flag to be false right but i want it's so weird that it does that uh feature flag would be false but i still want it to remain true in this in in this uh this one here so again there's just so many cool features that are built in so many things that we hope are going to make people's lives easier and just get apps up and running like instantaneously and i have one last question for you absolutely how much this costs yeah so super good no so this excellent question because that is one of the things we've kind of been struggling with so we we've talked to so many uh developers it's been amazing actually having the opportunity to talk to even more people and and understand what what they're thinking are uh what they're thinking is behind some of these things so um right now the plan is to try to do a metered service so we're going to do metered it's going to be you know based off of either build min or not build minutes execution minutes or um based off of the number of requests right like obviously you've got scheduled tasks that could run for a couple of minutes and so you can't just say one request and so forth um so the the current thinking right now we're gonna this pricing will be published by the time this goes live actually there is no pricing yet so so there's no pricing yet but essentially what it's going to be is we're going to give a free tier that allows you to play around with this thing and really get to to know and experience it um and then there is there are team tiers so um right now it'll probably be 20 a month that's what we're going to start with um so it'd be 20 a month per developer that wants to use this but you can build as many applications on it as you want you get a very generous free tier as part of that 20 a month so pretty much any you know side project app or thing like that that you want to build um you know cost about 20 a month but you could build 20 of them right as long as you don't go over the free tier usage um you know you'll you'll be able to do that and and build whatever you want and build a bunch of side product projects with the paid version you'll get custom domains and some of these other things uh ci cd and some things like that um and then if you um uh you know if you go over that uh you know there's a slight premium on top of you know what you would pay if you use lambda directly but we're trying to bundle everything together so you're not paying api gateway and uh data transfer and um you know and lambda requests and lambda execution time we're trying to bundle that all together into one really simple uh billing metric um you know so so again we're gonna experiment with that right now during our sort of exclusive launch phase um we're not charging anybody so um just go ahead and build we wanna see what people build um but that will be the expectation is that to keep building on this after you know sort of this period and once you sort of if you're above the free tier um then we would or above the free plan um essentially it would be about 20 a month is is where we're thinking right now yeah but that's cool cool cool to know so people can now go and try it with no questions asked and then they might have to pay like a monthly fee but it's not that much money so correct yeah thousands dollars a month it's right yeah of building this is super cool i would really love to know all the dark magic behind it because i don't know how you do it in six five seconds that maybe for another episode yeah and and like i said it it's going to get it's going to get even shorter than that um we're already working on some really cool syncing technology um you know that that basically is directly updating your code and and uh and of course it's all it's all meant to be you know you've got the development environments and you've got your staging environments and then your production environments or your shared environment things like that and and it's all you know depending on where it deploys to it's all using the same exact type of infrastructure you know we're compiling things the same there's some magic we do to make the dev faster than um you know the deployment faster on dev than we do for like a production instance or whatever but like there's a whole bunch of really cool things happening behind the scenes and again i i hope people love this because i started building apps on it and it's like is blowing my mind like i'm like wait what else what step did i miss and it's like oh i didn't miss any steps like it's just you know like everything is working just you know it's doing exactly what it's supposed to do so hyper productive massively scalable again it's all running on serverless infrastructure behind the scenes um yeah so i mean i just hope people check it out and love it and give us feedback if there's something you can't do with it there's something you want it to do just let us know and i mean we're building it we're building it for you so you know we're building developers inc always i think one of the best things is the experience for developers from serverless framework uh it was it's amazing it was so intuitive to start with serverless using serverless framework and well this is super intuitive as well so i think people out there know how developers think so i think it's pretty cool to see all this and i think with all this information uh everybody should go and click in that link and get started definitely playing so thank you very much jeremy for for being here today and i'm pretty sure everybody knows you but if they want to find you the links are in the description box yeah find me on twitter i'm on twitter and uh happy to happy to chat with people about serverless cloud or just about service in general i mean i love i love serverless i keep telling it's like i'm yes i'm working on this product um i'm super passionate about it but i'm super passionate about just the future of application development and modern applications and uh and so you know i'm happy to talk to you about any of that stuff um and uh yeah sign up for my newsletter listen to my podcast uh lots of different places to get really great um serverless information and again it's not my information it's me talking to amazing people who are doing this and and me pulling articles from amazing people that are writing that newsletter i love it it's just like since you haven't done that i don't really i don't go around finding for articles like right i'll do all the work for you i'll find all the cool serverless uh news and articles and tutorials and stuff and and keep everyone up to date so off by none dot io and i'm sure you'll put the links down there so obviously thank you so much so thank you very much jeremy and have a great day all right you too thank you this is all for today i hope you like this video if you want to get in touch with jeremy or get access to this as serverless cloud service the links are in the description box let me know in the comments what you think is the role of developers nowadays what you think about this topic is it's something that is interesting for you and i see you next week with another episode [Music] you
Info
Channel: FooBar Serverless
Views: 2,544
Rating: undefined out of 5
Keywords: foobar, role of developer, cloud developer, jeremy daly, serverless chats, off by none, serverless cloud, cloud computing, serverless inc, demo serverless cloud, nodejs express, nodejs express serverless, nodejs express cloud, getting started in the cloud for developers, developer cloud
Id: 1TKedWps7nU
Channel Id: undefined
Length: 53min 37sec (3217 seconds)
Published: Thu Sep 23 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.