Streaming IoT Analytics

Run Quarks on Edge devices like Raspeberry Pi and send back the relevant signals to MQTT platform

Ref: https://edgent.apache.org/docs/edgent-getting-started

import java.util.concurrent.TimeUnit;

import org.apache.edgent.providers.direct.DirectProvider;
import org.apache.edgent.topology.TStream;
import org.apache.edgent.topology.Topology;

public class TempSensorApplication {
    public static void main(String[] args) throws Exception {
        TempSensor sensor = new TempSensor();
        DirectProvider dp = new DirectProvider();
        Topology topology = dp.newTopology();
        TStream<Double> tempReadings = topology.poll(sensor, 1, TimeUnit.MILLISECONDS);
        TStream<Double> filteredReadings = tempReadings.filter(reading -> reading < 50 || reading > 80);

        filteredReadings.print();
        dp.submit(topology);
    }
}

Why Edge Analytics so crucial ?

Excepts from ~ https://www.rtinsights.com/why-edge-computing-is-here-to-stay-five-use-cases/

— IoT sensor data monitoring and analysis
— Retail Customer behavior analysis
— Mobile data thinning
— Compliance analysis at financial branch locations
— Remote monitoring and analysis for oil and gas operations

more details:

https://edgent.apache.org/docs/home
https://www.rtinsights.com/iot-architectures-for-edge-analytics/
https://edgent.apache.org/docs/edgent-getting-started#what-is-apache-edgent

 

Advertisements