curious, how does convex stack up against supabase realtime and firebase?
I'm just looking for some unbiased opinions. I've never used supabase channels, but they feel too low level to be useful, and I've found supabase typescript support to be sub par. I've also never used firebase, but I try to avoid all google products when possible. Does anyone have a legit breakdown of the 3 approaches to realtime databases? I also keep hearing about appwrite, but looking through their docs the subscription's also feel very tedious to setup.
so far convex has the best react support and the realtime feels like it's been abstracted the proper way
9 Replies
I think @The Aleks has pretty good depth on both supabase vs. convex. He has a writeup he did for us awhile ago here: https://discord.com/channels/1019350475847499849/1160122670973714442/1161631534269341696
we definitely have some former firebase users here as well, but a digested writeup comparing the two is here: https://stack.convex.dev/convex-vs-firebase
Convex vs. Firebase
On Cloud Firestore, you'll have to do some acrobatics to integrate with React and listen for realtime updates. Down the road, you'll find your app ful...
in short:
In supabase it's up to you to figure out what to refetch when a row changes.
In Convex it figures it out for you. Change any dependency in a query and all queries update.
You get reliable realtime for free. With supabase that's not the case (lots of other things to love about Supabase though)
Cloud Firestore also has realtime updates but similar to Supabase where it's row oriented: https://firebase.google.com/docs/firestore/query-data/listen#web-modular-api_3
Firebase also pushes the subscription predicate logic to the client vs. the server. This is a different encapsulation tradeoff than Convex where the logic is in a
query
.
(biased bit: we think it's better to put this logic on your server because it can be shared across multiple clients, there is better information hiding from a security perspective, you don't have to think about authz for most apps).people are also saying postgres has realtime capabilities, but I'm assuming it's a pain to setup; any clue if that's true?
@Web Dev Cody Supabase Realtime is built partly on top of Postgres realtime features (and Phoenix PubSub).
And yes, it is a pain to setup and manage for some of the reasons I mentioned above.
Some super interesting frameworks coming out building around it though right now, but the thinking and the tooling they're building is similar to what Convex is offering
I looked at it and its not complex just complicated and ugly, and risky. but with like 10 lines of code you setup a python websocket server that uses psyciog to subscribe to WAL and push to clients with fast api (I tried this last week with Neon and works fine).
Besides needing a stateful server you need to create a client side listener to invalidate your queries and refresh. you can also look at electricsql for something slightly different, and Prisma pulse also works like this I think.
Typing, scaling the server, fault tolerance also gets messy so then you start to look at Kafka and debezium… at that point you come back and start getting and accepting more of the convex choices 😂
For me convex is a different paradigm which is growing on me and promises to replace redis, pubsub, pg and the vector db.
But I do miss the SQL big time and the referencial integrity (cascades) , RLS etc. I hope this changes at some point.
We'll have something pretty soon to share re: cascades, RLS, etc