Build cloud-integration functionality into your GDA using your GDA's MQTT client to connect to a variety of MQTT-enabled cloud services that provide IoT capabilities. Build the additional functionality needed to enable end-to-end communications between your CDA, GDA, and the cloud.
Activities
This is the module where it all comes together: Learn how to use MQTT to connect your GDA to a variety of cloud services, including Ubidots and AWS.
You'll add functionality to your data management layer within your GDA specifically to pass messages from Edge Tier to the cloud, and process information from the cloud back to your Edge Tier applications (GDA and CDA).
In this module, the sky's the limit. Literally.
Lab Module 11
Lab Module 11 - Cloud Integration is focused on configuring your cloud service functionality and updating the GDA to support integration with the cloud service provider's MQTT service.
Step 1: Read the Lab Module Summary and follow the Configuration steps
PIOT-GDA-11-001: Update MqttClientConnector to support the use of custom configuration sections, protected calls to publish / subscribe / unsubscribe, and the IConnectionListener callback. The latter will eventually be used to notify a listener (e.g., CloudClientConnector) when the connect / disconnect calls complete.
PIOT-GDA-11-002: Create the ICloudClient interface. This will be used to provide a common set of method signatures for the DeviceDataManager to use for interacting with the cloud client.
PIOT-GDA-11-003: Implement CloudClientConnector. This involves a significant amount of work, although much of the connectivity logic will be delegated to a locally instanced MqttClientConnector. CloudClientConnector will implement ICloudClient as well as IConnectionListener and will need to pass incoming messages back to DeviceDataManager via the IDataMessageListener interface.
PIOT-GDA-11-004: This exercise centers on wiring up the interactions between DeviceDataManager, CloudClientConnector, and MqttClientConnector via their various interfaces. It will involve some asynchronous message processing and may require throttling messages to the cloud service.
PIOT-GDA-11-005: This OPTIONAL exercise is focused on generalization of cloud client connection logic via the base class BaseCloudClient (which will implement ICloudClient). Much of the functionality contained within CloudClientConnector can be migrated to this base class. The CloudClientFactory can then be used to create a specific instance of ICloudClient via the DeviceDataManager as per the implementation details in PIOT-GDA-11-006 and PIOT-GDA-11-007.
PIOT-GDA-11-006: This OPTIONAL exercise is focused on the creation of a Ubidots-specific ICloudClient implementation that's derived from BaseCloudClient.
PIOT-GDA-11-007: This OPTIONAL exercise is focused on the creation of an AWS-specific ICloudClient implementation that's derived from BaseCloudClient.
Step 3: Follow the CSF specific instructions (OPTIONAL)
PIOT-CSF-11-000: Git branching instructions (OPTIONAL - only needed if implementing CSF requirements).
PIOT-CSF-11-001: This OPTIONAL exercise is focused on creation of an AWS-specific Lambda function in Python using some of the existing CDA components for data parsing.
PIOT-CFG-11-002 This OPTIONAL configuration exercise is focused on the creation of an AWS-specific ZIP file to be used with PIOT-CSF-11-001.
PIOT-CSF-11-100: Git merge and commit instructions (OPTIONAL - only needed if implementing CSF requirements).
NOTE: Each chapter requires familiarity with source code version control using Git. If you're unfamiliar with Git, Git branching, or merging, Atlassian has a useful tutorial on these topics, located here: Git Branching
Review the README
Please see README.md for further information on, and use of, this content.
Review the LICENSE and USAGE guidelines
Please see PIOT-DOC-LIC for license and usage information.
Review
Read Chapter 11 of Programming the Internet of Things.
Objective
Build cloud-integration functionality into your GDA using your GDA's MQTT client to connect to a variety of MQTT-enabled cloud services that provide IoT capabilities. Build the additional functionality needed to enable end-to-end communications between your CDA, GDA, and the cloud.
Activities
This is the module where it all comes together: Learn how to use MQTT to connect your GDA to a variety of cloud services, including Ubidots and AWS.
You'll add functionality to your data management layer within your GDA specifically to pass messages from Edge Tier to the cloud, and process information from the cloud back to your Edge Tier applications (GDA and CDA).
In this module, the sky's the limit. Literally.
Lab Module 11
Lab Module 11 - Cloud Integration is focused on configuring your cloud service functionality and updating the GDA to support integration with the cloud service provider's MQTT service.
Step 1: Read the Lab Module Summary and follow the Configuration steps
Step 2: Follow the GDA specific instructions
MqttClientConnector
to support the use of custom configuration sections, protected calls to publish / subscribe / unsubscribe, and theIConnectionListener
callback. The latter will eventually be used to notify a listener (e.g.,CloudClientConnector
) when the connect / disconnect calls complete.ICloudClient
interface. This will be used to provide a common set of method signatures for theDeviceDataManager
to use for interacting with the cloud client.CloudClientConnector
. This involves a significant amount of work, although much of the connectivity logic will be delegated to a locally instancedMqttClientConnector
.CloudClientConnector
will implementICloudClient
as well asIConnectionListener
and will need to pass incoming messages back toDeviceDataManager
via theIDataMessageListener
interface.DeviceDataManager
,CloudClientConnector
, andMqttClientConnector
via their various interfaces. It will involve some asynchronous message processing and may require throttling messages to the cloud service.BaseCloudClient
(which will implementICloudClient
). Much of the functionality contained withinCloudClientConnector
can be migrated to this base class. TheCloudClientFactory
can then be used to create a specific instance ofICloudClient
via theDeviceDataManager
as per the implementation details in PIOT-GDA-11-006 and PIOT-GDA-11-007.ICloudClient
implementation that's derived fromBaseCloudClient
.ICloudClient
implementation that's derived fromBaseCloudClient
.Step 3: Follow the CSF specific instructions (OPTIONAL)
NOTE: Each chapter requires familiarity with source code version control using Git. If you're unfamiliar with Git, Git branching, or merging, Atlassian has a useful tutorial on these topics, located here: Git Branching
Review the README
Review the LICENSE and USAGE guidelines