Skip to content

Start from scratch, make the following modules (data flow goes from left to right) ups, broker, ui, computattion service. Use malamute broker. This excerceis serves as a services test.

License

Notifications You must be signed in to change notification settings

eaton-bob/alice

Repository files navigation

alice

Protocol overview

DEVICES

Devices sends multipart message that MUST containt the following strings in that exact order, on "METRICS" stream with topic "<what>.<name>" :

  • name of the device

  • what is being measured

  • value

Device MUST send a message at regular intervals (at least every 10 second), otherwise it is considered exploded.

Specific protocols are detailed in RFC blocks below.

COMPUTATION

The COMPUTATION peer offers a named service to any USER peers who request it.

The protocol consists of the following messages: * GET/key - The USER peer requests a computed value for key metric * key/value - The COMPUTATION peer returns the requested computed value for metric key.

Where "key" is a unique name for DEVICES metric, "value" is a string representation of the value and "/" indicates a multipart message.

Parts

  • ups.c - Implements DEVICES protocol. Produces UPS metric data to METRICS stream.

  • tnh.c - Implements. DEVICES protocol. Produces temperature, humidity metric data to METRICS stream

  • comp.c - Implements COMPUTATION protocol.

    • Offers STATS service which computes current system status from METRICS stream.

    • Offers average service that computes total average value from METRICS stream.

  • ui.c - requests system status from STATS services

About

Start from scratch, make the following modules (data flow goes from left to right) ups, broker, ui, computattion service. Use malamute broker. This excerceis serves as a services test.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published