Code Monkey home page Code Monkey logo

riscosrv_v2's Introduction

RISCO Feature Server

RISCO feature server provides web services serving vector features on a GeoJSON-like protocol format.

It was developed in Golang using the valyala/fasthttp FastHTTP library. This library provides extremely low latency, being capable of resolving hundreds of thousands of requests per second.

This a part of RISCO Web Map solution.

It's intended to connect to a PostgreSQL / PostGIS backend. In order to be properly used by RISCO feature server, a PostGIS backend database must contain a 'risco_v2' metadata schema. Please find the empty structure for such a schema at this location.

Installation

  1. create a folder and 'cd' to it
  2. clone this repository into that folder
  3. using a terminal opened on this folder run ./build.sh (or build.bat if you are in Windows)
  4. create a subfolder called 'log'

To run it just type ...

./riscosrv_v2

... and hit <enter>

It's easy to find documentation to create a systemd service from any executable, as this example.

Important

In order to use RISCO server, DON'T FORGET to provide a valid configuration.

Use as a Window Service

It's easy to use command line utility sc.exe to create a new entry in Windows Services panel. Just follow these steps:

  1. edit the contents of file 'install_win_service.bat' according to your needs
  2. run it

When finished, there will be a new entry in Windows Services, using whatever is written in the displayname parameter in the file.

Configuration

Configuration files are JSON and are supposed to be placed in same folder as as riscosrv_v2 executable ('riscosrv_v2.exe' in Windows).

Generic config

Generic config is kept on config.json file. Some sample contents:

{
	"generic": {
		"addr_hs": ":8020",	
		"logpath": "log/log.txt",
		"shutddelay_secs": 5,
		"timedserver_mins": 20
	}
}

Parameters

  • addr_hs: listen address and TCP port (separeted by ':')
  • logpath: path of log file (example logs to 'log' folder created in previous steps)
  • shutddelay_secs: currently unused but required parameter, any numerical will do
  • timedserver_mins: currently unused but required parameter, any numerical will do

Database connection config

Currently RISCO server works only with PostgreSQL / PostGIS.

Database connection configuration is stored on a file called dbconn_config.json. Some sample contents:

{
	"user": "risco_v2",
	"password": "xxxxyyy",
	"host": "localhost",
	"port": 5432,
	"database": "mydata",
	"maxConnections": 4
}

Parameters:

  • user: database user (usually the owner of config 'risco_v2' schema)
  • password: base 64 encoded database user's password
  • host: database host address (IP or DNS name)
  • port: TCP port
  • database: database name
  • maxConnections: number of max concurrent connections

riscosrv_v2's People

Contributors

rpcavaco avatar

Watchers

 avatar

riscosrv_v2's Issues

Create binningHandler

binningHandler method to andle spatial binning requests, needs changes in Go source and in statements.yaml

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.