News for hackers. Stuff that matters.
Re:Supabase Edge Runtime: Self-Hosted Deno Functions by SOLAR_FIELDS on Tuesday April 11, 2023 @07:33PM (#35533170)
I think this is great, but a growing question in my mind from these is what is the long tail plan for maintenance of this constellation of stuff? Especially because you guys are building on technologies that you can’t really just casually find developers for eg Elixir and Haskell. I keep seeing missing critical features in Realtime and Postgrest, and I know these are armies of 1-2, but it does kind of worry me when I think about investing time and effort into the Supabase ecosystem as a whole seeing more and more launches while there isn’t much action on existing issues.

Example: https://github.com/PostgREST/postgrest/issues/915#issue-comm...

Re:Supabase Edge Runtime: Self-Hosted Deno Functions by steve-chavez on Tuesday April 11, 2023 @08:14PM (#35533483)
> I keep seeing missing critical features in Postgrest

> Example: https://github.com/PostgREST/postgrest/issues/915

> while there isn’t much action on existing issues.

That one is planned but it's not high priority because it can be solved already with SQL functions[1][2] in a flexible and secure way(GROUP BY is an expensive operation, it cannot be exposed to the frontend just like that).

I do get that some conveniences on the JS libraries are missing but they're not blockers(or critical features IMHO).

[1]: https://postgrest.org/en/stable/api.html#stored-procedures

[2]: https://supabase.com/docs/reference/javascript/rpc

Re:Supabase Edge Runtime: Self-Hosted Deno Functions by SOLAR_FIELDS on Tuesday April 11, 2023 @08:24PM (#35533548)
Thanks for the response Steve. There is this “workaround”, but it’s so much more painful in terms of ergonomics we elected just to escape hatch into raw SQL with a different library (Sequelize) in our case. Black boxing some of our business logic into views or RPC is just not something devs I work with are comfortable with. Having business logic live in the db like this just unlocks a whole new world of pain for people who aren’t used to it. Now I have a whole new class of problems too, now I have to have unit tests in the db with pgTAP and now I as a dev have to decide when and where this kind of logic should go in the db vs on the client side and how to test it. In general I would really call this not a viable alternative at all unless there are some comprehensive design documents that say “do this stuff as RPC in the db because it makes sense to do it there, do this stuff on the client”. When I tried selling this ‘workaround’ in its current form to other devs in my org, they all balked at it.

Maybe I’m thinking about how Postgrest is supposed to work fundamentally wrong and all of this stuff is generally supposed to live in the db. But there certainly isn’t any guidance directing that in documentation currently.

It’s weird because I can do everything else the nice way with Postgrest except this. It feels like the part of the codebases where I have to deal with this (and indeed, it comes up every time) is a constant wart in an otherwise pretty good setup.

Re:Supabase Edge Runtime: Self-Hosted Deno Functions by steve-chavez on Wednesday April 12, 2023 @12:51AM (#35535157)
Thanks for the honest feedback!

There's definitely a lot to improve upon. Not only on features but in documentation as you mention.

I'll revisit this issue after launch week.