Skip to main content

Execution engine for Aye-Aye ETL models

Project description

fossa

Execution engine for Aye-Aye ETL models

Overview

Fossa runs Aye-aye models and their subtasks across a distributed environment.

Aye-aye models can be run without Fossa (as they are just Python code) but when a model grows too big to execute on a single computer the task needs to be spread across multiple computers. A 'distributed environment' is one with multiple compute node that are networked so messages can be passed between nodes.

An instance of Fossa runs on each compute node where it facilitates the communication of messages between nodes.

A node could be a docker or full computer instance.

Getting Started

Ensure your working directory is the same directory as this README file.

Then install dependencies and run the tests-

cp local_env_example .env
pipenv shell
pipenv install --dev
python -m unittest discover tests

The .env file is used by pipenv.

For all python commands below you will need to be in this pipenv shell.

Running Fossa locally

In a distributed environment one instance of Fossa would run on each compute node. To experiment with Fossa just run one or more instances on a local computer.

Fossa runs a small web-server app which can be used to submit tasks and query the progress and status of tasks. In production, jobs are more likely to be fetched from a message queue.

Copy the example config file into your own person config; sym-link to local_config.py so the run_local_app() function in fossa.app can find it.

e.g.

cd fossa/settings
# replace xxxxx with your name or a more useful identifier for your environment
cp local_config_example.py local_config_xxxxx.py
# have a look in your config file. Is there anything you'd like to change to fit with your system?
ln -s local_config_xxxxx.py local_config.py

In the virtual env (provided by pipenv) from above and with the current working directory being the project's root directory-

python fossa/app.py

You'll now have a locally running web app. It will output IP addresses it is accepting connections from. Typically just point a browser at `http://0.0.0.0:2345/'

Posting a task

In a production environment tasks are more likely to arrive through a message queue. But it's also possible to use an HTTP POST to submit a task.

If you used the local_config_example.py file as a starting point for your local config it will have a single model already in the ACCEPTED_MODEL_CLASSES parameter. This is a tiny example ETL model.

Fossa will only run models that have been pre-defined before start-up. A simple way to supply these models is through the config file but there are other ways too.

POST to your local instance of Fossa a task specification. This example runs the complete SimpleExampleEtl model-

curl --header "Content-Type: application/json" \
     --data '{"model_class":"SimpleExampleEtl"}'  \
     --request POST http://0.0.0.0:2345/api/0.01/task

Distributed (but still local) processing

TODO

curl --header "Content-Type: application/json" \
     --data '{"model_class":"PartitionedExampleEtl"}'  \
     --request POST http://0.0.0.0:2345/api/0.01/task

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ayeaye-fossa-0.0.2.tar.gz (22.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ayeaye_fossa-0.0.2-py3-none-any.whl (28.8 kB view details)

Uploaded Python 3

File details

Details for the file ayeaye-fossa-0.0.2.tar.gz.

File metadata

  • Download URL: ayeaye-fossa-0.0.2.tar.gz
  • Upload date:
  • Size: 22.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for ayeaye-fossa-0.0.2.tar.gz
Algorithm Hash digest
SHA256 8457181fa988f151b938f69393f10d4e2217ccb5084210af8c5ac4f1e068d002
MD5 e7b117ff2ecd9fc7676e60f23eeb1ec3
BLAKE2b-256 8fc70a7bb62c38eb99c6c5b351dff7fe8398440fbce64c74d8ed3fa176a37e71

See more details on using hashes here.

File details

Details for the file ayeaye_fossa-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: ayeaye_fossa-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 28.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.11

File hashes

Hashes for ayeaye_fossa-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 2d5bb54e656a60df1aa655e4463d0480d8d5cc263879b564c61e40091ab52b5f
MD5 c5318dc0850f65347e20b6fa78567b32
BLAKE2b-256 e25cec8c14844402be2aebeb86a823bbedad2b4fa85e0cbd495505dd37487dc4

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page