Skip to content

Latest commit

 

History

History
 
 

eratosthene-server

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

Overview

This tool is the main server instance launcher. Its role is to start an instance of an eratosthene server and service. It then opens a listening socket on which clients can connect to perform queries.

Usage

In the first place, the storage structure has to be created in order for the service to be linked to it. The storage structure is a simple directory that has to be initialized with a single text file containing two values : the spatial and temporal parameters of the desired Earth representation.

The spatial parameter gives the amount of scales considered in each temporal unit storage. The more scales are used, the more spatial resolution it allows. The following formula gives the size of the spatial equivalence classes for a given scale value s :

w = ( pi * R ) / ( 2 ^ ( s - 1 ) )

where R gives the WGS84 ellipsoid main radius, in meters. The w value gives the size at the equator of the spatial equivalence classes at the considered scale and so, the spatial resolution it allows. For example, considering 32 as the number of scales allows a spatial resolution of 9 mm in the lower scale on the entire earth surface. Of course, considering more spatial scales also increase the amount of required storage space.

The temporal parameter gives to the server instance the size of the temporal units it has to handle. This value is given in seconds and can be any non-zero positive whole number. It gives the size that is considered to segment the time dimension in temporal units in which data are collapsed. It means that any injected data that falls in the same temporal unit are treated as equivalent, from the temporal point of view, by the server.

On a UNIX-like system, you can simply initialize a storage structure for an eratosthene service in the following way :

mkdir /path/to/server-data

to create the directory and :

echo "32 86400" > /path/to/server-data/system

to create the server configuration file. This file has to be an ANSI/ASCII raw text file named system and placed in the storage structure root directory.

As the storage structure is set, the instance of an eratosthene service linked to it can be executed using the following command :

./eratosthene-server --path /path/to/server-data --port 12345

It creates an instance of an eratosthene service linked to the created storage structure and listening on TCP/IP port number 12345. At this point, clients can connect to the service to inject or query data.