Last week’s studio introduced two types of cloud-based communication supported by Particle’s platform:
Both of these have some limitations:
They are each specific to an individual device, so there isn’t an easy to share information among multiple devices. They also both fail if the device is off-line.
“Clients” of information must use polling to access information with either. That is, a client must either repeatedly call a cloud function to retrieve a return value or must repeatedly read a cloud variable to see if it has changed. Polling is often undesirable for a few reasons:
It’s difficult to decide on the right balance between frequency of polling for responsiveness vs. resource utilization (polling causes network traffic and uses power).
The client has to implement some strategy to do the polling. For instance, it may need to use a timer to repeatedly poll. This can be come difficult to manage and waste resources when polling for multiple things. For example, the client may have to use multiple timers to poll for different items of data.
This week’s studio will focus on:
Particles “Event Streams”, which can be used for many-to-many communication and use a publish-subscribe model rather than polling.
Studio Prep (Monday)
At studio time you should have:
Breadboard wired with Photon, your RGB LED, and a button
Completed code from the last studio (control LED via cloud functions)
And you should have:
Reviewed the details of even stream support in firmware (on the embedded device)
End of Module
By the end of this week (end of the modules on embedded and cloud concepts) you should have completed AdaFruit’s All the Internet of Things sequence