Vercel Does DATABASES Now?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
yep you read that right versus databases now the for sale ecosystem is expanding by the day and now they are doing databases there's three new features they have introduced yesterday in their versel ship and let me tell you versel is the apple of web development they're crazy good amazing user experience and awesome design and pretty expensive let's check out the first of three things they introduced yesterday and that is a key value store you can use as a redis-like database in fact they even cooperated with opsash for this so it is actually a redis database so check this out we're in the versal dashboard and as you can see right here there's a new Option called storage interesting and I'm gonna get to these two later but for now the KV the key value store let's create one let's select the KV click continue and accept and this is one of the most straightforward setup processes ever we can enter a database name a region I'm going to choose Frankfurt Germany and click create and okay name doesn't work because it's too short let's click create that's going to create the database for us within seconds and get us access to all the credentials we need to connect to it I prefer the env.local approach we can click um show secret and that's all we need to connect to our database it's honestly super simple we can copy these values paste them into or dot env.local right here save this and then restart our development server and I'm going to do some performance testing together with you here live let me zoom in so you can see this is here and that's the setup done all we need to do now is install the adverse cell slash KV npm package it's got like a couple thousand installs since yesterday which is pretty crazy and that's all we need now the way we set a value in our redis database is by saying KV dot set you know just like normal redis we could use all the normal Reddit stuff we have let's use set user one session that's the key this is the value and then let's await the time it takes to set this value and also it takes to get this value let's restart the development server and go to localhost 3000 and see what happens it's gonna run this when I open up the main page of our application and let's look into the console and you can see it says 188.95 milliseconds that's a cold start that takes a bit but I'm gonna keep refreshing the page here on my right hand side and as you can see it's shorter it's like 30 milliseconds 40 milliseconds around there so there was a massive cold start problem but then when the serverless function is warmed up it got faster and then let's try just the reading because that is significantly faster let's try out just the time it takes for this function to read the value I'm going to keep refreshing and as you can see it's 12 14 13 milliseconds it's really fast and you cannot tell me that this wasn't the easiest database setup you've ever seen second thing they introduce is versel postgres yup that's right versel is doing postgres now and this database is meant to integrate super well with react server components in fact you can now even do Post actions on something like a form and create stuff interactively in server components you don't need to use client components anymore what you could do is fetch data inside of a server component and then as a form action define something that should happen when a user presses a button for example without ever leaving your server component environment now the caveat being versl postgres just like Roselle KV I believe is not available for Enterprises most of us aren't and but it might be important because these two are in beta which means they're totally usable for the Hobby and the Pro Plan if you don't exceed your limits there are heavy limitations on how much you can use them until you have to pay but they are currently at least unavailable for anyone that wants to use them for Enterprise large-scale purposes even though versel does claim they scale infinitely and very well you can import your database super easily and then write raw SQL queries inside of your components that's pretty neat but also kind of feels like a step back from something like Prisma but you are able to use orms with resell postgres and the third thing they introduced is they took a massive jab at AWS by introducing their own unstructured data store just like AWS S3 it's not available yet you cannot currently use it you have to sign up for waitlist but I bet it will be soon that's why you can't even currently find the npm package that they're using on their website on npm because this service is currently locked behind a wait list there's not too much information on it but all I know is for all these three services they introduced they are pretty expensive now it's not super straightforward to compare prices with other providers because sometimes they are based on how many requests you make whereas other times they're based on the amount of data you transfer so it's not super straightforward to compare these but if you take a look at the versal pricing especially for the versaille key Value Store KV and also for reversal postgres the big caveat is it seems at least to me pretty expensive and you might be better off with other Solutions because after all while versel does provide you with an amazing user experience it is kind of just an abstraction of other services because they just cooperated with them so it might be cheaper looking into other Alternatives but if you have the money and don't care about that and want infinite scaling good performance and an amazing user experience I don't see any problem with trying out these for sale packages for yourself you can do this just today if you're on the hobby plan takes like three minutes to get started with versal KV as I showed you and I'm super excited as to what's gonna come like tomorrow or the day after that what verseel is going to introduce in their ship I'm gonna keep you updated and then I'll see you in the next one have a good one and bye bye
Info
Channel: Josh tried coding
Views: 21,130
Rating: undefined out of 5
Keywords: vercel, database, vercel kv, @vercel/kv, vercel postgres, @vercel/postgres, vercel ship, vercel blob, s3, redis, postgres, vercel database, josh tried coding, joshtriedcoding, react
Id: UNwIUq9RJJk
Channel Id: undefined
Length: 6min 6sec (366 seconds)
Published: Tue May 02 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.