5 ms·
hey hn, supabase ceo here hopefully it's obvious from the title what we're shipping today. "Supabase Storage" is for larger assets - it's a wrapper around s3,
by kiwicopple 4y ago
hey hn, supabase ceo here
hopefully it's obvious from the title what we're shipping today. "Supabase Storage" is for larger assets - it's a wrapper around s3, where the buckets/folders are mapped into your postgres database so that you can write access rules using Row Level Security.
This release adds image resizing. It looks like this:
supabase.storage.from('bucket').getPublicUrl('image.jpg', {
transform: {
width: 500,
height: 600,
},
})
In tandem added some webhooks/events to the storage server to enable some smarter cache-busting. We're using Cloudflare for caching on our hosted platform, but the addition of webhooks should provide the primitives to use any CDN/service.
The Storage API is 100% open source and can be hosted as a standalone server (with Postgres+PostgREST): https://github.com/supabase/storage-api https://github.com/supabase/storage-api
- danpalmer 4y ago> it's a wrapper around s3 > We're using Cloudflare for caching It sounds like Supabase is fairly explicitly targeting being the glue between a bunch of lower level infrastructure, that may be in different cloud services, and providing one platform with a better UX. Is this fair to say? If so this is an interesting strategy to be so open about this. Other platforms-as-a-service don't seem to like to acknowledge the services they use under the hood. I can see this being both a positive (brand recognition, trust), and a negative ("we could just build this ourselves and have more choice"). Is this an intentional strategy? Can you talk any more about how you're thinking about it?
- kiwicopple 4y ago> explicitly targeting being the glue between a bunch of lower level infrastructure It might be more precise to say that we provide the primitives that a developer needs to host Supabase on any cloud provider. Becoming the "glue" appears to be a byproduct of this approach For example: we use s3 right now, but we've built the storage server so that it can be extended with other storage providers (in fact, it has a "local disk" provider for developing locally). We use Cloudflare right now for the CDN, but as mentioned in the blog post the Webhooks we built into this release are so that we could migrate to any CDN service without locking ourselves into any CDN-specific cache invalidation. Portability is something we think about a lot (although harder to solve this problem at a CDN-level). > Other platforms-as-a-service don't seem to like to acknowledge the services they use under the hood Is this an intentional strategy? Can you talk any more about how you're thinking about it? There's no strategy behind it. We are trying to build a great developer platform, and at our current stage these platforms provide a better service for some features than we could ourselves. There's no shame in that from our POV, and these services deserve the credit for delivering something useful. I doubt we'll ever get to a "build our own datacenter" stage - we'll probably just continue to focus on the application level (with a Database-centric view of the world)
- no_wizard 4y agoI’m perhaps overly bullish on your platform so I say never say never! Transparently, I hope you guys are hiring developers again soon, I had look into becoming a technical engineer on the sales side but we couldn't make the numbers work. I really can't wait to see your guys next round of innovations!
- chrisweekly 4y agoGreat point. Maybe 2y ago I asked Vercel salespeople about their infr and learned it was virtually all AWS. (Technically "multi-cloud" bc they used GCP in some minor way.)
- braindead_in 4y agoGreat work. Congrats! I am looking to build a file management app using Supabase + NextJS (e.g. Dropbox clone). Can you please point me the right way. Thanks!
- kiwicopple 4y agoI'm not sure if I could describe the full implementation of a Dropbox clone in a HN comment, but our Storage Docs[0] should give you an idea of most of the details that you need. If you prefer videos, I see there are a few tutorials on YouTube when you search "Supabase Storage" [0] Storage Docs: https://supabase.com/docs/guides/storage https://supabase.com/docs/guides/storage
- techn00 4y agoWhen will the storage dashboard be open source?
- kiwicopple 4y agoJust caught up with the FE team on this one - it's pending in this PR: https://github.com/supabase/supabase/pull/10810 https://github.com/supabase/supabase/pull/10810 One of the engineers is testing this now and it should get merged within the hour. The build for amd64 takes about 6mins, and about 4 hours for arm64. I'll update here when it's merged (edit: it was actually merged earlier today, I originally linked to the wrong PR) For more context, the Storage UI was merged a couple of weeks ago but we simultaneously rolled out a new login screen for our Dashboard (for SSO) which then got rolled out to the Docker image. We've added a feature flag. Sorry for the delays - the lead up to launch week has everyone a bit stretched.
- eclipxe 4y agoWhat a great comment. I applaud the transparency and depth. Nice.
- no_wizard 4y agoAny plans to switch to R2? It’s cheaper than S3 and would run in network with Cloudflare, allowing Supabase to take advantage of the CDN more optimally over time
- kiwicopple 4y agoIt's one of the storage providers we'll investigate, now that R2 is GA. Our Storage server is hosted on AWS, so it wouldn't immediately save money (at least for egress) but we'll also investigate moving the servers to another cloud provider.
- skrtskrt 4y agoCould this eventually be pluggable with bring-your-own s3-compatible provider? Would love this in front of my DigitalOcean object storage
- kiwicopple 4y agoyes definitely. It should be easy to add s3-compatible providers (which are numerous, since s3 seems to be the defacto file storage API now). We haven't added "BYO" functionality to our hosted Platform because, frankly, we already spend a lot of time debugging various quirks and network issues - even for infra which we provide. Adding an extra level of opaqueness at our current team size would be very stressful from a support-perspective. That said, we're designing/developing so that it's possible and we'll continue to assess as the team grows.
- worldmerge 4y agoHi, I know this is off topic but I would appreciate if there was a C++ library for the https://supabase.com/realtime https://supabase.com/realtime product. I would like to use it for sensors but no C++ library means I can't use it on my Arduino or ESP32s.