{"id":10700,"date":"2016-11-30T12:11:11","date_gmt":"2016-11-30T17:11:11","guid":{"rendered":"http:\/\/www.iri.com\/blog\/?p=10700"},"modified":"2021-02-16T12:59:36","modified_gmt":"2021-02-16T17:59:36","slug":"iri-iot-edge-aggregation","status":"publish","type":"post","link":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/","title":{"rendered":"IoT &#038; IRI &#8211; Aggregation on the Edge"},"content":{"rendered":"<p><span style=\"font-weight: 400;\">As a follow-on to my <\/span><a href=\"http:\/\/www.iri.com\/blog\/business-intelligence\/an-introduction-to-iot-mqtt\/\"><span style=\"font-weight: 400;\">introduction to IoT and MQTT<\/span><\/a><span style=\"font-weight: 400;\">, this article describes how device data collected from standard climate sensors and sent through an MQTT (Message Queuing Telemetry Transport) server can be rapidly and inexpensively pre-aggregated by a single <\/span><a href=\"http:\/\/www.iri.com\/products\/cosort\/sortcl\"><span style=\"font-weight: 400;\">SortCL<\/span><\/a><span style=\"font-weight: 400;\"> program (in <\/span><a href=\"http:\/\/www.iri.com\/products\/cosort\"><span style=\"font-weight: 400;\">IRI CoSort<\/span><\/a><span style=\"font-weight: 400;\">) on a tiny edge device or gateway.<\/span><\/p>\n<p>The resulting data (and metadata) can also feed a low-cost, high-performance hub &#8212; or enterprise IoT platform &#8212; where the larger <a href=\"http:\/\/www.iri.com\/products\/voracity\">IRI Voracity<\/a> data management environment can affect more data integration, analytics, and alerts.<\/p>\n<h3><b>Advantages of IoT Computing on the Edge<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">As IoT devices become more prevalent, focus has shifted to the benefits of gathering and examining data while it is being generated, as close to the original source as possible. This relatively new concept is called edge analytics, which\u00a0<\/span><a href=\"http:\/\/searchbusinessanalytics.techtarget.com\/definition\/edge-analytics\"><span style=\"font-weight: 400;\">WhatIs.com<\/span><\/a><span style=\"font-weight: 400;\"> defines as &#8220;an approach to data collection and analysis in which an automated analytical computation is performed on data at a sensor, network switch or other device instead of waiting for the data to be sent back to a centralized data store.&#8221;<\/span><\/p>\n<p><span style=\"font-weight: 400;\">The main advantage of edge aggregation and\/or analytics is that it decreases latency in the decision-making process. Instead of using more traditional methods on previously stored data, many enterprises learned that it can be faster, easier, and more practical to process and analyze data closer to its source. These same shops discovered this just as they realized that much of their growing data volumes did not have the relevance or utility they once thought, especially the data coming from IoT devices. \u00a0In fact, some of it is not worth storing at all:<\/span><\/p>\n<p style=\"padding-left: 60px;\"><i><span style=\"font-weight: 400;\">&#8220;A lot of the data that comes from IoT may not necessarily be data that we need to keep at an atomic level. I think we&#8217;re all enjoying the ability to keep more data, analyze more data, and get richer and deeper insights from all of these vast volumes of information. That said, just because you can, doesn&#8217;t mean you should.&#8221; \u00a0&#8211; Shawn Rogers, Quest Software<\/span><\/i><\/p>\n<p><span style=\"font-weight: 400;\">Holding onto all that data can also be costly, and involve complexity and <a href=\"http:\/\/www.iri.com\/blog\/data-protection\/the-formidable-but-imperative-task-of-iot-security\/\">security issues<\/a>. Dealing with it on the edge precludes those issues and enables faster response times and easier places to decide what, if any, data is worth keeping. And, analytics that occurs on the edge can be performed in real-time, and thus be more useful. Finally, it can allow for more dexterity, scalability, and choices for distributing the data to various platforms, like Hadoop.<\/span><\/p>\n<h3><b>Our First Forays<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Starting at the bottom of this diagram and working up, you can see the components involved in my job, and their interaction with each other:<\/span><\/p>\n<p><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10701\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\" alt=\"POC Components\" width=\"600\" height=\"634\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png 768w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components-284x300.png 284w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p>As you review these steps, consider how they could\u00a0work in (or be modified to suit) your\u00a0environment:<\/p>\n<ol>\n<li style=\"margin-bottom: 15px;\"><span style=\"font-weight: 400;\">A python script on a\u00a0<\/span><a href=\"https:\/\/www.raspberrypi.org\/products\/raspberry-pi-3-model-b\/\"><span style=\"font-weight: 400;\">Raspberry Pi 3<\/span><\/a><span style=\"font-weight: 400;\"> Model B edge device tries to <\/span><b>read sensor data<\/b><span style=\"font-weight: 400;\"> every 5 seconds. <\/span><span style=\"font-weight: 400;\">The Raspberry Pi is a single board computer running Raspbian GNU Linux 8, attached to an <\/span><a href=\"https:\/\/www.amazon.com\/Adafruit-HTU21D-F-Temperature-Humidity-Breakout\/dp\/B00OKJFLWO\"><span style=\"font-weight: 400;\">HTU21DF<\/span><\/a><span style=\"font-weight: 400;\"> temperature and humidity sensor.<\/span><span id='easy-footnote-1-10700' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#easy-footnote-bottom-1-10700' title='Our Raspberry Pi device is connected to an HTU21DF sensor, which uses the I2C communication protocol. I2C allows multiple \u2018slave\u2019 chips to access a \u2018master\u2019 chip. It is good for short distance communications with a single device and requires two signal wires to exchange information. In our environment, this edge node is:&lt;br \/&gt;\n\u2022 piot.iri.com &amp;#8211; Raspberry Pi 3 Model B &amp;#8211; Raspbian GNU\/Linux 8 (Jessie)'><sup>1<\/sup><\/a><\/span><\/li>\n<li style=\"margin-bottom: 15px;\"><span style=\"font-weight: 400;\">If the data is read successfully, it is <b>published <\/b>to an <a href=\"http:\/\/mqtt.org\/\">MQTT<\/a> broker, along with the timestamp of the sample, on a separate Linux system. We used the Eclipse \u201c<a href=\"http:\/\/projects.eclipse.org\/projects\/technology.mosquitto\">Mosquitto<\/a>\u201d implementation of MQTT.<\/span><span id='easy-footnote-2-10700' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#easy-footnote-bottom-2-10700' title='Eclipse Mosquitto\u2122 is an open source message broker that implements the MQTT protocol. MQTT provides a lightweight method of brokering messages using a publish\/subscribe model. In our environment, the MQTT broker runs on:&lt;br \/&gt;\n\u2022 mangled.iri.com &amp;#8211; Ubuntu 15.04 x86-64'><sup>2<\/sup><\/a><\/span><\/li>\n<li style=\"margin-bottom: 15px;\"><span style=\"font-weight: 400;\">Another python script running on the collection system <\/span><b>subscribes <\/b><span style=\"font-weight: 400;\">to the same topic from the MQTT broker.\u00a0<\/span><\/li>\n<li style=\"margin-bottom: 15px;\"><span style=\"font-weight: 400;\">Each time that the second script reads a message from the broker, it <\/span><b>writes it to a file<\/b><span style=\"font-weight: 400;\"> that corresponds to the hourly period in which it was collected.<\/span><span id='easy-footnote-3-10700' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#easy-footnote-bottom-3-10700' title=' That simple Python script reads from the queue, and outputs the message content to a text file with sequential rows (event records). This script uses on_message() callback functionality to write the messages into a new file each hour based on the timestamp column. Theoretically, barring any sensor breakdowns, a reading occurs every five seconds, for a total of 720 event entries in each file. The Python script will call a pre-configured CoSort SortCL program to process (aggregate the data in) all the files back to any specified start date. That data quickly adds up, which is why the power of SortCL matters, and why pre-aggregation on the edge is an important efficiency step for downstream enterprise IoT analytics in the hub.'><sup>3<\/sup><\/a><\/span><\/li>\n<li style=\"margin-bottom: 15px;\"><span style=\"font-weight: 400;\">When a message is received, which has a new hourly period in the timestamp, that second Python script also fires off a CoSort <\/span><a href=\"http:\/\/www.iri.com\/products\/cosort\/sortcl\"><span style=\"font-weight: 400;\">SortCL<\/span><\/a><span style=\"font-weight: 400;\"> program that <\/span><a href=\"http:\/\/www.iri.com\/solutions\/data-transformation\/aggregate\"><b>aggregates<\/b><\/a><span style=\"font-weight: 400;\"> all the data in the file for the previous hour. Each file may contain up to 720 samples if there were no errors reading the sensor. This is aggregation <\/span><b>on the edge<\/b><span style=\"font-weight: 400;\">, but SortCL can also do <\/span><a href=\"https:\/\/infocus.emc.com\/william_schmarzo\/internet-of-things-analytics-edge\/\"><span style=\"font-weight: 400;\">analytics<\/span><\/a><span style=\"font-weight: 400;\"> as it reports (<\/span><a href=\"http:\/\/www.iri.com\/solutions\/business-intelligence\/embedded-bi\/overview\"><span style=\"font-weight: 400;\">embedded BI<\/span><\/a><span style=\"font-weight: 400;\">), feed data directly into <a href=\"https:\/\/www.iri.com\/solutions\/business-intelligence\/bi-tool-acceleration\/birt\">BIRT<\/a> or <a href=\"http:\/\/www.iri.com\/blog\/data-transformation2\/iri-voracity-add-on-for-splunk\/\">Splunk<\/a>, and\/or <\/span><a href=\"http:\/\/www.iri.com\/solutions\/business-intelligence\/bi-tool-acceleration\"><span style=\"font-weight: 400;\">prepare data<\/span><\/a><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"><span style=\"font-weight: 400;\"> for another analyzer\u00a0like <a href=\"http:\/\/www.iri.com\/solutions\/business-intelligence\/bi-tool-acceleration\/r\">R<\/a> or visualizer like\u00a0<a href=\"http:\/\/www.iri.com\/solutions\/business-intelligence\/bi-tool-acceleration\/tableau\">Tableau<\/a>.<\/span><br \/>\n<\/span><\/span><\/span><\/p>\n<p style=\"padding-left: 60px;\"><i><span style=\"font-weight: 400;\"><em>Note &#8230; the Python scripts and intermediate files described in steps 3-5 above have recently been obsoleted by the CoSort v10 engine in <a href=\"http:\/\/www.iri.com\/products\/voracity\">IRI Voracity<\/a> wherein streaming IoT data over MQTT feeds in real-time to SortCL processes; see the demo video below.<\/em><\/span><\/i><\/p>\n<\/li>\n<li style=\"margin-bottom: 15px;\">The SortCL program sends the minimum, average, and maximum temperature and humidity values, along with the hourly period and the total number of samples, to a MySQL database table via ODBC.<span id='easy-footnote-4-10700' class='easy-footnote-margin-adjust'><\/span><span class='easy-footnote'><a href='https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#easy-footnote-bottom-4-10700' title='The MySQL table structure, along with the Python and SortCL scripts, are in &lt;a href=&quot;https:\/\/github.com\/TeamIRI\/IoT&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot;&gt;GitHub&lt;\/a&gt;.'><sup>4<\/sup><\/a><\/span> Note that a future version of SortCL will process MQTT streams directly, which will preclude the need for the second Python script in steps 4-6 altogether.<\/li>\n<li style=\"margin-bottom: 15px;\">Generating reports, charts, alerts, <i><span style=\"font-weight: 400;\">and <\/span><\/i><span style=\"font-weight: 400;\">further analysis of the SQL (or any form of streaming or persistent data) <\/span><i><span style=\"font-weight: 400;\">can also<\/span><\/i><span style=\"font-weight: 400;\"> be performed on any downstream server running the IRI Workbench <\/span><a href=\"http:\/\/www.iri.com\/products\/workbench\/voracity-gui\"><span style=\"font-weight: 400;\">GUI for Voracity<\/span><\/a><span style=\"font-weight: 400;\">, built on Eclipse. Voracity uses CoSort or Hadoop engines for SortCL jobs in (scheduled or ad hoc) ETL workflows, making it both an enterprise data management platform and <\/span><b>IoT hub<\/b><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ol>\n<p style=\"text-align: center;\"><span style=\"font-weight: 400;\"><i><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/2-Collected-Aggregate-Data.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10704\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/2-Collected-Aggregate-Data.jpg\" alt=\"Collected Aggregate Data\" width=\"600\" height=\"312\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/2-Collected-Aggregate-Data.jpg 942w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/2-Collected-Aggregate-Data-300x156.jpg 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/2-Collected-Aggregate-Data-768x399.jpg 768w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/i><\/span><\/p>\n<p style=\"text-align: center;\"><span style=\"font-weight: 400;\"><i>C<\/i><i>ollected aggregate data in MySQ<\/i>L<\/span><\/p>\n<h3><b>IRI\u2019s Advantages on the Edge<\/b><span style=\"font-weight: 400;\"><br \/>\n<\/span><\/h3>\n<ul>\n<li style=\"margin-bottom: 15px; font-weight: 400;\"><span style=\"font-weight: 400;\">Lightweight CoSort SortCL applications can run wherever Linux CoSort can be licensed, from a Raspberry Pi device, to a gateway server to which multiple devices are connected. <\/span><span style=\"font-weight: 400;\">Its small command-line execution footprint means the program loads and runs quickly on the edge.<\/span><\/li>\n<li style=\"margin-bottom: 15px; font-weight: 400;\"><span style=\"font-weight: 400;\">The same SortCL script(s) can process small or large batches, or streaming data, so no design changes are needed when the processing requirement does.<\/span><\/li>\n<li style=\"margin-bottom: 15px; font-weight: 400;\"><span style=\"font-weight: 400;\">Since we are reading data from sensors, at some point in time, there might be a breakdown or communication fault at the edge. By quickly counting and aggregating the data collected in any given hour, we can spot missing entries and, nevertheless, maintain accurate summary information on any data that was registered.<\/span><\/li>\n<li style=\"margin-bottom: 15px; font-weight: 400;\"><span style=\"font-weight: 400;\">SortCL programs can filter, transform, reformat, mask data at the field level (to protect PII), generate reports, and create multiple file and table targets, <em>all in the same job script and I\/O pass<\/em>. This means applications using different repositories and formats can use the same data without it needing to regenerate or synchronize it separately.<\/span><\/li>\n<li style=\"margin-bottom: 15px; font-weight: 400;\"><span style=\"font-weight: 400;\">Solutions are easier to configure and modify in SortCL than in a Python or 3GL program because SortCL uses simple <\/span><a href=\"http:\/\/www.iri.com\/produts\/cosort\/sortcl-metadata\"><span style=\"font-weight: 400;\">4GL<\/span><\/a><span style=\"font-weight: 400;\">. You can tweak its self-documenting parameters in text scripts, or use IRI Workbench graphical <\/span><a href=\"http:\/\/www.iri.com\/products\/workbench\/design-run-jobs\"><span style=\"font-weight: 400;\">dialogs or diagrams<\/span><\/a><span style=\"font-weight: 400;\"> supporting its syntax.\u00a0<\/span><span style=\"font-weight: 400;\">The same data and SortCL metadata can be used in Voracity, so you do mashups and analytics on larger data sets in the hub\/platform layer (see below). In a Voracity hub, those same job scripts can <\/span><a href=\"http:\/\/www.iri.com\/solutions\/big-data\/hadoop-optional\"><span style=\"font-weight: 400;\">also run in Hadoop<\/span><\/a><span style=\"font-weight: 400;\">.<\/span><\/li>\n<\/ul>\n<h3><b>Then in the Hub &#8230;<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">The <\/span><a href=\"http:\/\/www.iri.com\/products\/workbench\"><span style=\"font-weight: 400;\">IRI Workbench GUI<\/span><\/a><span style=\"font-weight: 400;\"> for CoSort (or Voracity), built on Eclipse, can run on any Windows box. Just set up your connection to the data stores and job scripts, wherever they happen to be. Use it to design and run the jobs, and to analyze and take action on the data being collected and aggregated.<br \/>\n<\/span>\u00a0<a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10708\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench.png\" alt=\"IRI Workbench\" width=\"600\" height=\"324\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench.png 1110w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench-300x162.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench-768x415.png 768w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/3-IRI-Workbench-1024x553.png 1024w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">This screenshot of the IRI Workbench shows the input files, the data stored in one of them, the color-coded SortCL aggregation script (and its GUI-connected job outline), the MySQL database connection with details about the target table (lower left). The bottom console window shows the summary output of the job script. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">IRI has also directly <\/span><a href=\"http:\/\/www.iri.com\/solutions\/business-intelligence\/bi-tool-acceleration\/birt\"><span style=\"font-weight: 400;\">integrated<\/span><\/a><span style=\"font-weight: 400;\"> SortCL data preparation with BIRT in Eclipse to produce visual analytics<\/span><span style=\"font-weight: 400;\"> like this:<\/span><\/p>\n<p><a href=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-10709\" src=\"http:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics.png\" alt=\"Descriptive Analytics\" width=\"600\" height=\"413\" srcset=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics.png 1114w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics-300x207.png 300w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics-768x529.png 768w, https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/4-Descriptive-Analytics-1024x705.png 1024w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400;\">This sort of descriptive analytics can also be <\/span><a href=\"http:\/\/www.iri.com\/blog\/business-intelligence\/linear-regression-a-predictive-tool-in-iri-voracity\/\"><span style=\"font-weight: 400;\">predictive<\/span><\/a><span style=\"font-weight: 400;\">. <\/span><\/p>\n<p>Watch how IRI Voracity can aggregate IoT data on the edge in this presentation:<\/p>\n<p style=\"text-align: center;\"><iframe loading=\"lazy\" width=\"533\" height=\"300\" src=\"https:\/\/www.youtube.com\/embed\/Z9DPP4bQUjc?feature=oembed\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<p><span style=\"font-weight: 400;\">For more information, please contact <\/span><a href=\"mailto:voracity@iri.com\"><span style=\"font-weight: 400;\">voracity@iri.com<\/span><\/a><span style=\"font-weight: 400;\">.<br \/>\n<\/span><\/p>\n<hr \/>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As a follow-on to my introduction to IoT and MQTT, this article describes how device data collected from standard climate sensors and sent through an MQTT (Message Queuing Telemetry Transport) server can be rapidly and inexpensively pre-aggregated by a single SortCL program (in IRI CoSort) on a tiny edge device or gateway. The resulting data<\/p>\n<div><a class=\"btn-filled btn\" href=\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\" title=\"IoT &#038; IRI &#8211; Aggregation on the Edge\">Read More<\/a><\/div>\n","protected":false},"author":105,"featured_media":10701,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"footnotes":""},"categories":[108,32,34,91,1030],"tags":[52,1202,1201,1206,1205,1211,1167,1079,1193,1276,1194,1203,1212,1207,1274,1275],"class_list":["post-10700","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-big-data-2","category-business-intelligence","category-business","category-iri-workbench","category-vlog","tag-business-intelligence-2","tag-collected","tag-device-data","tag-edge-analytics","tag-edge-device","tag-github","tag-internet-of-things","tag-iot","tag-message-queuing-telemetry-transport","tag-mosquitto","tag-mqtt","tag-pre-aggregated","tag-predictive-analysis","tag-python-script","tag-raspberry-pi","tag-raspbian"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v23.4 (Yoast SEO v23.4) - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>IoT &amp; IRI - Aggregation on the Edge - IRI<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"IoT &amp; IRI - Aggregation on the Edge\" \/>\n<meta property=\"og:description\" content=\"As a follow-on to my introduction to IoT and MQTT, this article describes how device data collected from standard climate sensors and sent through an MQTT (Message Queuing Telemetry Transport) server can be rapidly and inexpensively pre-aggregated by a single SortCL program (in IRI CoSort) on a tiny edge device or gateway. The resulting dataRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\" \/>\n<meta property=\"og:site_name\" content=\"IRI\" \/>\n<meta property=\"article:published_time\" content=\"2016-11-30T17:11:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-02-16T17:59:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\" \/>\n\t<meta property=\"og:image:width\" content=\"768\" \/>\n\t<meta property=\"og:image:height\" content=\"811\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Abhishek Deshpande\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Abhishek Deshpande\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\"},\"author\":{\"name\":\"Abhishek Deshpande\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/fe35ad3b489313d114c75a356b246b42\"},\"headline\":\"IoT &#038; IRI &#8211; Aggregation on the Edge\",\"datePublished\":\"2016-11-30T17:11:11+00:00\",\"dateModified\":\"2021-02-16T17:59:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\"},\"wordCount\":1528,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\",\"keywords\":[\"business intelligence\",\"collected\",\"device data\",\"Edge Analytics\",\"edge device\",\"GitHub\",\"Internet of Things\",\"IoT\",\"Message Queuing Telemetry Transport\",\"Mosquitto\",\"MQTT\",\"pre-aggregated\",\"predictive analysis\",\"python script\",\"Raspberry Pi\",\"Raspbian\"],\"articleSection\":[\"Big Data\",\"Business Intelligence (BI&#041;\",\"IRI Business\",\"IRI Workbench\",\"VLOG\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\",\"url\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\",\"name\":\"IoT & IRI - Aggregation on the Edge - IRI\",\"isPartOf\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\",\"datePublished\":\"2016-11-30T17:11:11+00:00\",\"dateModified\":\"2021-02-16T17:59:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png\",\"width\":768,\"height\":811,\"caption\":\"POC Components\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.iri.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"IoT &#038; IRI &#8211; Aggregation on the Edge\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.iri.com\/blog\/#website\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"name\":\"IRI\",\"description\":\"Total Data Management Blog\",\"publisher\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.iri.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.iri.com\/blog\/#organization\",\"name\":\"IRI\",\"url\":\"https:\/\/www.iri.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"contentUrl\":\"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png\",\"width\":750,\"height\":206,\"caption\":\"IRI\"},\"image\":{\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/fe35ad3b489313d114c75a356b246b42\",\"name\":\"Abhishek Deshpande\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/d8dc1ee6bd54de28646f1217b17a738d?s=96&d=blank&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/d8dc1ee6bd54de28646f1217b17a738d?s=96&d=blank&r=g\",\"caption\":\"Abhishek Deshpande\"},\"url\":\"https:\/\/www.iri.com\/blog\/author\/abhishekdeshpande\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"IoT & IRI - Aggregation on the Edge - IRI","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/","og_locale":"en_US","og_type":"article","og_title":"IoT & IRI - Aggregation on the Edge","og_description":"As a follow-on to my introduction to IoT and MQTT, this article describes how device data collected from standard climate sensors and sent through an MQTT (Message Queuing Telemetry Transport) server can be rapidly and inexpensively pre-aggregated by a single SortCL program (in IRI CoSort) on a tiny edge device or gateway. The resulting dataRead More","og_url":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/","og_site_name":"IRI","article_published_time":"2016-11-30T17:11:11+00:00","article_modified_time":"2021-02-16T17:59:36+00:00","og_image":[{"width":768,"height":811,"url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","type":"image\/png"}],"author":"Abhishek Deshpande","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Abhishek Deshpande","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#article","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/"},"author":{"name":"Abhishek Deshpande","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/fe35ad3b489313d114c75a356b246b42"},"headline":"IoT &#038; IRI &#8211; Aggregation on the Edge","datePublished":"2016-11-30T17:11:11+00:00","dateModified":"2021-02-16T17:59:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/"},"wordCount":1528,"commentCount":0,"publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","keywords":["business intelligence","collected","device data","Edge Analytics","edge device","GitHub","Internet of Things","IoT","Message Queuing Telemetry Transport","Mosquitto","MQTT","pre-aggregated","predictive analysis","python script","Raspberry Pi","Raspbian"],"articleSection":["Big Data","Business Intelligence (BI&#041;","IRI Business","IRI Workbench","VLOG"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/","url":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/","name":"IoT & IRI - Aggregation on the Edge - IRI","isPartOf":{"@id":"https:\/\/www.iri.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage"},"image":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage"},"thumbnailUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","datePublished":"2016-11-30T17:11:11+00:00","dateModified":"2021-02-16T17:59:36+00:00","breadcrumb":{"@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#primaryimage","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","width":768,"height":811,"caption":"POC Components"},{"@type":"BreadcrumbList","@id":"https:\/\/www.iri.com\/blog\/business-intelligence\/iri-iot-edge-aggregation\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.iri.com\/blog\/"},{"@type":"ListItem","position":2,"name":"IoT &#038; IRI &#8211; Aggregation on the Edge"}]},{"@type":"WebSite","@id":"https:\/\/www.iri.com\/blog\/#website","url":"https:\/\/www.iri.com\/blog\/","name":"IRI","description":"Total Data Management Blog","publisher":{"@id":"https:\/\/www.iri.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.iri.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.iri.com\/blog\/#organization","name":"IRI","url":"https:\/\/www.iri.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","contentUrl":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2019\/02\/iri-logo-total-data-management-small-1.png","width":750,"height":206,"caption":"IRI"},"image":{"@id":"https:\/\/www.iri.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/fe35ad3b489313d114c75a356b246b42","name":"Abhishek Deshpande","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.iri.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/d8dc1ee6bd54de28646f1217b17a738d?s=96&d=blank&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/d8dc1ee6bd54de28646f1217b17a738d?s=96&d=blank&r=g","caption":"Abhishek Deshpande"},"url":"https:\/\/www.iri.com\/blog\/author\/abhishekdeshpande\/"}]}},"jetpack_featured_media_url":"https:\/\/www.iri.com\/blog\/wp-content\/uploads\/2016\/11\/1-POC-Components.png","_links":{"self":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/10700"}],"collection":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/users\/105"}],"replies":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/comments?post=10700"}],"version-history":[{"count":51,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/10700\/revisions"}],"predecessor-version":[{"id":14349,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/posts\/10700\/revisions\/14349"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media\/10701"}],"wp:attachment":[{"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/media?parent=10700"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/categories?post=10700"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.iri.com\/blog\/wp-json\/wp\/v2\/tags?post=10700"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}