Advice. When to choose convex over alternatives? benefits caveats etc.
I have a question I'd like to be answered unbiasedly. I would like to know what would be a better option for creating a realtime application that does the following, friend system with realtime online status, group chat/dms, etc? The majority of the question stems from development experience and security. I personally would like to use convex, but my partner is HEAVILY leaning towards appwrite (due to only size/community). If there's an argument to why or why not we should use convex, what would it be? I feel that both of the options are good however I still have questions regarding row level permissions. Sorry for the potentially controversial question, I do not wish to create any drama or argument below. Just seeking thoughts on this. Looking forward to reading the response!
ps: we will also implement some AI related features in a separate yet related project
9 Replies
There are row level security functions in the convex-helpers package
GitHub
convex-helpers/packages/convex-helpers/server/rowLevelSecurity.ts a...
A collection of useful code to complement the official packages. - get-convex/convex-helpers
Hi @v - The unbiased answer is that this comparison between Convex and AppWrite is really a comparison of what level of abstraction you want to operate at. Said plainly: AppWrite is much closer to a low-code experience than Convex is.
Before you decide on a particular vendor, you need to answer the question: what primitives do you as developers want to work with?
With AppWrite, you get the money you pay for by adhering their primitives of topics, targets, messages.
https://appwrite.io/docs/references/cloud/client-web/messaging
So, your question between you and your partner is not really about dev experience or security. It's actually more fundamental: how much business logic do you want to take off the shelf from a vendor.
Messaging API Reference - Docs - Appwrite
Appwrite Messaging helps you communicate with your users through push notifications, emails, and SMS text messages.
Sending personalized communication for marketing, updates, and realtime alerts can increase user engagement and retention.
You can also use Appwrite Messaging to implement security checks and custom authentication flows.
You can f...
If you want messaging primitives, then you can decide amongst competitors in that industry scope: AppWrite and getstream.io for example.
If you want a general purpose backend, then you can decide amongst Convex and Supabase.
If you want a general purpose database with your own realtime logic, you can go with say, Neon for Postgres, and architect your own realtime capabilities.
Just have the appropriate expectations for each industry. For example, AppWrite docs have no search results for joining database tables.
This is the entire documentation for AppWrite database: https://appwrite.io/docs/products/databases
That's a pretty small documentation volume if you were to try to build outside their primitives.
Databases - Docs - Appwrite
Appwrite Databases let you store and query structured data. Databases provide high-performance and scalable data storage for your key application, business, and user data.
By the way, regarding high community size counts: I think you need to measure that against the respective industry. The less code is involved, the easier it is to get someone to join a community and increment that community size count. Excel has a bigger community than any coding platform.
Neon has the best copy-on-write branching I have ever seen, and Convex has the best realtime dev experience I have ever seen. But by their nature, it is more difficult for them to increment a community headcount than it is for Appwrite.
I hadn't heard of AppWrite before, had to spend some time understanding before attempting an answer here. And I'm curious to hear from the Convex team on this as well.
The primary difference is the database, imo. Convex is effectively a database with superpowers, their managed db is the heart of everything. It's robust, transactional, relational, and reactive. Appwrite's managed database offering doesn't really check any of these boxes. It's a NoSQL db structured similarly to Google's Cloud Firestore, but has an extremely limited API (based on docs). Database interactions are not transactions. Some relational functionality exists, but again, it's really limited, and even discouraged in the docs for the sake of performance.
Appwrite seems to have prioritized interoperability with other systems, so if you want to accomplish all of this with your own database and infra, and add on features from AppWrite, they do have some functionality that Convex doesn't have yet, namely first party auth, a lot of functionality around push notifications and messaging, and more robust image handling support.
The difference for me is that the things Appwrite has that Convex doesn't are all pretty easily handled through other services. The core of Convex and the product development speed and quality improvements it offers aren't really equaled in any other product in my experience. There's truly no bias there, I could use whatever system I want. But I went from one of the best modern cloud setups you can get (Postgres/Neon/Hasura/GraphQL) to Convex and there's just no comparison at all.
So for greenfield projects, I would consider Convex a no-brainer. For brownfield, of course, requirements tend to be more based on what works well for the team and with the existing code and infra, in which case I could see Appwrite being more palatable for some teams, depending on what they need.
I love that I tried to write something short and then wrote that 😂
I'm obviously not unbiased here (I work at Convex, have used it for my own side projects, and had not heard of AppWrite until now), but I wanted to link to this comment around auth + permissions https://discord.com/channels/1019350475847499849/1232697161909534801/1232699241852305458
My (quick) read of AppWrite is the same as erquhart's where it's similar to something like Firestore where you can write database queries that will sync documents in that collection to your client. Getting the auth rules + permissions is really important here to avoid accidentally writing a query that exposes a document the user shouldn't have access to (the extreme would be sending the entire collection to the client).
With Convex, data flows through Convex functions so when it comes to access control / permissions, you have the option of doing this on a row level (with the helpers linked above) or doing it for each endpoint in your API (each Convex function). You can process the underlying documents however you want in Convex functions before sending data to the client -- e.g. stripping out security sensitive fields that the client shouldn't need, returning a small subset of a document the user doesn't have access to (like for a "you don't have access to X, click here to request access from person Y" UI)
Thanks guys, I really appreciate y'all taking the time to break things down. I hope others can learn from this thread too. Again thanks for taking the time for lil ole me.