How does AdaM's adaptive monitoring work?
AdaM features automated and lightweight algorithms that inexpensively and in place adapt the monitoring intensity of your IoT device.
AdaM's algorithms study and predict in real-time the evolution and variability of the metric stream!
So in simple words, as metrics are collected they are analysed and if the metric stream isn't really changing then AdaM will change the sampling rate.
This way less values are collected (so less data!) allowing your device to be in idle state more often to reduce the energy consumption (more battery life!) associated with metric collection.
Oh... AdaM also features a filtering module allowing for the metric delivery from your devices to consumed endpoints to be supressed if the metrics to be delivered, again, don't really differ from consecutive values in the metric stream.Does AdaM work?
Well, AdaM has been extensively tested with experiments on real-world data from physical servers, internet security services, wearables and intelligent transportation systems. These experiments show that our framework achieves a balance between efficiency and accuracy with AdaM capable of reducing data volume by at least 74%, energy consumption by at least 71%, while preserving a greater than 89% accuracy.
Let's see how AdaM works when fed with real data from a fitbit activity tracker while emulating it's behavior.
First, lets start by seeing if AdaM is any good in regards to accuracy:
Ok... so AdaM is accurate but is it efficient...
and what about battery life...
For more experiments on real-life testbeds have a look at our publications and presentations!
And how do I get started with AdaM?
Well, this is the easy part!
First, download AdaM for Java and add it to your projects dependencies (maven dependency coming soon...)
AdaM in streaming mode
//init AdaM
AdaM adam = new AdaM(Tmin, Tmax, e, Rmin, Rmax);
//in your thread's run() or any other method use the following...
void run() {
//feed AdaM with a newly collected sample as a timestamp and value
adam.feedSample(new Sample(timestamp, val));
//get adaptive filter range
double R = adam.getFilterRange();
//use your own filtering or take advantage of AdaM filtering
boolean filtered = adam.doFiltering(R, prev_val, cur_val)
//do some work, process and/or send value
if (!filtered)
...
}
//return to idle state using sampling period provided by AdaM
int period = adam.getSamplingPeriod();
Thread.sleep(period);
}
What are these parameters AdaM uses?
- Tmin and Tmax form the acceptable range that AdaM is allowed to use when adapting your device's sampling period. If you don't know or don't what to cap AdaM then just use two values that are the same (e.g., Tmin = 0 and Tmax = 0).
- e is the maximum acceptable error (e.g., 0.1 meaning AdaM will always provide at least 90% accurate predictions) that you are willing to tolerate. AdaM performs predictions for the metric stream evolution with the error bound selection being made available to you!
- Similarly, Rmin and Rmax form the acceptable range for adaptive filtering. If you don't want filtering enabled then just use two values that are the same (e.g. Rmin = 0 and Rmax = 0)
AdaM isn't limited to streams. Use AdaM in batch mode to reduce the size and compress your datasets to ease application processing and generation of analytics reports.
//in batch mode run AdaM as a runnable jar
java -jar AdaM <path_to_dataset> [print_to_file]
Use path_to_dataset and optional true/false print_to_file as params.
Dataset must be in .csv format with data point containing timestamp followed by value. Example and real datasets can be found at AdaM's github repo.
Publications
AdaM: an Adaptive Monitoring Framework for Sampling and Filtering on IoT Devices. Trihinas, D.; Pallis, G.; and Dikaiakos, M. D. In 2015 IEEE International Conference on Big Data (IEEE BigData 2015), October, Santa Clara, USA, 2015.