PocketBase... The Ultimate Side-Hustle Backend?

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
it is september 13 2022 and you're watching the code report last friday i made a video about firebase alternatives and you guys were quick to let me know that i left out a very important project called pocketbase well i tried it out and it kind of blew my mind as soon as i landed on the home page and saw this cool proximity hover effect where the eyes follow your cursor i was sold on it at first glance it looks very similar to supabase something with a real-time relational database authentication file storage and so on that's built entirely with open source software unlike the godfather firebase which requires proprietary google software it looks like other bases at first glance but it's actually very different under the hood and i think it has the potential to be the ultimate side project back end let's go ahead and compare it to something like supabase the first thing you'll notice is that it's written in the go programming language as opposed to typescript for supabase that's mostly superficial but things in go do tend to be faster it also uses svelte for its admin ui while supabase uses react and firebase uses angular that's totally meaningless but just kind of interesting for client-side sdks it supports javascript and dart which means it's usable on web desktop and mobile what's really interesting about pocketbase though is the database instead of something like postgres or mysql it directly embeds sql lite into the executable and runs it in wall mode which stands for right ahead logging my initial thought was you can't use sql light in production but actually that's a misconception sequel light is an underappreciated option for small to medium sized projects surprisingly in wall mode it actually outperforms other relational databases especially in a read heavy app and i'm sure it'll work perfectly fine for your side project that's destined to fail but in the off chance it doesn't fail you might be wondering does pocket base scale because the database is embedded into the runtime itself it can only scale vertically this differs from nosql databases like firestore that use sharding to scale horizontally to an infinite number of machines when scaling vertically the only way to handle more traffic is to use a bigger computer as the app grows you'll need to add more cpu and more ram but you can only do that for so long like the biggest computer you can rent on aws has a 128 cpu cores and about 2 terabytes of ram and the rent is about the same as a bay area studio apartment in any case scaling vertically will work for 99 of apps out there pocket base can easily handle tens of thousands of concurrent real-time connections on a single five dollar vm on digitalocean or something like that which brings me to the next point pocketbase is entirely self-hostable in fact you have to self-host it whereas most people using supabase are using its fully managed 25 bucks a month service and it's also been criticized for being extremely difficult to self-host like you've got eight different services to think about here in the docker compose if anybody here is self-hosting superbase in production please leave a comment and let me know how it went for you what's really unique about pocketbase is that it results in a single executable which makes it very simple to deploy another important difference is that when it comes to backend code you can just extend the framework directly with go then that code will be right there in the executable right next to your database in other words you build a monolith as opposed to a bunch of different micro services that run on fancy edge functions in fact an architecture like this tends to be faster than the edge when data fetching is involved as i proved in this video with flat earth science i think the bottom line here is that pocket base is like a lightweight superbase alternative which itself is the open source firebase alternative which itself is the alternative to building your own back end from scratch this has been the code report thanks for watching and i will see you in the next one
Info
Channel: Fireship
Views: 500,327
Rating: undefined out of 5
Keywords: webdev, app development, lesson, tutorial
Id: Wqy3PBEglXQ
Channel Id: undefined
Length: 3min 30sec (210 seconds)
Published: Tue Sep 13 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.