Skip to content

Latest commit

 

History

History
34 lines (23 loc) · 2.92 KB

database-backends.md

File metadata and controls

34 lines (23 loc) · 2.92 KB

OSHDB Database Backends

There OSHDB currently implements two different database backends. One is executing queries locally on a single machine and expects the OSHDB data to be stored in any JDBC compatible database, for example in a H2 database which can be used with the OSHDB data extracts available from downloads.ohsome.org. The second database backend executes OSHDB queries on a distributed cluster environment running the Apache Ignite big data platform.

Database backends can implement different algorithms that control how a query is actually executed and can be optimized for different scenarios. These are explained below.

OSHDBJdbc / OSHDBH2

The ODHSBJDBC backend is often used in the OSHDBH2 variant, which expects data to be stored in a single H2 database file. A few example OSHDB extracts in the H2 format are available as download from downloads.ohsome.org.

Alternatively, the OSHDB data can also be stored in any JDBC compatible database (e.g. a PostgreSQL database). The OSHDB data is however always processed and analyzed locally on the machine from which the OSHDB query is started. It is therefore advisable to keep the OSHDB data as local as possible in order to minimize network traffic when using the OSHDBJdbc backend.

OSHDBIgnite

The OSHDBIgnite backend executes computations on a distributed cluster of computers running the Apache Ignite big data platform. Each of the computers of the cluster only holds a subset of the global OSHDB data set and can therefore execute its part of an OSHDB query more quickly than a single computer having to process the whole data set.

There are currently three different compute modes available in the OSHDBIgnite backend:

  • LOCAL_PEEK - (default) is optimized for small to mid scale queries.
  • SCAN_QUERY - works better for large scale (e.g. global) analysis queries.
  • AFFINITY_CALL - is generally slower than the other two compute modes, but supports streaming of results.

In order to use the OSHDB Ignite backend, it is necessary to add the maven module oshdb-api-ignite to your project's maven dependencies:

<dependency>
  <groupId>org.heigit.ohsome</groupId>
  <artifactId>oshdb-api-ignite</artifactId>
  <version>1.2.2</version>
</dependency>