Long Running Services ❤️
hey is there any recommendation for long running/persistent services? i want to run a service that just updates a small-ish convex table (1000-4000 entires) every second or so, these events will be streamed in via web socke
7 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Any reason not to use cron or recurring scheduled functions?
this will be a persistent service, receiving websocket updates for data every half second or so.
was thinking about bringing in aws, but really wanna just stick with convex for all my business logic
maybe something like fly io
this also worries me because how am i going to keep deployments in sync with whatever IaC tool i bring in. does convex have plans to support pulumi/terraform?
Where are the websocket updates coming from, user activity or just external events
It feels like there's an assumption that just using Convex the way it's designed won't work, just trying to see if your problem can be solved in a Convex-first way. Not clear where IaC comes in for your use case or what Convex support for it would look like for you
it’s coming from a 3rd party, updating financial data, like stock market prices
updating tickers very fast
IaC comes in so i can sync a persistent service and a convex deploy instead of just booting one up in aws dashboard, i don’t mind just “convex deploy” in a ci cd pipeline when convex is in charge of everything, however id prefer an IaC tool when i need to rely on some other cloud provider & convex at the same time
i suppose i will just put it in an action and see if it won’t be too expensive to just keep it running all the time ?
Yep, every event is a function call, and function calls are relatively cheap
I would personally prove that it doesn't Just Work before investing energy in custom infra
I suspect it'll just work
i’ll take this approach, thanks for the chat ❤️