Hey HN, we’re excited about this launch. This was a collaborative effort with the team at Snaplet [0]. postgres-wasm is an embeddable Linux VM with Postgres installed, which runs inside a browser. It provides some neat features: persisting state to browser, restoring from pg_dump, logical replication from a remote database, etc. The idea was inspired by CrunchyData’s HN post about a month ago [1]. We love the possibi…
Postgres WASM
161–170 of 190 posts
Re: Postgres WASM
#162Peter from Snaplet here. A month ago I saw the CrunchyData post and wanted to play around with the code that made it happen, it wasn't OSS so I asked for help: > If anyone out there wants to work on an open source version of this full-time please reach out to me. [0] Paul reached out and we started working on it almost immediately. Check out the repo here: https://github.com/snaplet/postgres-wasm We have a blog post…
Have you looked at compressing that ~16MB wasm file with something like Brotli? When I was actively doing stuff with wasm (~2019), Brotli was the best compression approach. eg 16MB uncompressed -> 2.4MB compressed https://github.com/golang/go/wiki/WebAssembly#reducing-the-s...
a2b67f25.bin : 8.26% (16777216 => 1386514 bytes, a2b67f25.bin.zst)Re: Postgres WASM
#163Earlier quoted context omitted.
I've also noticed a number of fun WASM projects this year. I think the underlying WASM features that enable all this have been around for a while, so the breakthroughs are probably coming from the community and ecosystem growing incrementally and synergistically, building on each other's work and collaborating.
I believe they are coming from people wanting to push people to get confortable with running binary blobs in their browsers so they can suck up all that juicy personal information leaked by browsers.
Re: Postgres WASM
#164Earlier quoted context omitted.
I've also noticed a number of fun WASM projects this year. I think the underlying WASM features that enable all this have been around for a while, so the breakthroughs are probably coming from the community and ecosystem growing incrementally and synergistically, building on each other's work and collaborating.
I believe they are coming from people wanting to push people to get confortable with running binary blobs in their browsers so they can suck up all that juicy personal information leaked by browsers.
Re: Postgres WASM
#165Earlier quoted context omitted.
Have you looked at compressing that ~16MB wasm file with something like Brotli? When I was actively doing stuff with wasm (~2019), Brotli was the best compression approach. eg 16MB uncompressed -> 2.4MB compressed https://github.com/golang/go/wiki/WebAssembly#reducing-the-s...
Zstandard is able to compress this file to 1.4MB. a2b67f25.bin : 8.26% (16777216 => 1386514 bytes, a2b67f25.bin.zst)
(zstd at --ultra -22 level: 1149751 bytes).
Re: Postgres WASM
#166Earlier quoted context omitted.
Doesn’t pg_dump/pg_restore work across versions? (So long as the CLI tools are the latest version). I guess version compatibility could be an issue in theory, but I’m yet to hit into a backwards compatibility issue with Postgres.
I wish. You'd think it'd just be able to check the db to see if there's any schema or procedure incompatibility, but it doesn't. Instead, it goes "Remote uses version X and you're using version Y, sort that out" and then it exits.
Re: Postgres WASM
#167Hey HN, we’re excited about this launch. This was a collaborative effort with the team at Snaplet [0]. postgres-wasm is an embeddable Linux VM with Postgres installed, which runs inside a browser. It provides some neat features: persisting state to browser, restoring from pg_dump, logical replication from a remote database, etc. The idea was inspired by CrunchyData’s HN post about a month ago [1]. We love the possibi…
Do you have a benchmark of load times after the includes are cached? Depending on whether it's 1s it will make the applications for this very different.
Re: Postgres WASM
#168Peter from Snaplet here. A month ago I saw the CrunchyData post and wanted to play around with the code that made it happen, it wasn't OSS so I asked for help: > If anyone out there wants to work on an open source version of this full-time please reach out to me. [0] Paul reached out and we started working on it almost immediately. Check out the repo here: https://github.com/snaplet/postgres-wasm We have a blog post…
Didn't realize you guys are in SA. Hi from Stellenbosch. Cool to see more South Africans here and in the startup community in general.
Re: Postgres WASM
#169Earlier quoted context omitted.
> How much work was done supporting the VM All of the heavy lifting here is done by v86: https://github.com/copy/v86 v86 can be used for a number of things besides Postgres - things like Repls or other entire applications are definitely achievable. Networking between Postgres and the internet was a lot of work, and Mark came up with a neat solution detailed in the blog post. This solution can be used for any other ap…
This is cool, but is also somewhat saddening too. The dream is a real wasm native postgres; in fact to get all of postgresql's cool shared mem proccess stuff and make it something like shared array buffer! The dream is also that WASI interface and new-school OS interfaces like memfd_create are increasingly aligned. Instead of rationalization our interfaces, however, it's just emulation layer on top of emulation layer…
Re: Postgres WASM
#170There have been a lot of new WASM things popping up on HN. Was there some major new change the enabled all this?
I've also noticed a number of fun WASM projects this year. I think the underlying WASM features that enable all this have been around for a while, so the breakthroughs are probably coming from the community and ecosystem growing incrementally and synergistically, building on each other's work and collaborating.