Giter VIP home page Giter VIP logo

wis2-gc's Introduction

flake8

wis2-gc

wis2-gc is a Reference Implementation of a WIS2 Global Cache.

Note: architecture diagrams referenced from the WIS2 Guide

WIS2 GC C4 component diagram

Workflow

  • connects to a WIS2 Global Broker, subscribed to the following:
    • `origin/a/wis2/#1
  • on all notifications:
    • download and store data to object storage
    • publish notification of cached object

Installation

Requirements

Dependencies

Dependencies are listed in requirements.txt. Dependencies are automatically installed during pywis-pubsub installation.

Installing wis2-gc

# setup virtualenv
python3 -m venv --system-site-packages wis2-gc
cd wis2-gc
source bin/activate

# clone codebase and install
git clone https://github.com/wmo-im/wis2-gc.git
cd wis2-gc
pip3 install .

Running

# setup environment and configuration
cp wis2-gc.env local.env
vim local.env # update accordingly

source local.env

# setup pywis-pubsub - sync WIS2 notification schema
pywis-pubsub schema sync

# setup backend
wis2-gc setup

# teardown backend
wis2-gc teardown

# connect to Global Broker
# notifications will automatically trigger wis2-gc to cache data
# and send a notification to the local broker
pywis-pubsub subscribe --config pywis-pubsub.yml --download

# cleanup data older than n days (default is 2)
wis2-gc clean --days 3

Docker

Instructions to run wis2-gc via Docker can be found the docker directory.

Development

Running Tests

# install dev requirements
pip3 install -r requirements-dev.txt

# run tests like this:
python3 tests/run_tests.py

# or this:
python3 setup.py test

Code Conventions

Bugs and Issues

All bugs, enhancements and issues are managed on GitHub.

Contact

wis2-gc's People

Contributors

tomkralidis avatar

Watchers

 avatar  avatar  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.