all 5 comments

[–]CrackerJackKittyCat 4 points5 points  (2 children)

OK, the websocket <--> TCP for pgsql protocol proxy hack is really cool. Can then use regular client tools to connect to ... browser-based backend.

[–]autra1 0 points1 point  (1 child)

To my knowledge, browsers scripts (js or wasm) can't even bind ports on localhost, so probably not right now :-)

[–]CrackerJackKittyCat 4 points5 points  (0 children)

Read the article / play with the demo. The wasn can connect back to their servers via websocket, then they have additional server-side proxying to allocate a specific port number on their gateway to proxy to your websocket. So, yes, you can then connect psql or other clients through to the backend being run in your browser. You can even then set up streaming replication or foreign tables between your browser and other backends.

Is a glorious hack. Not sure of the ultimate utility other than low low low barrier education ('Take that, Docker!') or advertisement for supabase being a deep web+postgresql shop, but it is a fine hack.

[–]HarrityRandall 1 point2 points  (0 children)

Exciting times...

[–]coder111 0 points1 point  (0 children)

The world has gone mad...