News for hackers. Stuff that matters.
Re:Supabase (YC S20) – An open source Firebase alternative by aswinmohanme on Wednesday May 27, 2020 @03:50AM (#23320511)
Finally, waiting for something along the lines of these. Firebase is kind of the poster child for vendor lock in, and has been around for a long time. It's time we have some healthy competition.
Re:Supabase (YC S20) – An open source Firebase alternative by quickthrower2 on Wednesday May 27, 2020 @04:09AM (#23320632)
This has been around for a while: https://parseplatform.org/
Re:Supabase (YC S20) – An open source Firebase alternative by sdan on Wednesday May 27, 2020 @04:46AM (#23320886)
thought parse died a while ago with fb?
Re:Supabase (YC S20) – An open source Firebase alternative by quickthrower2 on Wednesday May 27, 2020 @06:37PM (#23330971)
In some ways it was born when that happened :-).

I keep meaning to give it a go self-hosted, but I have this horrible feeling it needs MongoDB, but I should check that again.

I tried it when Buddy hosted it for free and its quite nice. I prefer it to Firebase because it felt like the API was simpler and more discoverable. I think the fact that no company is "pushing it along" means it stays simple.

Re:Supabase (YC S20) – An open source Firebase alternative by hooksfordays on Wednesday May 27, 2020 @05:28AM (#23321093)
When FB/Twitter/whoever dropped it, they open sourced the platform completely — they just weren’t offering managed hosting anymore, and they weren’t maintaining it. This looks like a maintenance effort by the community that has formalized itself
Re:Supabase (YC S20) – An open source Firebase alternative by marcospolanco on Sunday May 31, 2020 @05:07PM (#23372737)
They have developed a robust release cadence; it is for real and used broadly in production. https://github.com/parse-community/parse-server/releases
Re:Supabase (YC S20) – An open source Firebase alternative by arcturus17 on Wednesday May 27, 2020 @04:02AM (#23320583)
Genuinely curious, what are the hot spots for vendor lock-in?

I’m currently building an MVP for a large client and I’m thinking of replacing Firebase for a custom back-end if the project grows. I think with the current size it would be easy but I want to avoid passing the point where it becomes hard to undo.

Re:Supabase (YC S20) – An open source Firebase alternative by kiwicopple on Wednesday May 27, 2020 @04:24AM (#23320731)
[Supabase cofounder]

Firebase is really only bad if/when you decide to move - usually because of scaling/performance issues. For example, you can only query one document per-second. Once you decide to migrate away, it's very painful - but the truth is all migrations are painful.

This is one of the reasons we chose postgres. If you want to migrate away, you can just "take your database" with you. PG can scale with the best of them.

Edit: I said "you can only query one document per-second" but this is supposed to be "you can only query each document once per-second". Sorry!

Re:Supabase (YC S20) – An open source Firebase alternative by almostarockstar on Wednesday May 27, 2020 @05:13AM (#23321019)
>you can only query one document per-second

That's not true. You can't query any single document more than once per second, which is very different. You can certainly query many separate documents per second.

Re:Supabase (YC S20) – An open source Firebase alternative by kiwicopple on Wednesday May 27, 2020 @05:29AM (#23321098)
Sorry - I intended to write that but I guess I had a freudian slip. You're 100% correct - each document only. Let me put a note
Re:Supabase (YC S20) – An open source Firebase alternative by galactus on Wednesday May 27, 2020 @05:13AM (#23321024)
"you can only query one document per-second".. uhm, that doesnt sound right, it would make firestore useless for all intents and purposes. The only limitation I know that sounds close to that is 1 _write_ per second for the _same_ document.
Re:Supabase (YC S20) – An open source Firebase alternative by londons_explore on Wednesday May 27, 2020 @04:40AM (#23320844)
So are you saying there is no way to get a database dump of firebase, so you have to query both your old and new databases (and deal with all the resulting consistency issues) for a transition period unless your service wants downtime?
Re:Supabase (YC S20) – An open source Firebase alternative by tlarkworthy on Wednesday May 27, 2020 @04:43AM (#23320867)
Firebase has backups to cloud storage, there is no problem obtaining a dump of your data, but that's only one part of a migration
Re:Supabase (YC S20) – An open source Firebase alternative by cpursley on Wednesday May 27, 2020 @04:04AM (#23320598)
Take a look at Hasura - GraphQL out of the box on top of solid relational database (Postgres)
Re:Supabase (YC S20) – An open source Firebase alternative by aman-pro on Wednesday May 27, 2020 @04:09AM (#23320629)
In Hasura your still need a 3rd party service such as Firebase or 0Auth for Authentication. Also, it depends on Serverless functions for doing any business logic.
Re:Supabase (YC S20) – An open source Firebase alternative by praveenweb on Wednesday May 27, 2020 @04:22AM (#23320711)
This is a misconception. Hasura doesn’t depend on serverless functions for doing business logic.

If you are comfortable writing GraphQL, you can add your own custom GraphQL server to Hasura for business logic.

If you are comfortable with REST APIs (or something that already exists), you can use Hasura Actions to define GraphQL types and call your REST endpoint to perform business logic.

Now where this server is hosted is totally upto the user. It can be serverless functions or can be a monolith server (in language of choice) hosted anywhere.

Hasura just needs the endpoint :)

Re:Supabase (YC S20) – An open source Firebase alternative by PKop on Wednesday May 27, 2020 @02:57PM (#23328138)
> you can add your own custom GraphQL server to Hasura for business logic

> If you are comfortable with REST APIs (or something that already exists)

This is an order of magnitude worse than simply having to "depend on serverless functions". You're saying for any real-world business logic (read: non-crud writes to the database, every app has these), you need to re-implement another graphql server? or simply have something that "already exists" to solve your problem? Isn't that what Hasura is for?

> Now where this server is hosted is totally upto the user.

I think the dream of Hasura-like products is to not have a bunch of servers everwhere that need to be managed and coordinated. This is the beauty and power of Postresql. Containing our business logic in it is ideal. At the very least, containing our business logic in 1 Hasura instance would be 2nd best. Calling out to some other rest api or custom implemented GraphQL server defeats the purpose of a self-contained GraphQL layer. If some of the data lives elsewhere, sure. But what if the data just lives in our database?

Re:Supabase (YC S20) – An open source Firebase alternative by PKop on Wednesday May 27, 2020 @09:24AM (#23322762)
Perhaps what they meant is it requires application code (server or severless) for business logic mutations, instead of surfacing database functions as RPC.

This was the particular reason I moved away from Hasura. Business logic mutations in SQL are too powerful to give up and replace with JavaScript in opinion.

Re:Supabase (YC S20) – An open source Firebase alternative by tirumaraiselvan on Wednesday May 27, 2020 @03:50PM (#23328986)
We have this feature high up in our priority: https://github.com/hasura/graphql-engine/issues/1514

We already support user defined PG functions to be exposed as graphql queries so this is a natural extension.

Re:Supabase (YC S20) – An open source Firebase alternative by cpursley on Wednesday May 27, 2020 @11:15AM (#23324591)
I believe Hasura is working towards being able to write Actions in SQL.

How are you surfacing RPCs from the database? That sounds interesting.

Re:Supabase (YC S20) – An open source Firebase alternative by PKop on Wednesday May 27, 2020 @02:44PM (#23327911)
A key insight I've arrived at over past few months is GraphQL is most useful for multiple teams to have "one" API endpoint and they can then work on front end features without blocking each other, as well as write different clients (and therefore many different possible "queries") without having to constantly re-write the back-end API. In other words, ultimate flexibility on the front end when you don't know what queries you need and you need to divide work across teams/developers.

This comes at the cost of complexity of implementing a performant GraphQL server. Perhaps another instance of a thing that gets really popular because it's good for large corporations rather than being ideal for solo devs or small projects. Like NoSQL and other scalability optimizations vs sql etc. Hasura seems the best I've come across so far at making this easy/quick.

But in many situations, at least for my use-case and likely many others, simply writing well thought out SQL queries are both simple, easily iterated upon, require fewer layers, infrastructure, code etc. In the Hasura scenerio, custom SQL queries inevitably are needed anyways, Hasura mostly gets you the "crud" operations quickly.

If you construct your "screens" or "pages" of a Next.js web-app, for example, as collection of RPC's defined in SQL either requested through "/api" routes integrated with the framework, or even better (when possible) directly accessing your database calls [using raw sql of course] within component "getServerSideProps" and "getStaticProps" calls[0], there isn't really anything simpler in my view. No ORM, no Graphql.

By RPC, I simply mean a stored sql function, or view. Executing this is as simple as:

  // some api endpoint, which then queries database:

  await db('select pay_balance($1)', [leaseId]);
  return res.status(200).send("ok");
The stored function is written in SQL, not javascript http requests, and has full access to all the data in the database to implement transformations on this data.

Reading "The Art of Postgresql"[1] currently and a constant refrain is to push as much business logic into the database as possible. When you do this, you avoid so much complexity vs having this spread around in application code or cloud functions or microservices, etc. ACID, transactions, etc. all come with it.

[0] https://twitter.com/adamwathan/status/1246144545361997829 this uses a query builder, I wouldn't even do that. Just raw sql everywhere.

[1] https://theartofpostgresql.com/

The tagline: "Turn thousands of lines of code into simple queries" couldn't be more impactful in my thinking of late, and it's been extremely beneficial for making me more productive with simpler, less error prone code.

Re:Supabase (YC S20) – An open source Firebase alternative by ratww on Wednesday May 27, 2020 @04:11AM (#23320643)
> In Hasura your still need a 3rd party service such as Firebase or 0Auth for Authentication

That's false. You can write your own service or use some open source authentication system, like you would in a normal website. Or use JWT tokens. It doesn't have to be a 3rd-party service.

Re:Supabase (YC S20) – An open source Firebase alternative by hmexx on Wednesday May 27, 2020 @04:19AM (#23320698)
nhost.io basically does this. it packages Hasura with its own auth backend, as well as an S3 compatible storage backend. They're adding lambda functions soon.

Effectively a firebase alternative using open source tech

https://www.nhost.io

Re:Supabase (YC S20) – An open source Firebase alternative by cpursley on Wednesday May 27, 2020 @04:19AM (#23320697)
I actually built auth directly into Postgres similar to this: https://github.com/sander-io/hasura-jwt-auth (not sure if this is the best idea, but it works well)

For business logic you can trigger (Events) webhooks to any service or stack of your choice or use GraphQL schema stitching. And now there's a new Actins feature as well.

Re:Supabase (YC S20) – An open source Firebase alternative by viig99 on Wednesday May 27, 2020 @07:26AM (#23321751)
https://github.com/daptin/daptin, DIY self hosted firebase and more!
Re:Supabase (YC S20) – An open source Firebase alternative by jinjin2 on Wednesday May 27, 2020 @05:07AM (#23320989)
Another solid alternative is Realm. We have used it for several projects, and the experience was light years ahead of Firebase.

But since they got acquired by MongoDB things have gone a bit quiet, so who knows?

Re:Supabase (YC S20) – An open source Firebase alternative by closetnerd on Wednesday May 27, 2020 @04:04AM (#23320601)
AWS amiplfiy seems like its trying to do something similar
Re:Supabase (YC S20) – An open source Firebase alternative by aidos on Wednesday May 27, 2020 @05:17AM (#23321045)
I eventually settled on Hasura but I did evaluate amplify. It looked to me like it was too complicated to break away from their db so I gave up on it (it was possible, but it felt like you had all the complexity of AWS IAM permissions, but just to access data). I didn’t go too deep so I don’t really remember the details but Hasura seemed the better approach (still a happy user of it).
Re:Supabase (YC S20) – An open source Firebase alternative by closetnerd on Wednesday May 27, 2020 @12:53PM (#23326123)
Gotta say I need to take a better look at Hasura