Conference Schedule - PGConf.EU 2019
Using PostgreSQL as a Web Server and Content Management System
Time: 10:50 - 11:40
We have recently created a new web service using just a simple WSGI/Flask Python script and PostgreSQL as the only backend. We currently use an Apache wrapper around WSGI to handle virtual hosting, security controls and authentication - but it doesn't do anything else. No other web framework or CMS is involved. An HTTP GET or POST results in a single PostgreSQL function call which queries or updates data based on the URL and internally generates and returns the necessary web page HTML. The web page rendering is done using a locally developed template based PostgreSQL extension module. Authorisation control is managed entirely within PostgreSQL by using roles and local data on who can access what (also held in PostgreSQL). Local content is provided from other PostgreSQL databases using foreign data wrappers. We end up with a robust and simple to manage service with all local functionality entirely within PostgreSQL. Scalability and redundancy could also be achieved using standard PostgreSQL features such as partitioning and replication, although this isn't something we have looked at yet. The talk would demo what we have done and run over the architecture and some of the tools used.
The following slides have been made available for this session: