Python MQTT, SQL Server and Microsoft Azure



Python MQTT, SQL Server and Microsoft Azure

Hans-Petter Halvorsen

Contents

? Introduction ? MQTT ? SQL Server ? Python and SQL Server ? Microsoft Azure ? Databases in Microsoft Azure ? Code Examples



Introduction

Hans-Petter Halvorsen

Table of Contents

Introduction

? We have N Computers/Devices that read data from different Sensors, e.g., Temperature Sensors, etc.

? The Data from all the Sensors should be stored in a Database located on the Internet/The Cloud

? Problem:

? These Computers/Devices have no access to the Database ? In order to get access to the Database, we need to open the Firewall for each of those

Computers/Devices, and that is of course not recommended due to security issues, and it can be hundreds or thousands of computers

? Solution:

? We use MQTT as the middle tier. MQTT is "Internet-friendly" because it uses standard HTTP

? The Computers/Devices send Data to a MQTT Broker

? Then a dedicated Computer (that has access to the Database) Subscribe on the Data and Forward the Data to the Database

System Overview

#1

Temperature Python

Sensor

Script

Publish Data

MQTT Broker

#2

Temperature Python

Sensor

Script

N Computers/Devices

Publish

Data Subscribe

for

Data

Python Script

Database

Internet/The Cloud

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download