irthomasthomas / undecidability

6 stars 2 forks source link

https://supabase.com/blog/postgres-wasm #693

Open irthomasthomas opened 6 months ago

irthomasthomas commented 6 months ago

Title: Postgres WASM by Snaplet and Supabase

Description: Postgres WASM by Snaplet and Supabase 2022-10-03 • 11 minute read Mark Burggraf avatar Mark Burggraf Engineering

Postgres WASM by Snaplet and Supabase

Today we're open sourcing postgres-wasm with our friends at Snaplet.

postgres-wasm is a PostgreSQL server that runs inside a browser. It provides a full suite of features, including persisting state to browser, restoring from pg_dump, and logical replication from a remote database.

We're not the first to run Postgres in the browser - that title belongs to the team at Crunchy Data who shared their version of this on HN a month ago. It's awesome, and we wanted an open source version, so we teamed up with Snaplet build it. Let's explore how it's built, and some extra features we've added.

🐈 Who's Snaplet?

Snaplet gives developers production-accurate data and preview databases that they can code against, so they can focus on shipping.

Checkout out how you can use Snaplet to clone Supabase environments.

Demo

Before we get into the technical details, try it out yourself (warning: it will download ~30MB):

wasm.supabase.com

Postgres inside a browser

To run it locally:

# From Snaplet Repo
git clone git@github.com:snaplet/postgres-wasm.git
cd postgres-browser/packages/pg-browser
npx serve

# From Supabase Fork
git clone git@github.com:supabase-community/postgres-wasm.git
cd postgres-wasm
git checkout web
cd packages/supabrowser
npx serve

And open a browser at localhost:3000.

URL: https://supabase.com/blog/postgres-wasm

Suggested labels

{'label-name': 'WebAssembly', 'label-description': 'Technology that enables running high-performance applications in web browsers.', 'confidence': 76.53}

irthomasthomas commented 6 months ago

Related content

693 - Similarity score: 1.0

74 - Similarity score: 0.86

688 - Similarity score: 0.85

695 - Similarity score: 0.84

691 - Similarity score: 0.83

692 - Similarity score: 0.82