News for hackers. Stuff that matters.
Re:A Poor Man's API by brianjacobs on Monday November 28, 2022 @11:03PM (#33783557)
Not to be mean, but from my reading this needs Heroku free tier which no longer exists? I am very sorry if I got that wrong.
Re:A Poor Man's API by chairmanwow1 on Monday November 28, 2022 @11:32PM (#33783709)
Render is a fantastic replacement
Re:A Poor Man's API by quickthrower2 on Monday November 28, 2022 @11:46PM (#33783799)
No free psql tier
Re:A Poor Man's API by selcuka on Tuesday November 29, 2022 @01:16AM (#33784240)
Fly supports PostgreSQL [1], but it's not managed as you would expect.

[1] https://fly.io/docs/postgres/getting-started/what-you-should...

Re:A Poor Man's API by langsoul-com on Tuesday November 29, 2022 @06:28AM (#33786213)
Use Laravel to generate the api. The boilerplate get you 90% of the way. Host laravel and pgsql on fly for free.

Could do other things like directus (handles the api gen), planetscale has free mysql tier or even using airtable as the db, it provides the api part.

Re:A Poor Man's API by selcuka on Tuesday November 29, 2022 @08:42AM (#33787430)
Sorry, what I meant by "not managed" was they just support PostgreSQL as in "yet another executable running on their containers", so they don't actually optimise or configure PostgreSQL for you.

I find Eloquent's approach to disconnect models from migrations a bit dangerous, but it could be me as I don't have much experience with Laravel. PlanetScale/Vitess doesn't support foreign keys, which is nice for distributed (planet scale, ha!) apps, but could be a problem for certain types of applications. I'd rather stick with (stock-ish) PostgreSQL.

Re:A Poor Man's API by quickthrower2 on Monday November 28, 2022 @11:10PM (#33783594)
NKOTB: https://neon.tech/

Free Tier includes:

compute up to 1 vCPU / 256 MB

storage up to 10 GiB

3 projects per user

Re:A Poor Man's API by judge2020 on Monday November 28, 2022 @11:13PM (#33783611)
Doesn't look like you're the owner, but are there any notable clients using this service? With Heroku it was legit enough that you knew enough enterprise users were subsidizing the free tier to where it won't just disappear overnight.
Re:A Poor Man's API by quickthrower2 on Monday November 28, 2022 @11:28PM (#33783689)
No idea. This is an early stage startup so who knows. But if you need guarantees (it ain’t a hobby project) then best to just pay for the service from any of the big or small clouds.
Re:A Poor Man's API by boomskats on Tuesday November 29, 2022 @03:02AM (#33784852)
Neon is fresh out of private beta (or should be soon). I can't wait to play with it. However they're all about Hasura lately rather than PostgREST, which this article talks about.

Nikita, their CEO, was a guest on the Changelog[0] podcast a month or so ago. Well worth a listen, great episode.

[0] https://changelog.com/podcast/510

Re:A Poor Man's API by nikita on Tuesday November 29, 2022 @03:26AM (#33785010)
Out of private beta in the 6th of December
Re:A Poor Man's API by cpursley on Tuesday November 29, 2022 @05:53AM (#33785993)
Supabase requires Postgres logical replication which Neon doesn't quite have yet have (but it's on the roadmap)

https://community.neon.tech/t/plans-for-logical-replication/...

I'm also really excited about Neon. My dream stack is neon Postgres + readset (database caching proxy) + Supabase.

Re:A Poor Man's API by boomskats on Tuesday November 29, 2022 @03:20PM (#33792708)
Interesting. I assume Supabase requires it because supabase/realtime depends on it?

Personally I'm more interested in vanilla PostgREST than Supabase's implementation of it, or their realtime implementation. It seems really cool but I'm not 100% sold on their ability to evaluate complex RLS rules, which is an important one for me.

ReadySet looks cool, I'll check it out. Thanks!

Re:A Poor Man's API by cpursley on Tuesday November 29, 2022 @03:39PM (#33792964)
That's right (regarding listening to the WAL - replication). I actually just stole that part of the Supabase realtime code for my own lib (so I can do logic in Elixir).

I haven't used their role based stuff but it looks pretty good.

Re:A Poor Man's API by kiwicopple on Tuesday November 29, 2022 @05:18PM (#33794173)
> I'm not 100% sold on their ability to evaluate complex RLS rules

You don’t need to be sold on our ability - all rules are run on the database itself. Supabase is just Postgres, we don’t run any forks. We run vanilla PostgREST too (behind a proxy)

Re:A Poor Man's API by boomskats on Wednesday November 30, 2022 @12:07PM (#33803717)
I've always known that you run vanilla PostgREST, and that it evaluates RLS in-pg, and it all works great. However when I first looked at walrus[0] a while back (18 months ago?), I couldn't quite figure out what the mechanism of action was, i.e. whether the RLS rules were being evaluated in the database or being parsed in from the DDL and then (partially?) reinterpreted by your WAL subscriber. I hope that explains my comment.

I've had another brief look at that repo, and either you've clarified a few things since I last looked at it, or I didn't look at it closely enough in the first place. It makes far more sense to me now, the impersonation + re-query mechanism puts me at 100%.

Thanks for the response, I appreciate it.

[0]: https://github.com/supabase/walrus

Re:A Poor Man's API by quickthrower2 on Tuesday November 29, 2022 @04:03AM (#33785253)
Edit: that was beta free tier. might change.
Re:A Poor Man's API by edmundsauto on Monday November 28, 2022 @11:48PM (#33783816)
Supabase has a free tier with all this included, plus more. It's the best install of postgres I've seen and I'm obsessed with how it makes triggers, auth, etc., all included.
Re:A Poor Man's API by rmason on Tuesday November 29, 2022 @02:43AM (#33784726)
Did a user group presentation on Supabase, no one in the audience had ever heard of it. I came away quite impressed. Plan on building a complex API with it soon. If I was currently employed as a backend developer I'd be worried.
Re:A Poor Man's API by cpursley on Tuesday November 29, 2022 @05:46AM (#33785946)
Don't worry, somebody still has to design all the database tables/relations, views, triggers, etc. Which means we all become better database developers, which is a very good thing.

Also, these tools can't handle certain back end logic (ie, API interactions and integrations, long running processes, etc). Which is the complex bit, anyways.

Re:A Poor Man's API by edmundsauto on Tuesday November 29, 2022 @10:46AM (#33788976)
This just removes the need for some backend engineering, but will leave the actual hard work (schema design, etc)

More and more, developers need to add value to the business, instead of being the key holders of arcane invocations. It used to be that knowing how to use a computer was a technical skills; now it’s evolved into understanding the business.

Re:A Poor Man's API by is_true on Tuesday November 29, 2022 @06:26AM (#33786201)
I think they should create a tier between the free and pro with a price of USD5 that doesn't pause projects and has backups
Re:A Poor Man's API by edmundsauto on Tuesday November 29, 2022 @10:43AM (#33788916)
Agree on the backups piece, that should even be in the free plan as that much space is not likely to be expensive if they used cold storage.

Otoh, if you aren’t sending 1 request per week to an installation, it’s really not active at all. The overheard of supporting this niche is probably too much for a company that clearly is in ruthless prioritization mode.

Re:A Poor Man's API by tptacek on Tuesday November 29, 2022 @12:09AM (#33783935)
Bunch of providers have free tiers.