2.5 KiB

GeoPub Architecture

This document describes the high-level architecture and ideas of GeoPub from the perspective of developers.

GeoPub is an Web application written in the OCaml programming language. The OCaml code is compiled to JavaScript via js_of_ocaml.

Functional Reactive Programming

GeoPub uses the React library for functional reactive programming.

UIs are in general not returned as static HTML elements, but as a time varying signal of HTML elements.


GeoPub is organized into various smaller components. Components handle specific functionaity and may hold state. Components interact with each other over some clearly defined interface and should be as loosely-coupled as possible.

We use the archi library to manage components.

The system (collection of components) is started from the module.


The user-interface of GeoPub. This listens for changes in the router view and loads the appropriate view to the DOM.


Listens for changes in the navigator location.


Store RDF data in an IndexedDB database.

Provides a Dataog interface for querying the database. Results are returned as signals (see section on functional reactive programming above).


Loads initial sample data.


Manages the user session, i.e. an user interface for an XMPP connection.


Provides a view of RDF data.


Handles the Leaflet map. As Leaflet does not provide a functional interface this component holds state so that the map appears functional to the rest of GeoPub.

Note: this is not called Map to avoid clash with the OCaml standard library Map.


XMPP functionality.


Manages the underlying XMPP connection.


Handles entity capability requests. This is necessary to receive XMPP PubSub notifications.


Reads all incoming XMPP stanzas and attempts to parse RDF data from them. If some RDF data can be parsed it is added to the database.