4 ms·
Amazing work, kudos to the Supabase team! > However, Supabase already offers a flexible solution for that - Database Functions! As such, for Supabase [Edge] Fu
by marcus_cemes 5y ago
Amazing work, kudos to the Supabase team!
> However, Supabase already offers a flexible solution for that - Database Functions! As such, for Supabase [Edge] Functions, we decided to deploy far-and-wide so that they are as close to your end-users as possible.
Does this mean that a choice has to be made between high latency (Edge Functions) and specialised SQL-only functions (Database Functions)? I see that cron-like triggers are still on the roadmap, is there a plan to have TypeScript functions that can run close to the database (or other resources)? Call me new school (as in not old school), but I prefer processing complex queries in a language that I feel comfortable working in, SQL is not that.
I know a lot of folks are huge fans of writing pure SQL, the lack of type safety and lack of good intergration with source control (I dream of a world where database schemas, functions, security access and the rest can be saved to source control for reproducibility) scare me.
- inian 5y agoWe can look at offering an option to restrict edge functions to just launch in the same region as your database (probably can't call it "edge" at that point though). This might also be useful if you are processing data in your function that you do not want to leave a particular geographical region. We are also exploring running Deno directly inside your database - https://github.com/supabase/postgres-deno https://github.com/supabase/postgres-deno
- kiwicopple 5y ago> is there a plan to have TypeScript functions that can run close to the database (or other resources)? Just to double-up on Inian's comment - there is definitely a world where this happens, perhaps even inside the database itself (like plv8). We were focused on the Edge experience this time, but I'm excited about the future that an open-source TS runtime like Deno enables. > I dream of a world where database schemas, functions, security access and the rest can be saved to source control for reproducibility this was one of the main reasons we started supabase. we hope to make database development as easy as application development
- nextaccountic 5y ago> I know a lot of folks are huge fans of writing pure SQL, the lack of type safety and lack of good intergration with source control (I dream of a world where database schemas, functions, security access and the rest can be saved to source control for reproducibility) scare me. Hey there are some migration tools that play nice with source control. For example, Flyway has repeatable migrations https://flywaydb.org/documentation/tutorials/repeatable https://flywaydb.org/documentation/tutorials/repeatable, here's some links about this https://stackoverflow.com/questions/25839666/flyway-strategy-for-migrating-frequently-changing-functions-stored-procedures https://stackoverflow.com/questions/25839666/flyway-strategy... https://github.com/flyway/flyway/issues/819 https://github.com/flyway/flyway/issues/819 https://github.com/flyway/flyway/issues/128 https://github.com/flyway/flyway/issues/128
- tianzhou 5y agoThere's a new one in this field bytebase.com (Disclaimer, I am the author of it)