This book introduces the problems facing Internet of Things developers and explores current technologies and techniques to help you manage, mine, and make sense of the data being collected through the use of the world's most popular database on the Internet - MySQL. The IoT is poised to change how we interact with and perceive the world around us, and the possibilities are nearly boundless. As more and more connected devices generate data, we will need to solve the problem of how to collect, store, and make sense of IoT data by leveraging the power of database systems. The book begins with an introduction of the MySQL database system and storage of sensor data. Detailed instructions and examples are provided to show how to add database nodes to IoT solutions including how to leverage MySQL high availability, including examples of how to protect data from node outages using advanced features of MySQL.
Bulk Sales–eBook Licensing web page at www.apress.com/bulk-sales.
art and science of database systems.
manager directing development of MySQL high availability solutions.
3D printers and printing projects.
the Arizona climate to hike, mountain bike, and motorcycle year round.
Apress for making me look so good in print. Thank you all very much!
suggestions for things to include in the book.
while I spent so much time with my laptop.
as a means to store your data.
the power and ease of installation and use of MySQL, the world’s most popular open source database.
to the Internet of Things, how data is generated and stored, and some of the available hardware for IoT.
Additional chapters present a primer on MySQL including how to install and configure database servers.
brief overview of each chapter included in this book.
examples: big data and security.
network of nodes for your IOT solution.
in the database rather than in code.
started with your own IOT data through database and code examples.
the high availability features of MySQL.
tolerance for collecting data on microcontrollers.
data collector to database fail.
reliable by leveraging high availability techniques.
get all of the data presented.
many of the examples permit you to build small examples that you can use to help learn the concepts.
can contact the author at drcharlesbell@gmail.com.
collectors, and data-hosting services or database servers, you also have to deal with an explosion of data.
difficult because the data accumulates exponentially.
devices and you’ve got the potential to generate more data than any human can manage or even decipher.
devices to exceed the human population of the planet.
look at the key challenges for developing IOT solutions focusing on the data.
or systems designed to present the data. Any or all of these may be connected to the Internet.
via either databases, data collectors or integrators, display services, and even other devices.
there is some benefit from doing so.
devices were connected to the Internet.
some other device or service. Figure 1-2 depicts this a bit more clearly than Figure 1-1.
database event (such as low quantity), while sensors in the storage units trigger others.
network for later processing. Figure 1-3 shows how this would look in a logical form.
store the data prior to either presenting it via an Internet connection or sending the data to cloud services.
range from data storage and hosting to specialized hardware.
describe those businesses that provide services for IOT solutions.
decide to buy a service concerns cost and time to market.
contracted service that permitted a product to go to market sooner than projected at a massive savings.
nearly triple and was late to market. Clearly, you must consider all factors.
mixture of both cost and time.
few years. It is likely more will be offered as IOT solutions and services mature.
reports. Example: Sparkfun’s IOT Data service (https://data.sparkfun.com/).
tools for building devices ranging from a simple component to a complete device.
When developing new solutions, it can sometimes be a case of needing money to make money.
provides a mechanism for developers to raise capital needed to take their ideas to market.
units, free upgrades to newer models, and even a stake in the profits.
know, you may find something you want to invest in.
are coming in fast and furious. I should know; I own one of the first production units!
out how some of these solutions leverage services from IOT vendors.
microprocessor and software) to detect when you drift too far toward lane or road demarcations.
each local weather station (which displays local temperature) that you can click to see more information.
stations. As you can see, you can click any of the weather stations to see more information.
you can also see the data from dozens more stations from around the area, the state, or even the country!
This is the true power of IOT materialized.
to plan more efficient routes, thereby reducing the cost of shipment.
and much more. The combination of vehicle geographic tracking and diagnostics is called telematics.
Figure 1-5 illustrates a fleet management system.
Internet, and the data becomes accessible by the business analysts.
person to another rather than having them return to the depot each time they complete a set of deliveries.
GPS tracker for pets. The technology would be the same or similar.
at home. While none of these is new, what is new is the packaging of these devices into an IOT solution.
and more that you can quickly and easily install and, with the aid of the included software, access remotely.
There is even a device that allows you to turn your kitchen faucet on and off!
can expand as your budget or needs permit. See the Iris page for more information.
details and links to the kits available.
more open or can be expanded by devices from multiple vendors.
complex solutions. The following are just a few of the growing number of DIY home automation books.
example of Eric’s article that depicts what is possible with a little imagination.
local network. While it may not be as fancy as the commercial units, you can make it do whatever you want.
one of the most critical components of an IOT solution: data.
most important artifact and indeed the lifeblood of the IOT solution.
past. Clearly, the data is important.
light the plant is receiving, this one has been simplified so you can see the data produced.
complicated, as shown in Listing 1-1.
Display the value of the soil moisture sensor and threshold status.
// to match your soil characteristics.
// is greater than upper threshold, it is wet, else all is well.
I kept this simple using the serial monitor as the output so that you can see the data generated.
form of output such as an LCD panel or web server or you would store the data in a database.
You can download the source code examples for this book from the Apress web site.
you cannot perform this analysis. Thus, saving the raw data is always a good practice.
how the sensor is wired to the Arduino.
Hint: See the web server example under the Ethernet category in the Arduino IDE.
(memory) such as XBee modules.
security of IOT data, devices, and services. I address each of these in the following sections.
addressing IOT devices: having a way to uniquely identify the device and finding or addressing the device.
Are There Enough Addresses Available?
capacity of IP addresses available. Currently, the IPv6 protocol11 allows for approximately 3.4×1038 addresses.
devices addressed does not mean they will be easily found.
How Can You Find an IOT Device?
there is no easy way to find these IOT cameras.
small grain of truth and a dollop of advice for the younger generations.
them without more knowledge of what they are, where they are, and what they do.
WunderMap works in the Weather Underground site.
a device in the kitchen.
would mean to discover that your IOT camera could be accessed by anyone anywhere with a simple hack.
you could build that plant sensor using much less hardware and therefore more cheaply.
another device (such as the Arduino, Raspberry Pi, and so on).
changed its state, and so on, permitting a much broader range of sensor behaviors that you can support.
architecture in his book Rethinking the Internet of Things (Apress, 2013).
reading from the sensor at a slower rate. It is less data but potentially more accurate.
accessed by nodes in the higher layers. Figure 1-9 shows an example of this concept.
sophistication of the devices, security practices, and programming increases from left to right in the drawing.
front-facing web server to a complete IOT solution provided by commercial IOT vendors.
Now that you understand the addressing issue with IOT devices, let’s talk for a moment about the data.
With billions of IOT devices generating data, where is it all going, and how will you access it?
located in the United States could eventually become an absurdly large number (rows, bytes, and so on).
down by state, the data could still be more than is possible to search or for that matter retrieve.
level) of leveraging distributed database and execution to process the data.
For example, it should not take 7.5 million years to get an answer of 42.
of data, aggregating the data over millions or even billions of IOT devices could generate a big data crisis.
and conservation rates. In this case, it is likely you would have to mine data from several repositories.
acquiring, aggregating, and processing data from the IOT will require specialized big data solutions.
with storing and making accessible our IOT solutions data—which is what this book is all about.
Nagode’s book, Big Data and the Internet of Things (Apress, 2015).
concern beyond how to store the data—how to protect it and the IOT solutions from exploitation.
difficult to plan and implement stringent security practices because of the multiple points of vulnerability.
and IOT devices to remote attacks against the IOT services.
for our IOT solutions. It is the philosophy of using multiple components to identify individuals.
user’s experience and making it more difficult for the user to access the system.
and without making their lives difficult.
of running Linux and therefore supporting all manner of hacking tools and utilities.
policy has gone too far.
must consider securing the rest of the nodes in the network.
a myth. It actually happened, and Jeep has issued not one but two recalls for security patches to its systems.
built in but done very well. Clearly, Jeep has some more work to do.
prevention can go a long way to safe guarding your data.
and even manipulate the camera.
Not a true fix, but it certainly lowers risk.
isn’t at home. Thus, even innocuous data can be exploited.
prepare to build in security from the ground up in our IOT solutions.
for someone to exploit IOT devices. Even IOT devices that have security built in may not be sufficient.
security is just one area where security needs to be improved.
developers need to consider when planning our IOT solutions.
exchanged. One way to combat this is to use encryption.
has been built into several forms of integrated circuits, making it possible to add it to small electronics.
post is hard to see if you don’t know it is there.
is for anyone to stumble upon, or does the company delete it after your account expires?
Thus, you should always check the privacy and data retention policies of all the services you plan to use.
and provides patches (dealer installation required) to improve security.
is more secure than allowing the IOT vendor to automatically update your system.
user accounts without passwords, or the same password for multiple accounts.
less likely they can do anything more than intercept the signal.
security from the aspect of an IOT solution.
your IOT solution starting from the lowest layer (the IOT devices) to the highest layer (IOT cloud services).
could be arranged in an IOT architecture.
I use these terms throughout the book.
to aggregate and augment the data for storage at the next layer.
as moving a sensor, operating locks, and so on.
view the data and manipulate the actionable devices.
Now let’s discuss how to secure each of these layers.