Giter VIP home page Giter VIP logo

hzdhackathon's Introduction

hzdhackathon

Zentralkomponente

Die Zentralkomponente sammelt und kumuliert Daten von beliebig vielen Sensoren. Hierzu steht folgende REST API zur Verfügung:

http Methode url body response Zweck
GET http://192.168.20.1:9200/hackrest/ping - text.plain teste Verfügbarkeit
POST http://192.168.20.1:9200/hackrest/bild {"id":"bildname","dauer": 25 } (wobei id (string) die ID des Sensor-Raspis ist und dauer (int) die Betrachtungsdauer in Sekunden) text.plain (aktueller Preis) sende Daten an die Zentralkomponente
GET http://192.168.20.1:9200/hackrest/report - text.html (Preisliste aller Bilder als html) frage alle Preise ab
GET http://192.168.20.1:9200/hackrest/report/rembrand - text.plain (aktueller Preis des Bildes mit der id "rembrand" frage einen einzelnen Bildpreis ab

Die Zentralkomponente registriert die sendenden Raspis automatisch beim ersten Empfang eines POST- Requests

Start der Anwendung als Service

SSH-Verbindung aufbauen:

ssh [email protected]

(Passwort ist raspberry)

root werden: sudo su

Kommando:

service hackathon start

Mittels

tail -f /home/pi/microservices/hackathon/log/zentralkomponente.log

kann man die Logausgaben mitlaufen lassen.

Stop der Anwendung

als root Kommando

service hackathon stop

Konfiguration

Die Konfiguration erfolgt in der Datei /home/pi/microservices/hackathon/hackathon.yml.

Neben den anderen Einstellungen, die nicht geändert werden dürfen gibt es 2 fachliche Konfigurationsparameter für die Schnittstelle: (bitte nur den Wert ändern, auf keinen Fall den Namen!)

Parametername Datentyp Bedeutung default
centProSekunde Ganzzahl Anzahl ct, um die sich der Preis eines Bildes je Sekunde Betrachtungsdauer erhöht 5
anfangspreisEuro Ganzzahl Startpreis in Euro 100

Zum Ändern der Prameter muss der service gestopt und nach dem Ändern neu gestartet werden. Da Daten nicht persistiert werden, gehen sie dabei verloren.

hzdhackathon's People

Contributors

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