The Postgres WASM project has created a browser-based environment with the PostgreSQL DBMS.

The Postgres WASM project has released its developments for an environment with the PostgreSQL DBMS that runs inside the browser. The associated code is open under the MIT license. It offers tools for building a browser-based virtual machine with a stripped-down Linux environment, PostgreSQL server 14.5, and accompanying utilities (psql, pg_dump). The final build size is about 30 MB.

The virtual machine's contents are created using buildroot scripts and run in the browser using the v86 emulator. A web shell is provided for interaction with PostgreSQL utilities from the browser. To connect to the PostgreSQL server running in the browser server network requests from the virtual machine are handled by a proxy that routes traffic using the Websocket API.

Main features of Postgres WASM:

  • Saving and restoring the DBMS state from a file or browser storage based on IndexedDB.
  • Quick start from a file with a saved state of the virtual machine or a full start with emulator reboot.
  • Memory allocation virtual machine from 128 to 1024 MB.
  • Configuration of the web terminal font size.
  • Support for uploading files to the virtual environment, including the ability to upload database dumps.
  • Support for downloading files from the virtual environment.
  • Establishment of incoming and outgoing network connections, creating a tunnel for routing requests to the network port 5432.

Among the potential use cases for Postgres WASM are creating demonstration and training systems, organizing data work in offline mode, analyzing data while offline, testing functionalities and configurations of PostgreSQL, creating a local development environment, preparing snapshots of a specific DBMS state for sending to other developers or support services, and testing logical replication with external DBMSs.

The Postgres WASM project has created a browser-based environment with the PostgreSQL DBMS.


Source: opennet.ru
Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster