by kiwicopple · 3y ago · 0 comments
This release introduces a few new features to Supabase Storage: Resumable Uploads , Quality Filters, Next.js support, and WebP support.
As a reminder, Supabase Storage is for file storage, not to be confused with Postgres Storage. Resumable Uploads is the biggest update because it means that you can build more resilient apps: your users can continue uploading a file if their internet drops or if they accidentally close a browser tab
This implementation uses TUS[0], which is an open source protocol. We opted for this over s3's protocol to support the open source ecosystem. This means you can use several existing libraries and frameworks (like Uppy.js[1]) for multi-part uploads.
It also has some neat technical details, using Postgres Advisory Locks to solve concurrency issues.
The Storage team will be in the comments to cover any technical questions.
[0] TUS: https://tus.io/
[1] Uppy: https://uppy.io/docs/tus/
Yet, what stops us from using supabase is not the set of features, but the state of the current apis. Last night I was evaluating the python sdk and some of the examples were broken, baseline features like RLS are unimplemented (https://github.com/supabase-community/supabase-py/issues/58), and progress seems slow (it seems to have been release two years ago and it is still in alpha). Even though supporting many platforms is boring (i.e. no flashy feature announcements) and costly (many FTEs are required for maintenance let alone adding features), are there any plans to bring feature parity more of the sdks to allow more developers to leverage this awesome platform?
We hope to continue making this a community-driven endeavor, so if anyone reading this would like to become a maintainer for one of the libraries (especially Python), please reach out. If we can't find maintainers we'll find a polyglot who can work on this full-time.
[0] Swift: https://supabase.com/docs/reference/swift/introduction
[1] C#: https://supabase.com/docs/reference/csharp/introduction
I once had a computer magazine publisher tell me they only published Windows content because none of their readers used Mac or Linux.
Of course they won't use more than 25mbps if you literally throttle them to that speed. What a joke.
Are these types of positions paid?
I was a bit surprised, however, that there's not currently a good way to reference storage objects from my postgres tables. I found that the recommended way is to store the object's path (as a string) in the database. While that works, it isn't optimal as I'd like to enforce consistency between the object and the table referencing it.
I've tried referencing the id of the corresponding row in the storage.objects table, but (1) apparently the schema supabase uses to manage storage.objects may change, and (2) it still requires separate (non-atomic) operations - or additional triggers - for keeping things in sync. Using buckets (corresponding to tables) and folders with ids is another way to work around it, but still feels suboptimal.
Not 100% sure what the best solution would look like, but ideally the supabase client could emulate storage operations for objects "attached" to a given table record, and supabase (the backend piece) could implement them as atomic operations (e.g., uploading the actual storage asset, storing the necessary metadata, and updating my table row to reference the newly-created storage object; exposing a helper function to return the URLs for any storage objects attached to a record; etc).
Anyway, just a suggestion. Keep up the great work!
We've dabbled with the idea of offering versioned views which have a "set" interface (eg `storage_v1`, `storage_v2`). We're still debating all the ways that we might do it.
All that to say - we're aware that this experience can be improved and we're working on it.
It seems like it may be more costly than firestore, although you are offering postgres as the underlying data store.
I'm wondering if I'm reading that right.
When it says 500 connections, is that 500 clients connected at one time? Just trying to compare the pricing vs firebase.
Thank you
The 500 connections you quoted is for the "Realtime" feature (which provides multiplayer functionality). You're correct, this is 500 clients connected simultaneously
Btw did you start working on supabase in 2020? I was looking at the YC catalog.
That’s seriously impressive amount of work if it’s only been a couple of years.
Kudos on the launch - great addition
From what I understand, the TUS protocol wasn't necessarily simple, but the TUS community has made it a lot easier with their node server which they recently converted to Typescript: https://github.com/tus/tus-node-server
We plan to contribute these back to the Node TUS server after launch week.
Even if Supabase keeps the same pricing (though why would you) the folks at BackBlaze have had my respect for a long time and I’m happier when I can stay out of the AWS universe.
one caveat - we are shipping as fast as we can right now so that we can have feature-parity with Firebase. It's a balance of "breadth vs depth" and right now we are going for breadth. We will definitely offer more providers on the platform but the resilience of s3 is beneficial for our engineers right now - it means that they can focus on features rather than devops.