News for hackers. Stuff that matters.
Re:Postgres WASM by danielvaughn on Monday October 03, 2022 @10:48AM (#33068244)
Very impressive technically, but what are the practical use cases for this? We have IndexedDB and WebSQL, so apart from the other comments mentioning using it in tutorials, I'm not sure what the value add is.

edit: as always, I should read the whole article first. The idea of using it as a dev environment is very cool.

Re:Postgres WASM by jdmdmdmdmd on Monday October 03, 2022 @10:50AM (#33068279)
>We have [...] WebSQL

Not any more - iirc it was depreciated.

In the case of IndexedDB, I haven't looked into it, but Mozilla has the following to say about it:

>Note: IndexedDB API is powerful, but may seem too complicated for simple cases. If you'd prefer a simple API, try libraries in See also section that make IndexedDB more programmer-friendly.[0]

I suppose this project could make development easier by allowing developers to share server-side code? And it has the benefit of already having a large userbase.

[0]https://developer.mozilla.org/en-US/docs/Web/API/IndexedDB_A...

Re:Postgres WASM by danielvaughn on Monday October 03, 2022 @11:00AM (#33068416)
Oh wow, I never knew WebSQL was deprecated. And yeah IndexedDB is pretty complicated, I've tried working with the API a few times but always abandoned it for simpler solutions.
Re:Postgres WASM by smallerfish on Monday October 03, 2022 @11:12AM (#33068615)
There is room for serverless applications with a sane and reasonably complete data storage interface (which localstorage and indexeddb are not.) You could offer users the ability to backup data locally using the filesystem api (which is reasonably usable), or perhaps sync data using p2p using webrtc (which is not as usable as it should be).
Re:Postgres WASM by kiwicopple on Monday October 03, 2022 @10:56AM (#33068361)
There are some things that are uniquely beneficial for Postgres beyond the data storage - the main one I'm excited about is using PostGIS inside the browswer.

OSM + PostGIS in the browser has the potential to do for Maps, what Figma's WASM approach did for design.

Re:Postgres WASM by bobmaxup on Monday October 03, 2022 @09:12PM (#33075694)
> OSM + PostGIS in the browser has the potential to do for Maps, what Figma's WASM approach did for design.

Can you elaborate on this analogy?

Re:Postgres WASM by dahfizz on Monday October 03, 2022 @11:21AM (#33068777)
But why is it relevant that PostGIS runs inside the browser?
Re:Postgres WASM by kiwicopple on Monday October 03, 2022 @11:49AM (#33069185)
It's only relevant in that it "extends" the browser with a set of capabilities that it doesn't already have. You could also run everything via hosted database, but there may be situations where that is less-optimal than downloading the dataset once and leveraging the "offline compute" of a browser tab (for example, applications like ArcGIS Online)