Code Monkey home page Code Monkey logo

brewblox-service's People

Contributors

dependabot[bot] avatar elcojacobs avatar glibersat avatar steersbob avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

brewblox-service's Issues

Background task functions

Many features start long-running background tasks, and have to close them in their shutdown() function.

Centrally managing these tasks would reduce boilerplate code.

Switch to correct ARM base image

resin/raspberry-pi-python is both not supported, and intended for Raspberry Pi 1 and Zero.

Correct should be resin/raspberrypi3-python

Separate into old and refactored services

Brewpi-service should be split into separate API framework and Plugin repositories.

This is the API repository. It is responsible for:

  • Flask REST API
  • Flask plugin management
  • SSE
  • InfluxDB logging
  • Event handling

Backend code (controllerbox or legacy) will be added to a separate repository.

For now the old code will be moved to a separate directory, until it can be removed completely.

Automatic brewblox-service RPI image

Cross compiled Raspberry Pi docker images are currently supported on brewblox-devcon-spark. This functionality should also be ported to brewblox-service

Use .env files

Configuration was simplified in brewblox-devcon-spark by introducing the .env file, and moving coveragerc to tox.ini

This should be ported to the other repositories

declare used config keys in features

Service features often use values placed in app['config'] by commandline arguments.

It is not transparent which keys are used by which features. The ServiceFeature class should allow registering config keys in order to generate clear and concise error messages when config is not provided.

move brewblox_logger to service

brewblox_logger was implemented in brewblox-devcon-spark to preserve readable formatting in log messages when __name__ exceeded column width.

This is a generic feature best suited for implementation in service itself.

Standardize event handlers

Throughout the various services, there is a generic pattern of modules having setup(app) and get_<handler>(app) functions.

Individual handlers use a setup(app) to register startup an cleanup functions.

They may include other handlers by using get_handler(app) functions.

The ServiceHandler class already exists, but does not pass app, only loop.
Not all handlers use it yet either.

The pattern of using get_handler(app) functions also could use a review, as it has the potential to make the dependency tree very fragile and opaque.

Support data logging to influxDB

We are interested in the following data points:

  • Controller measurement values
  • Controller block connected/disconnected
  • UI block association with controller block added/removed
  • Controller block configuration changed
  • User added annotation to time point
  • User sends command to controller
  • Controller acknowledges command

We want to filter on the following data points / properties:

  • events
  • UI blocks
  • hardware blocks
  • annotations
  • activity members
  • process members
  • composited UI block members
  • time points

We want to simultaneously display data from (including all members):

  • activities
  • processes
  • UI blocks
  • hardware blocks

Multi-arch images

Use docker manifests to deploy multiple images for the same tag.

Both AMD and ARM pull brewblox/brewblox-service:latest, and both get the correct image.

Plugin boilerplate

Create boilerplate configuration that can be copied for any new plugin project.

Should not include production code, but management boilerplate from things like setup.py, MANIFEST.in, tox.ini etc etc.

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.