Pietro
CCConvex Community
•Created by KinKon on 1/9/2024 in #support-community
What is the right approach when updating the user object for an app that integrates Clerk for auth?
thanks
12 replies
CCConvex Community
•Created by KinKon on 1/9/2024 in #support-community
What is the right approach when updating the user object for an app that integrates Clerk for auth?
🤯
12 replies
CCConvex Community
•Created by KinKon on 1/9/2024 in #support-community
What is the right approach when updating the user object for an app that integrates Clerk for auth?
Did you manage to pass custom claims ? I'm trying to add org_id to the claim but it does not seem to reach convex for some reason...
12 replies
CCConvex Community
•Created by Web Dev Cody on 1/17/2024 in #support-community
curious, how does convex stack up against supabase realtime and firebase?
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.
10 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Large Tables
still running...
10 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Large Tables
BTW loaded about 300k lines now, but then added 2 indexes and the convex dev is taking forever (5+ minutes)
10 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
(but I understand your point on ... it might not run you're on your own keeping track of it)
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
its quite unique as oposed to the declarative model of scheduler run 0.
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
Agree. I think theres also some beauty in bringing the elegance of useQuery in the client to the backend... its such a nice mental model knowing that your code will run when a condition is met...
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
anyhow yeah I think you get my point on the "long living server" vs "inside the box" point up there. 🙂 lmk if you want to discuss further
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
you see what I like is the elegance of modeling a subscription with SQL llike syntax which I can do with onUpdate + query very well...
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
Yes, I think with some AI applications the user can forgive some misses.
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
or decide to simply ignore them
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
yes, but because of queries plus the transactionality of the processor (mutate (started) <do work> mutate(done )) I can allways find things that are started but not finished and clean up later.
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Large Tables
gotcha! forgot about http actions....
10 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
so theoretically trigger is fine, architecturaly, batching is better.
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
It does, except that I'm happy with grouping things up / handling multiple messages at the time as some of my downstream services can enrich in paralel and I expect many users to need enrichment at the same time
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
Also, the reason why I dont like the cron model is bc this behavor is user facing, Imagine your screen and a bunch of dashboards popping up one after the other but you knowing that they are doing something behind the scenes.
I've simulated this very nicelly with a node job with onUpdate the issue is that it requires me to manage a long living server in Vercel (which is not supported) so I need to give money to fly.io or something which I'd rather pay you 😉
23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Trigger/onUpdate Functions
You are right, its not really like trigger in the sense that I dont want to abort transactions, its really more like a pub/sub but where the
pub
does not care who are the subs
. I think the Reactive behavior of onUpdate is fine for me though I'd love if it was a bit more like pubsub ensuring "message consumption" but I'm manmaging this with mutations "start processing" / "end processing" and using this flag to drive the query.
Usecase is this:
supose I have tasks being created on a table. Everytime I have a task or a set of tasks created I want to initiate enrichment workers in paralel, they have their own time, some are now, some are later some work in batches. The tasks table should not really care about who does this, the logic is separate.
Flow is something like this:
onUpdate( select * from notes where state = unprocessed)
worker mutates state to "in progress" (user visibile)
worker does job (e.g. some AI stuff)
worker mutates state to "done"23 replies
CCConvex Community
•Created by Pietro on 1/16/2024 in #support-community
Large Tables
Thanks, seems like 50k lines a pop is working now. I'll keep loading to test my thesis, would be great if someone chimes in on wether this is a good idea.
Is it possible to connect from one convex environment to another endpoint? I looked for it but couldnt find anything about it... I'm working on the assumption that one node app can only talk with one convex instance due to ENV / generated code, did I get this incorrectly/ can you hint on where to find info about that?
10 replies