Giter Site home page Giter Site logo

charon's Introduction

Charon

CodeFactor FOSSA Status

Backend services for caching and displaying geospatial data

Getting Started

These instructions will get you a copy of the project up and running on your system. This is intended to run on an ubuntu machine but can be run anywhere you have docker installed.

Dependencies

  • make
  • unzip (to unzip terraform)
  • docker

Make is most likely already installed on your system. To install docker follow the instructions here or use the install script:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh

Deployment

There are a couple of steps to run the services.

  1. Clone the repository to your machine.

    git clone https://github.com/chronark/charon.git
    cd charon
  2. Build all necessary docker images if you don't have them alrady.

    make build
  3. Get and initialize Terraform, a infrastructure management and provisioning tool.

    make init
  4. Create a terraform plan

    make plan
  5. Apply the plan

    make apply

Visit http://localhost to see the map.

Services

Architecture

Filecache

Discovery name: charon.srv.filecache

Filecache is a basic cache that writes or reads bytes to and from the disk. The cache is mounted on the host as ./volumes/filecache and can be backed up or modified by removing or adding files on the host machine.

Gateway

The HTTP API gateway to interact with all microservices. Exposes various routes to fetch data. Listens on port 52000 Routes:

  • /geocoding/forward?query=XYZ calls the geocoding service.
  • /geocoding/reverse?lat=1.0&lon=1.0 calls the geocoding service.
  • /tile?x=0&y=0&z=0calls the tiles service.

Geocoding

Discovery name: charon.srv.geocoding.nominatim or charon.srv.geocoding.mapbox

Geocoding has two handlers: Nominatim and Mapbox They both receive a forward or reverse geocoding search and search the cache. In case of a miss they will query their respective 3rd party APIs, write to cache and return the result. The cache is mounted on the host as ./volumes/geocoding and can be backed up or modified by removing or adding files on the host machine.

Tiles

Discovery name: charon.srv.tiles.osm or charon.srv.geocoding.mapbox

Tiles has two handlers: osm and Mapbox They both receive a tile request and search the cache. In case of a miss they will query their respective 3rd party APIs, write to cache and return the result.

Built With

Development

To get up and running as fast as possible you can use Vagrant to start and provision a local ubuntu:18.04 machine

vagrant up

Charon makes use of protobuf for the internal communication. In order to compile the protobuf definition you need to install:

go get google.golang.org/grpc
go get github.com/golang/protobuf/protoc-gen-go
go get github.com/micro/protoc-gen-micro

Then run make proto to compile all protobuf definitions at once.

License

FOSSA Status

charon's People

Contributors

chronark avatar fossabot avatar renovate-bot avatar

Watchers

 avatar

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.