{"id":27253,"date":"2019-06-25T09:21:37","date_gmt":"2019-06-25T13:21:37","guid":{"rendered":"https:\/\/centricconsulting.com\/?p=27253"},"modified":"2023-08-18T13:19:07","modified_gmt":"2023-08-18T17:19:07","slug":"optimizing-iot-costs-while-using-bluebeak-beacon-technology","status":"publish","type":"post","link":"https:\/\/centricconsulting.com\/blog\/optimizing-iot-costs-while-using-bluebeak-beacon-technology\/","title":{"rendered":"Optimizing IoT Costs While Using BlueBeak Beacon Technology"},"content":{"rendered":"<h2 style=\"text-align: center;\" aria-level=\"1\">Implementing an IoT project is costly, but there are ways to save during the process. We look at cost optimization when setting up BlueBeak beacons.<\/h2>\n<hr \/>\n<p><span data-contrast=\"auto\">In the<a href=\"https:\/\/centricconsulting.com\/blog\/bluebeak-and-the-abcs-of-the-internet-of-things\/\">\u00a0<\/a><\/span><a href=\"https:\/\/centricconsulting.com\/blog\/bluebeak-and-the-abcs-of-the-internet-of-things\/\"><span data-contrast=\"auto\">previous\u00a0<\/span><span data-contrast=\"auto\">blo<\/span><span data-contrast=\"auto\">g\u00a0<\/span><\/a><span data-contrast=\"auto\">of<\/span><span data-contrast=\"auto\">\u00a0this series, we\u00a0<\/span><span data-contrast=\"auto\">examined a real-world <a href=\"https:\/\/centricconsulting.com\/blog\/aws-and-the-internet-of-things-unveiling-the-mystery\/\">Internet of Things (IoT)<\/a> project called <a href=\"https:\/\/centricconsulting.com\/digital-consulting-services\/digital-technology-services\/beacons-and-bluebeak\/\">BlueBeak<\/a><\/span><span data-contrast=\"auto\">.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">This framework leverages various cloud components to<\/span><span data-contrast=\"auto\">\u00a0deliver<\/span><span data-contrast=\"auto\">\u00a0location-<\/span><span data-contrast=\"auto\">based services<\/span><span data-contrast=\"auto\">\u00a0for several industries<\/span><span data-contrast=\"auto\">, including healthcare and retail<\/span><span data-contrast=\"auto\">.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">Recall from the previous blog that IoT<\/span><span data-contrast=\"auto\">\u00a0is all about data, specifically<\/span><span data-contrast=\"auto\">:<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<ul>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"1\" data-aria-level=\"1\"><span data-contrast=\"auto\">Captur<\/span><span data-contrast=\"auto\">ing<\/span><span data-contrast=\"auto\">\u00a0the data\u00a0<\/span><span data-contrast=\"auto\">generated by d<\/span><span data-contrast=\"auto\">evic<\/span><span data-contrast=\"auto\">es<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Mak<\/span><span data-contrast=\"auto\">ing<\/span><span data-contrast=\"auto\">\u00a0real-time decision<\/span><span data-contrast=\"auto\">s based on the data<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Stor<\/span><span data-contrast=\"auto\">ing<\/span><span data-contrast=\"auto\">\u00a0the data<\/span><span data-contrast=\"auto\">\u00a0for\u00a0<\/span><span data-contrast=\"auto\">later use<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true}\">\u00a0<\/span><\/li>\n<li data-leveltext=\"\uf0b7\" data-font=\"Symbol\" data-listid=\"1\" aria-setsize=\"-1\" data-aria-posinset=\"2\" data-aria-level=\"1\"><span data-contrast=\"auto\">Analyz<\/span><span data-contrast=\"auto\">ing<\/span><span data-contrast=\"auto\">\u00a0the data to gain operational insights<\/span><span data-ccp-props=\"{&quot;134233279&quot;:true}\">\u00a0<\/span><\/li>\n<\/ul>\n<p><span data-contrast=\"auto\">In this\u00a0<\/span><span data-contrast=\"auto\">final\u00a0<\/span><span data-contrast=\"auto\">installment of this\u00a0<\/span>IoT series<span data-contrast=\"auto\">, we\u2019ll take a look at<\/span><span data-contrast=\"auto\">\u00a0the costs that drive a typical IoT project and how to optimize those costs<\/span><span data-contrast=\"auto\">.<\/span><span data-contrast=\"auto\">\u00a0<\/span><span data-contrast=\"auto\">To get started,\u00a0<\/span><span data-contrast=\"auto\">let\u2019s take a look at the Cloud components used for\u00a0<\/span><span data-contrast=\"auto\">the original\u00a0<\/span><span data-contrast=\"auto\">BlueBeak<\/span><span data-contrast=\"auto\">\u00a0solution<\/span><span data-contrast=\"auto\">.<\/span><span data-ccp-props=\"{}\">\u00a0<\/span><\/p>\n<h2>Evaluating the Cost<\/h2>\n<p><a href=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-27277 size-large\" src=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-1024x445.png\" alt=\"BlueBeak Chart2\" width=\"800\" height=\"348\" srcset=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-1024x445.png 1024w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-300x130.png 300w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-768x334.png 768w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-600x261.png 600w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-992x431.png 992w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-1200x522.png 1200w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-850x369.png 850w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019-750x326.png 750w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart2-62019.png 2043w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>The table above reveals most of the costs in this solution come, not surprisingly, from the application, database, and website services. <strong>These cost drivers guided the process of rearchitecting the next version of BlueBeak.<\/strong> Below, we take a look at how we improved each stage of the IoT application.<\/p>\n<h2>Data Ingestion<\/h2>\n<p>Much of the cost and computational overhead in BlueBeak comes from the ingestion and processing of the incoming data. A process running on <a href=\"https:\/\/aws.amazon.com\/docker\/\" target=\"_blank\" rel=\"noopener noreferrer\">Docker<\/a> container running in <a href=\"https:\/\/aws.amazon.com\/lightsail\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Lightsail<\/a> must <strong>always <\/strong>run to handle the incoming data. However, a closer analysis of the Docker instance showed that it was mostly unused. That is, the CPU usage on the instance was low, only spiking when incoming data needed processing.<\/p>\n<p>This event-driven architecture is much better suited to a newer technology, generically called Serverless computing. With <a href=\"https:\/\/centricconsulting.com\/blog\/serverless-computing-details-and-benefits_miami-cloud\/\"><strong>Serverless<\/strong><\/a> computing, we don\u2019t require dedicated instances. Instead, an event triggers the provisioning of resources needed to perform a computational process.<\/p>\n<p>AWS calls its Serverless platform <a href=\"https:\/\/aws.amazon.com\/lambda\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Lambda<\/strong><\/a> and gives it the tagline \u201cRun code without thinking about servers. Pay only for the compute time you consume.\u201d Using a very lightweight Elastic Compute Cloud (EC2) instance + Lambda functions, we were replaced all of the Lightsail and Docker instances with small, Serverless microservices.<\/p>\n<h2>Data Decisions<\/h2>\n<p>Just like the section above, we replaced the Lightsail and Docker instances that implemented the business rules of BlueBeak with Lambda-based microservices. <strong>For example, one Lambda function determines when a beacon is in a room long enough to trigger a \u201cvisit.\u201d<\/strong> Similarly, another Lambda function determines when a beacon leaves a room. There are two key reasons for leveraging Lambda for these business rules:<\/p>\n<ol>\n<li>The code only runs when an external event triggers the business rule (i.e., the code does not require a server that is always running).<\/li>\n<li>We can implement the business rules with small, self-contained, stateless code segment: a perfect candidate for a microservice.<\/li>\n<\/ol>\n<h2>Data Storage<\/h2>\n<p>For our initial implementation of BlueBeak, we used <a href=\"https:\/\/www.couchbase.com\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Couchbase<\/strong><\/a>, an open-source, distributed NoSQL documented-oriented database. While Couchbase allows us to store data directly as JSON, there are a few downsides that come with using Couchbase:<\/p>\n<ol>\n<li>Licensing costs associated with Couchbase<\/li>\n<li>Export and Query limitations associated with Couchbase<\/li>\n<li>Additional compute needed to host Couchbase<\/li>\n<\/ol>\n<p>Without going into details on each of the above challenges, <strong>the cost of maintaining and scaling Couchbase was a major factor in migrating the Data Storage component of BlueBeak over to a different database solution.<\/strong> After considering both NoSQL and relational database solutions available on AWS, we ultimately chose <a href=\"https:\/\/aws.amazon.com\/rds\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>AWS Relational Database Service (RDS<\/strong>)<\/a>.<\/p>\n<p>More specifically, <a href=\"https:\/\/aws.amazon.com\/rds\/aurora\/\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>AWS Aurora<\/strong><\/a>, a MySQL-like, multi-region database. The Aurora database master sits in the primary AWS region with the Dashboard. <strong>An Aurora Read Replica sits in an alternate availability zone for fault tolerance.<\/strong><\/p>\n<h2>Data Display<\/h2>\n<p>We deliver the original BlueBeak Dashboard as a responsive website using Angular and NodeJS, hosted in the AWS Lightsail. Since the Dashboard requires a website at all times, we can\u2019t replace it with Serverless technology. However, AWS does offer a comparable solution for websites that do not require dynamic content generation, such as ASP.NET or Apache.<\/p>\n<p>We can store these so-called static websites in <a href=\"https:\/\/docs.aws.amazon.com\/AmazonS3\/latest\/dev\/Welcome.html\" target=\"_blank\" rel=\"noopener noreferrer\">AWS Simple Storage Service (S3)<\/a> and host these as a public or private website using AWS infrastructure. This process results in dramatic cost savings and makes the deployment of the Dashboard in BlueBeak straightforward.<\/p>\n<h2>Data Insights<\/h2>\n<p>The Machine Learning component of BlueBeak works well with <a href=\"https:\/\/aws.amazon.com\/sagemaker\/\" target=\"_blank\" rel=\"noopener noreferrer\">AWS SageMaker<\/a>. Since SageMaker is relatively new and not much of a cost driver in BlueBeak, we opted to continue using SageMaker in the optimized solution.<\/p>\n<h2>Bringing it All Together<\/h2>\n<p>We left no stone unturned in our effort to optimize the costs of our IoT implementation. <strong>Starting with data ingestion and focusing on data processing and storage, we reduced the operational costs of our IoT solution, and we improved the reliability, scalability, and performance of the solution.<\/strong> The table below shows the optimized BlueBeak platform and the associated cost savings.<\/p>\n<p><a href=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-27275 size-large\" src=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-1024x495.png\" alt=\"BlueBeak Chart1\" width=\"800\" height=\"387\" srcset=\"https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-1024x495.png 1024w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-300x145.png 300w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-768x371.png 768w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-600x290.png 600w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-992x479.png 992w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-1200x579.png 1200w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-850x410.png 850w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019-750x362.png 750w, https:\/\/centricconsulting.com\/wp-content\/uploads\/2019\/06\/BlueBeak-Chart1-62019.png 2048w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/a><\/p>\n<p>*The first 1 Million calls in Lambda fall under the AWS Free Tier. The next 1 Million calls cost $0.20.<\/p>\n<p>**Hosting a static website on S3 falls under the AWS Free Tier. If the storage of the static website exceeds the Free Tier, the typical cost for a hosting a static website on S3 will cost $1-$3 per month.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Implementing an IoT project is costly, but there are ways to save during the process. We look at cost optimization when setting up BlueBeak beacons.<\/p>\n","protected":false},"author":63,"featured_media":27254,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_oasis_is_in_workflow":0,"_oasis_original":0,"_oasis_task_priority":"","_relevanssi_hide_post":"","_relevanssi_hide_content":"","_relevanssi_pin_for_all":"","_relevanssi_pin_keywords":"","_relevanssi_unpin_keywords":"","_relevanssi_related_keywords":"","_relevanssi_related_include_ids":"","_relevanssi_related_exclude_ids":"","_relevanssi_related_no_append":"","_relevanssi_related_not_related":"","_relevanssi_related_posts":"","_relevanssi_noindex_reason":"","footnotes":""},"categories":[1],"tags":[18755,19125],"coauthors":[15012],"class_list":["post-27253","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-uncategorized","tag-innovation","tag-iot","resource-categories-blogs","orbitmedia_post_topic-innovation","orbitmedia_post_topic-technology-trends"],"acf":[],"publishpress_future_action":{"enabled":false,"date":"2025-03-27 03:02:46","action":"change-status","newStatus":"draft","terms":[],"taxonomy":"category"},"publishpress_future_workflow_manual_trigger":{"enabledWorkflows":[]},"_links":{"self":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/27253"}],"collection":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/users\/63"}],"replies":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/comments?post=27253"}],"version-history":[{"count":0,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/posts\/27253\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media\/27254"}],"wp:attachment":[{"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/media?parent=27253"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/categories?post=27253"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/tags?post=27253"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/centricconsulting.com\/wp-json\/wp\/v2\/coauthors?post=27253"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}