pgFaaS: Geo-Processing made simple with Serverless technology

The serverless approach to server-side computing as popularized by Amazon Lambda and FireBase Cloud Functions has clear advantages in terms of ease of deployment and scalability of software applications. However, this lightweight Function-as-a-Service (FaaS) computing model has limitations when it comes to geospatial analytics, since geo-processing typically requires the storage of relatively large datasets and the realisation of complex algorithms. Furthermore, most FaaS implementations tend
to be based on proprietary technologies.

In this presentation we describe pgFaaS as a solution to these issues.

pgFaaS is based on the OpenFaas project (https://www.openfaas.com) and allows the execution of read-only SQL queries wrapped inside JavaScript functions. Once these functions are defined, they can be called, e.g. via HTTP and passed parameters as needed. 

The approach lends itself to building of complete, bespoke, web-service APIs with minimal maintenance of infrastructure and related applications as is typically the case with Cloud-based server-side software systems.

pgFaaS leverages container technologies such as Docker Swarm clustering to scale the number of containers needed to meet increased demand of function execution and associated (efficient) pooling of PostGIS resources. The OpenFaas project software is  used to manage and execute functions, as well as handling authentication and authorization.

The use of PostgreSQL/PostGIS to perform geo-processing leverages a compendium of
available algorithms and dispenses with layers of complex middleware as typified by Web Processing Service (WPS) solutions.

The discovery of database content is achieved through built-in catalog functions, supporting the
listing of available tables and their structure.

Since geo-processing may entail long-running tasks, the asynchronous execution of functions is supported through callback URLs.

pgFaaS has been used in several small-scale applications, however it is currently being considered as the basis of new services offered by the Australian Urban Research Infrastructure Network (AURIN - www.aurin.org.au) to its users.

Presentation type: Full length
Session: New Technology

Presenter

Luca Morandini

Software developer for (almost) three decades in the geo-spatial domain, passionate about designing solutions around open source software and open standards, committer to GeoTools and GeoServer projects, currently working as Data Architect at the University of Melbourne - AURIN project.