Live data from Hacker News

Supabase Storage now supports the S3 protocol

supabase.com

181–190 of 194 posts

Re: Supabase Storage now supports the S3 protocol

#181
post #176

Is there a formal s3 protocol spec or do these companies try to reverse engineer/feature match what AWS provides?

The S3 API reference [1] is closest to a formal spec there is. The request, response and the error codes are pretty well documented. [1]: https://docs.aws.amazon.com/AmazonS3/latest/API/API_Operatio...

perhaps you could open source the test suite as a standalone thing so that other s3 compatible apis can prove they match the supabase standard

Re: Supabase Storage now supports the S3 protocol

#182

Earlier quoted context omitted.

I believe that the self hosted version is missing auth hooks. https://www.reddit.com/r/Supabase/comments/1bpaq9w/comment/k...

i believe the docker image ID on the docker-compose hasn’t been updated to the latest stable version. I’ll make a PR later when I’m at my computer (or anyone else is welcome to and I can review/merge)

Awesome, thanks for following up and for making a great product!

Re: Supabase Storage now supports the S3 protocol

#183
post #177

Earlier quoted context omitted.

Do you manage your functions and triggers through source code? What framework do you use to do that? I like Supabase but it’s desire to default to native pg stuff for a lot of that has kind of steered me away from using it for more complex projects where you need to use sprocs to retrieve data and pgtap to test them, because hiding away business logic in the db like that is viewed as an anti pattern in a lot of organ…

The Supabase CLI [1] provides a way for you to manage functions, triggers and anything else in your Postgres database as a migration. These migrations would be checked into your source control. You can then take it a step further but opting-in to use Branching [2] to better manage environments. We just opened up the Branching feature to everyone [3]. [1]: https://supabase.com/docs/guides/cli/local-development#datab..…

Thanks for the response. I don’t think I was super clear about what I meant - I’m more talking about the following scenario:

Let’s say that we are using the Typescript sdk to make our app and need to do some fancy aggregation on a table that isn’t supported by Postgrest natively (specifically we can’t retrieve the data with Postgrest out of the box with its typical setup). Postgrest tells us that in this case we can do two things: create a view or make a Postgres function. Each has their pros and cons, but with either choice now we have this problem: some of our business logic is in sproc/function/view and some of it is in Typescript. In a typical setup using an ORM it would all be in Typescript.

The conventional wisdom is that db’s are dumb state holders and all of the business logic goes in the app - Supabase attempts to turn this on its head and say no actually it’s ok to store business logic in the db. But now if we do that we have a new problem: we don’t have a blessed path forward for where the line is on what goes where anymore. We don’t have good patterns for storing and managing this so other developers understand where to put things and how to work with our app anymore, because it no longer holds the principle of least astonishment. That’s what I mean by framework in this context.

Maybe all that is necessary here is a battle tested example project that demonstrates the “correct” way to make this demarcation. But as-is it steers me away from using Supabase for more complex projects if I even think they will need something that Postgrest won’t support without making a view or sproc/function

Re: Supabase Storage now supports the S3 protocol

#184
post #57

I like to Lob my BLOBs into PG's storage. You need that 1-2TB of RDS storage for the IOPS anyway; might as well fill it up. Large object crew, who's with me?!

I don't. S3-compatible storages usually are significantly cheaper, allow to offload HTTP requests. Also huge databases make backups and recoveries slow. The only upside of storing blobs in the database is transactional semantics. Buf if you're fine with some theoretical trash in S3, that's trivially implemented with proper ordering.

What do you mean by transactional semantics?

Re: Supabase Storage now supports the S3 protocol

#185
post #127
post #99

Earlier quoted context omitted.

38TB of large objects stored in Postgres right here

A hero appears! The client I use currently, npgsql, supports proper streaming so I've created a FS->BLOB->PG storage abstraction. Streamy, dreamy goodness. McStreamy.

I am confused and curious. Can you please elaborate on how streaming is related to pg storage?

Re: Supabase Storage now supports the S3 protocol

#186
post #127

Earlier quoted context omitted.

A hero appears! The client I use currently, npgsql, supports proper streaming so I've created a FS->BLOB->PG storage abstraction. Streamy, dreamy goodness. McStreamy.

I am confused and curious. Can you please elaborate on how streaming is related to pg storage?

If you can't stream data the user is sending through the server to the database you have to buffer the entire payload in memory. This doesn't scale well but can work for smaller payloads.

You CAN stream bytea but:

* Good luck finding a client that supports it(npgsql does actually)

* It doesn't support support start the read/write at any location other than the start. So you'd have to basically build the Lob(Large Object) functionality yourself on top to support upload resume and other use cases.

With Lob even if your client doesn't support streaming, you can mimick it by writing chunks into the Lob.

Re: Supabase Storage now supports the S3 protocol

#187

Earlier quoted context omitted.

i believe the docker image ID on the docker-compose hasn’t been updated to the latest stable version. I’ll make a PR later when I’m at my computer (or anyone else is welcome to and I can review/merge)

Awesome, thanks for following up and for making a great product!

I checked with the team - it was already in the self-hosted version.

There are some guides for using this in the CLI docs:

https://supabase.com/docs/guides/auth/auth-hooks#local-devel...

(I'll find a way to consolidate these docs so the work across CLI + docker-compose)

Re: Supabase Storage now supports the S3 protocol

#188
post #156

What are the chances of Supabase doing a license change? Seems to be fashionable these days so always a little wary of building on these sort of platforms

Unfortunately there isn't a way to prove our intentions to remain open source

That said, I think Supabase is much more de-risked from this happening because we aim to support existing tools with a strong preference of tools that are controlled by foundations rather than commercial entities. For example, 2 of the main tools:

- Postgres (PostgreSQL license)

- PostgREST (MIT license)

Every tool/library/extension that we develop and release ourselves is either MIT, Apache2, or PostgreSQL

Re: Supabase Storage now supports the S3 protocol

#189
post #36

This looks great! How easy is it to self host Supabase? Is it more like "we're open-source, but good luck getting this deployed!", or can someone really build on Supabase and if things get a little too expensive it's easy enough to self-host the whole thing and just switch over? I wonder if people are doing that.

Some may disagree but in my experience Supabase was definitely challenging to selfhost. Don't get me wrong; I'm pretty confident with selfhosting but Supabase was definitely on the hard side. Pocketbase being literally single-binary doesn't make Supabase look good either, although funtionalities differ.

Yes, we have a vastly different architecture[0] from Pocketbase. We choose individual tools based on their scaling characteristics and give you the flexibility to add/remove tools as you see fit.

I doubt we can ever squeeze the "supabase stack" into a single binary. This undoubtedly makes things more difficult for self-hosters. Just self-hosting Postgres can be a challenge for many. We will trying to make it easier, but it will never be as simple as Pocketbase.

[0] https://supabase.com/docs/guides/getting-started/architectur...

Re: Supabase Storage now supports the S3 protocol

#190
post #179
post #92

One of the big wins we get from AWS is that you can do things like load structured data files (csv, parquet) from S3 directly in Redshift using SQL queries. https://docs.aws.amazon.com/redshift/latest/dg/t_loading-tab...

This is indeed pretty cool. They also have the `aws_s3` extension [1] for doing the same thing inside Postgres. Unfortunately, the extension isn't open source. [1]: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_...

we might be able to achieve the same thing now with our S3 Wrapper:

https://supabase.github.io/wrappers/s3/

Post reply on HN