Saved in:
| Main Author: | |
|---|---|
| Format: | Recurso digital |
| Language: | English |
| Published: |
Zenodo
2018
|
| Subjects: | |
| Online Access: | https://doi.org/10.5281/zenodo.14732232 |
| Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
Table of Contents:
- <h1>SERENADE - SEismic Restful ENAbled DatabasE</h1> <p>SERENADE is a database of seismic events which is meant to be used through its REST interface. <em>PostGreSQL</em> is used as its internal engine and <em>Apache2</em> with the <code>mod_perl</code> module offers the access to external clients. As any REST interface each operation to the databse (read, write, delete, ecc) is performed through some HTTP method on some resources.</p> <p>It has been developed mainly to be used as the unique events source for the operations of the Osservatorio Vesuviano (INGV): each event can have one or more locations of any revision level (from automatic to "definitive" locations published in bullettins)</p> <p>The read API is nowadays consolidated and is reported here as a fast reminder (more details in the examples-0.6.1.tar.gz file), the write interface cannot considered stable and is not reported.</p> <h2>1 - Read API</h2> <p>Reads into the database are performed through the GET method of the HTTP protocol. It is mandatory to add the <code>Accept</code> HTTP header specifying the requested media type (in most cases <code>application/json</code>). More details can be found in the API files distributed in this package, here we report some simple queries (we are assuming the actual address of the serenade server as <code>serenade.access.net</code>):</p> <p>Retrieve earthquake events from Campi Flegrei with Md >= 3.0 starting from 1st january 2020:</p> <ul> <li>Resource: <code>http://serenade.access.net/events/flegrei?type=earthquake&mag=ge:3&magtype=D&date=after:2020-01-01</code></li> </ul> <p>This will return a JSON hash in the form:</p> <p><code>{ evid: { event specs }, evid: { event specs }... }</code></p> <p>Each event can be retrieved using the link that can be found in the <code>resource</code> element. It will be something as:</p> <ul> <li><code>http://serenade.access.net/event/<evid></code> (Example: <code>http://serenade.access.net/event/37980</code>)</li> </ul> <p>See the attached API files for more details.</p> <h2>2 - Write API</h2> <p>The resources/data needed to write into the database are still considered to be in progress and are not currently reported here. They will be documented once freezed in the <code>1.x.y</code> release.</p> <h2>3 - Clients</h2> <p>SERENADE is not of public direct access: there are two main official clients for it:</p> <ul> <li>WESSEL (<a href="https://doi.org/10.5281/zenodo.14727127">10.5281/zenodo.14727127</a>) which is the main portal through which the users at Osservatorio Vesuviano - INGV interacts with the database adding and editing events</li> <li>SEREWrap (<a href="https://doi.org/10.5281/zenodo.14844623">10.5281/zenodo.14844623</a>) which is the software collection which is responsible to create the public pages of the GOSSIP service (<a href="https://doi.org/10.13127/gossip">10.13127/gossip</a>) where data stored in the database can be publicly accessed from outside INGV-OV.</li> </ul> <h2>4 - Installation</h2> <p>The installation of the package requires that the user has already installed on her server the <em>Apache2</em> web server with the <code>mod_perl</code> module. and the <em>PostGreSQL</em> server. Refer to the original documentation for the installation and configuration of both servers, just remember to create an user in the <em>PostGreSQL</em> database that must be able to read and write any table.</p> <p>Once thay have been both installed, as administrator, run:</p> <p><code>$ make</code><br><code>$ make install</code></p> <p>from the top directory of the package: this will install the perl code and configuration files in the right places:</p> <ul> <li>PERL library files: <code>/opt/serenade</code></li> <li>Configuration files: <code>/etc/serenade</code></li> <li>Apache2 configuration stubs: <code>/etc/apache2/sites-available</code></li> <li>Cache directory: <code>/var/cache/serenade</code></li> <li>File storage: <code>/var/www/serenade</code></li> </ul> <h3>4.1 - Database initialisation</h3> <p>In the <code>sql</code> directory of the main package there are some pl-SQL files that are to be run through the <code>psql</code> utility in order to initialize the database. They are to be execute in the given order (<code>pass_001</code>, <code>pass_002</code>, etc.) but the <code>pass_006</code> has to be modified for your own needs before installation. This files contains the initial data that have to be inserted into the database in order to work: most of them are quite common choices but some of them may need to be adapted to your specific situation.</p>