Presentation for the 12/12/12 Open Source Internet of Things Silicon Valley meetup.
http://www.meetup.com/The-Open-Source-Internet-Of-Things-Silicon-Valley/
Summary of the IoT TOolkit project and related concepts
http://iot-toolkit.com/
Presentation for the 12/12/12 Open Source Internet of Things Silicon Valley meetup.
http://www.meetup.com/The-Open-Source-Internet-Of-Things-Silicon-Valley/
Summary of the IoT TOolkit project and related concepts
http://iot-toolkit.com/
Michael Koster from ARM presented during the Open Mobile Alliance LwM2M Workshop event on January 28, 2015. This is a copy of the slides presented for his session titled, "IPSO Alliance Objects".
Building Eventing Systems for Microservice Architecture Yaroslav Tkachenko
In Bench Accounting we heavily use various events as first class citizens: notifications, in-app TODO lists (and messaging solution in future) rely on the eventing framework we built. Recently we’ve migrated our old legacy eventing system to the new framework with a focus on microservices architecture. We’ve chosen event sourcing approach as well as tools like Akka, Camel, ActiveMQ, Slick and Postgres (JSONB).
In this presentation I would like to share high-level overview of the system, implementation details and challenges we’ve faced.
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...Lightbend
By now, you’ve probably heard of Akka, the JVM toolkit for building scalable, resilient and resource efficient applications in Java or Scala. With over 12 open-source and commercial modules in the toolkit, Akka takes developers from actors on a single JVM, all the way out to network partition healing and clusters of servers distributed across fleets of JVMs. But with such a broad range of features, how can Architects and Developers grok Akka from a high-level perspective?
In this technical webinar by Hugh McKee, O’Reilly author and Developer Advocate at Lightbend, we introduce Akka from A to Z, starting with a tour from the humble actor and finishing all the way at the clustered systems level. Specifically, we will review:
*How Akka Actors behave, create systems, and manage supervision and routing
*The way Akka embraces Reactive Streams with Akka Streams and Alpakka
*How various components of the Akka toolkit provide out-of-the-box solutions for distributed data, distributed persistence, pub-sub, and ES/CQRS
*How Akka works with microservices, and brings this functionality into Lagom and Play Frameworks
*Looking at Akka clusters, how Akka is used to build distributed clustered systems incorporate clusters within clusters
*What’s needed to orchestrate and deploy complete Reactive Systems
Exploring Reactive Integrations With Akka Streams, Alpakka And Apache KafkaLightbend
Since its stable release in 2016, Akka Streams is quickly becoming the de facto standard integration layer between various Streaming systems and products. Enterprises like PayPal, Intel, Samsung and Norwegian Cruise Lines see this is a game changer in terms of designing Reactive streaming applications by connecting pipelines of back-pressured asynchronous processing stages.
This comes from the Reactive Streams initiative in part, which has been long led by Lightbend and others, allowing multiple streaming libraries to inter-operate between each other in a performant and resilient fashion, providing back-pressure all the way. But perhaps even more so thanks to the various integration drivers that have sprung up in the community and the Akka team—including drivers for Apache Kafka, Apache Cassandra, Streaming HTTP, Websockets and much more.
In this webinar for JVM Architects, Konrad Malawski explores the what and why of Reactive integrations, with examples featuring technologies like Akka Streams, Apache Kafka, and Alpakka, a new community project for building Streaming connectors that seeks to “back-pressurize” traditional Apache Camel endpoints.
* An overview of Reactive Streams and what it will look like in JDK 9, and the Akka Streams API implementation for Java and Scala.
* Introduction to Alpakka, a modern, Reactive version of Apache Camel, and its growing community of Streams connectors (e.g. Akka Streams Kafka, MQTT, AMQP, Streaming HTTP/TCP/FileIO and more).
* How Akka Streams and Akka HTTP work with Websockets, HTTP and TCP, with examples in both in Java and Scala.
Why Actor-Based Systems Are The Best For MicroservicesYaroslav Tkachenko
Nowadays microservices are widely adopted in the industry, but we're still trying to understand the best practices for building and maintaining successful systems. HTTP/RPC synchronous communication is very popular in microservices, but it has a lot of challenges like service discovery, retries, back-pressure, etc. From the other side, microservices can be build to communicate asynchronously using messages. This approach also has its pros and cons, but I'm confident that most of the businesses can benefit from it. Also, messages are natural way to exchange data in actor-based systems, so it should be possible to leverage actors for building great microservices environments. I want to share my experience and show how Enterprise Integration Patterns can be used to design and build fine-grained microservices with asynchronous communication using actors.
Although most microservices are stateless - they delegate things like persistence and consistency to a database or external storage. But sometimes you benefit when you keep the state inside the application. In this talk I’m going to discuss why you want to build stateful microservices and design choices to make. I’ll use Akka framework and explain tools like Akka Clustering and Akka Persistence in depth and show a few practical examples.
Understanding Virtual Networking in the Cloud - RightScale Compute 2013RightScale
Speaker: Josep Blanquer - Chief Architect, RightScale
Managing networking constructs in public and private clouds is a complex task. Add to that the different names, semantics, and capabilities that each cloud exposes, and you have a sure recipe for a headache. We will describe how subnets, firewalls, security groups, routing tables, virtual network interfaces, and other constructs map to the names and semantics in various public and private clouds. In this session we will present RightScale Networks Manager, a distilled definition of networking concepts that works across clouds. Networks Manager is a single pane of glass — UI and API — for your cloud networking infrastructure, saving you headaches from networking idiosyncrasies.
How Credit Karma Makes Real-Time Decisions For 60 Million Users With Akka Str...Lightbend
In this webinar, Engineering Manager at Credit Karma, Dustin Lyons, discusses how not long ago his team was facing a common challenge shared by many financial services architects and engineering leaders: not only how to move from the offline, batch-mode processing of Big Data to streaming, Fast Data, and how to enable real-time decision making based on the information flowing in from over 60 million members.
Dustin reviews how his team migrated away from PHP and successfully implemented Akka Streams with Apache Kafka to ingest, process and route real-time events throughout their data ecosystem. At the end of this presentation, you’ll better understand:
* The design considerations for new Fast Data architectures, from streaming to microservices to real-time analysis.
* Some lessons learned when it comes to progressing from batch to streaming using Akka, Spark and Kafka
* Why Akka’s self-healing actor model and the resilience that it provides is actually what matters most when delivering real-time customer experiences
Dean Wampler, O’Reilly author and Big Data Strategist in the office of the CTO at Lightbend discusses practical tips for architecting stream-processing applications and explains how you can tame some of the complexity in moving from data at rest to data in motion.
Moving from Big Data to Fast Data? Here's How To Pick The Right Streaming EngineLightbend
For many businesses, the batch-oriented architecture of Big Data–where data is captured in large, scalable stores, then processed later–is simply too slow: a new breed of “Fast Data” architectures has evolved to be stream-oriented, where data is processed as it arrives, providing businesses with a competitive advantage.
There are many stream processing tools, so which ones should you choose? It helps to consider several factors in the context of your applications:
* Low latency: How low is necessary?
* High volume: How high is required?
* Integration with other tools: Which ones and how?
* Data processing: What kinds? In bulk? As individual events?
In this talk by Dean Wampler, PhD., VP of Fast Data Engineering at Lightbend, we’ll look at the criteria you need to consider when selecting technologies, plus specific examples of how four streaming tools–Akka Streams, Kafka Streams, Apache Flink and Apache Spark serve particular needs and use cases when working with continuous streams of data.
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataLightbend
In a recent survey, 90% of over 2400 developers reported having at least some real-time functionality in their systems. Enterprises are realizing that the ability to extract value from streaming data in near real-time is the new competitive advantage.
Two technologies–Akka Streams and Kafka Streams–have emerged as popular tools to use with Apache Kafka for addressing the shared requirements of availability, scalability, and resilience for both streaming microservices and Fast Data. So which one should you use for specific use cases?
Michael Koster from ARM presented during the Open Mobile Alliance LwM2M Workshop event on January 28, 2015. This is a copy of the slides presented for his session titled, "IPSO Alliance Objects".
Building Eventing Systems for Microservice Architecture Yaroslav Tkachenko
In Bench Accounting we heavily use various events as first class citizens: notifications, in-app TODO lists (and messaging solution in future) rely on the eventing framework we built. Recently we’ve migrated our old legacy eventing system to the new framework with a focus on microservices architecture. We’ve chosen event sourcing approach as well as tools like Akka, Camel, ActiveMQ, Slick and Postgres (JSONB).
In this presentation I would like to share high-level overview of the system, implementation details and challenges we’ve faced.
Akka Revealed: A JVM Architect's Journey From Resilient Actors To Scalable Cl...Lightbend
By now, you’ve probably heard of Akka, the JVM toolkit for building scalable, resilient and resource efficient applications in Java or Scala. With over 12 open-source and commercial modules in the toolkit, Akka takes developers from actors on a single JVM, all the way out to network partition healing and clusters of servers distributed across fleets of JVMs. But with such a broad range of features, how can Architects and Developers grok Akka from a high-level perspective?
In this technical webinar by Hugh McKee, O’Reilly author and Developer Advocate at Lightbend, we introduce Akka from A to Z, starting with a tour from the humble actor and finishing all the way at the clustered systems level. Specifically, we will review:
*How Akka Actors behave, create systems, and manage supervision and routing
*The way Akka embraces Reactive Streams with Akka Streams and Alpakka
*How various components of the Akka toolkit provide out-of-the-box solutions for distributed data, distributed persistence, pub-sub, and ES/CQRS
*How Akka works with microservices, and brings this functionality into Lagom and Play Frameworks
*Looking at Akka clusters, how Akka is used to build distributed clustered systems incorporate clusters within clusters
*What’s needed to orchestrate and deploy complete Reactive Systems
Exploring Reactive Integrations With Akka Streams, Alpakka And Apache KafkaLightbend
Since its stable release in 2016, Akka Streams is quickly becoming the de facto standard integration layer between various Streaming systems and products. Enterprises like PayPal, Intel, Samsung and Norwegian Cruise Lines see this is a game changer in terms of designing Reactive streaming applications by connecting pipelines of back-pressured asynchronous processing stages.
This comes from the Reactive Streams initiative in part, which has been long led by Lightbend and others, allowing multiple streaming libraries to inter-operate between each other in a performant and resilient fashion, providing back-pressure all the way. But perhaps even more so thanks to the various integration drivers that have sprung up in the community and the Akka team—including drivers for Apache Kafka, Apache Cassandra, Streaming HTTP, Websockets and much more.
In this webinar for JVM Architects, Konrad Malawski explores the what and why of Reactive integrations, with examples featuring technologies like Akka Streams, Apache Kafka, and Alpakka, a new community project for building Streaming connectors that seeks to “back-pressurize” traditional Apache Camel endpoints.
* An overview of Reactive Streams and what it will look like in JDK 9, and the Akka Streams API implementation for Java and Scala.
* Introduction to Alpakka, a modern, Reactive version of Apache Camel, and its growing community of Streams connectors (e.g. Akka Streams Kafka, MQTT, AMQP, Streaming HTTP/TCP/FileIO and more).
* How Akka Streams and Akka HTTP work with Websockets, HTTP and TCP, with examples in both in Java and Scala.
Why Actor-Based Systems Are The Best For MicroservicesYaroslav Tkachenko
Nowadays microservices are widely adopted in the industry, but we're still trying to understand the best practices for building and maintaining successful systems. HTTP/RPC synchronous communication is very popular in microservices, but it has a lot of challenges like service discovery, retries, back-pressure, etc. From the other side, microservices can be build to communicate asynchronously using messages. This approach also has its pros and cons, but I'm confident that most of the businesses can benefit from it. Also, messages are natural way to exchange data in actor-based systems, so it should be possible to leverage actors for building great microservices environments. I want to share my experience and show how Enterprise Integration Patterns can be used to design and build fine-grained microservices with asynchronous communication using actors.
Although most microservices are stateless - they delegate things like persistence and consistency to a database or external storage. But sometimes you benefit when you keep the state inside the application. In this talk I’m going to discuss why you want to build stateful microservices and design choices to make. I’ll use Akka framework and explain tools like Akka Clustering and Akka Persistence in depth and show a few practical examples.
Understanding Virtual Networking in the Cloud - RightScale Compute 2013RightScale
Speaker: Josep Blanquer - Chief Architect, RightScale
Managing networking constructs in public and private clouds is a complex task. Add to that the different names, semantics, and capabilities that each cloud exposes, and you have a sure recipe for a headache. We will describe how subnets, firewalls, security groups, routing tables, virtual network interfaces, and other constructs map to the names and semantics in various public and private clouds. In this session we will present RightScale Networks Manager, a distilled definition of networking concepts that works across clouds. Networks Manager is a single pane of glass — UI and API — for your cloud networking infrastructure, saving you headaches from networking idiosyncrasies.
How Credit Karma Makes Real-Time Decisions For 60 Million Users With Akka Str...Lightbend
In this webinar, Engineering Manager at Credit Karma, Dustin Lyons, discusses how not long ago his team was facing a common challenge shared by many financial services architects and engineering leaders: not only how to move from the offline, batch-mode processing of Big Data to streaming, Fast Data, and how to enable real-time decision making based on the information flowing in from over 60 million members.
Dustin reviews how his team migrated away from PHP and successfully implemented Akka Streams with Apache Kafka to ingest, process and route real-time events throughout their data ecosystem. At the end of this presentation, you’ll better understand:
* The design considerations for new Fast Data architectures, from streaming to microservices to real-time analysis.
* Some lessons learned when it comes to progressing from batch to streaming using Akka, Spark and Kafka
* Why Akka’s self-healing actor model and the resilience that it provides is actually what matters most when delivering real-time customer experiences
Dean Wampler, O’Reilly author and Big Data Strategist in the office of the CTO at Lightbend discusses practical tips for architecting stream-processing applications and explains how you can tame some of the complexity in moving from data at rest to data in motion.
Moving from Big Data to Fast Data? Here's How To Pick The Right Streaming EngineLightbend
For many businesses, the batch-oriented architecture of Big Data–where data is captured in large, scalable stores, then processed later–is simply too slow: a new breed of “Fast Data” architectures has evolved to be stream-oriented, where data is processed as it arrives, providing businesses with a competitive advantage.
There are many stream processing tools, so which ones should you choose? It helps to consider several factors in the context of your applications:
* Low latency: How low is necessary?
* High volume: How high is required?
* Integration with other tools: Which ones and how?
* Data processing: What kinds? In bulk? As individual events?
In this talk by Dean Wampler, PhD., VP of Fast Data Engineering at Lightbend, we’ll look at the criteria you need to consider when selecting technologies, plus specific examples of how four streaming tools–Akka Streams, Kafka Streams, Apache Flink and Apache Spark serve particular needs and use cases when working with continuous streams of data.
Akka Streams And Kafka Streams: Where Microservices Meet Fast DataLightbend
In a recent survey, 90% of over 2400 developers reported having at least some real-time functionality in their systems. Enterprises are realizing that the ability to extract value from streaming data in near real-time is the new competitive advantage.
Two technologies–Akka Streams and Kafka Streams–have emerged as popular tools to use with Apache Kafka for addressing the shared requirements of availability, scalability, and resilience for both streaming microservices and Fast Data. So which one should you use for specific use cases?
A Modular Open Source Platform for Web Scale IoT InteroperabilityMichael Koster
IoT is a macro instance of the M-V-C pattern. Open source software components built from IoT Toolkit, Node-RED, and Dojo Toolkit create an open source stack for the Internet of Things
Concepts and examples of HATEOAS principles applied to M2M interface design, based on the proposed interaction model of the W3C Web of Things Interest Group.
Friend Of A Thing and IoT Resource access control #OSIOTMichael Koster
Friend Of A Thing is a conceptual ontology for connecting the physical graph to the personal graph for the purpose of resource access control and management. FOAT helps integrate the Internet of Things with the Internet of People
1.Wireless Communication System_Wireless communication is a broad term that i...JeyaPerumal1
Wireless communication involves the transmission of information over a distance without the help of wires, cables or any other forms of electrical conductors.
Wireless communication is a broad term that incorporates all procedures and forms of connecting and communicating between two or more devices using a wireless signal through wireless communication technologies and devices.
Features of Wireless Communication
The evolution of wireless technology has brought many advancements with its effective features.
The transmitted distance can be anywhere between a few meters (for example, a television's remote control) and thousands of kilometers (for example, radio communication).
Wireless communication can be used for cellular telephony, wireless access to the internet, wireless home networking, and so on.
APNIC Foundation, presented by Ellisha Heppner at the PNG DNS Forum 2024APNIC
Ellisha Heppner, Grant Management Lead, presented an update on APNIC Foundation to the PNG DNS Forum held from 6 to 10 May, 2024 in Port Moresby, Papua New Guinea.
Multi-cluster Kubernetes Networking- Patterns, Projects and GuidelinesSanjeev Rampal
Talk presented at Kubernetes Community Day, New York, May 2024.
Technical summary of Multi-Cluster Kubernetes Networking architectures with focus on 4 key topics.
1) Key patterns for Multi-cluster architectures
2) Architectural comparison of several OSS/ CNCF projects to address these patterns
3) Evolution trends for the APIs of these projects
4) Some design recommendations & guidelines for adopting/ deploying these solutions.
Bridging the Digital Gap Brad Spiegel Macon, GA Initiative.pptxBrad Spiegel Macon GA
Brad Spiegel Macon GA’s journey exemplifies the profound impact that one individual can have on their community. Through his unwavering dedication to digital inclusion, he’s not only bridging the gap in Macon but also setting an example for others to follow.
This 7-second Brain Wave Ritual Attracts Money To You.!nirahealhty
Discover the power of a simple 7-second brain wave ritual that can attract wealth and abundance into your life. By tapping into specific brain frequencies, this technique helps you manifest financial success effortlessly. Ready to transform your financial future? Try this powerful ritual and start attracting money today!
IoT Toolkit and the Smart Object API - Architecture for Interoperability
1. IoT
Toolkit
and
the
Smart
Object
API
Architecture
For
Interoperability
Michael
J
Koster
michaeljohnkoster@gmail.com
2. IoT
Toolkit
Goals
• Interoperability
–
Any
ApplicaDon,
any
connected
object,
using
any
M2M
protocol
• Simple
API
arDculated
through
data
models
and
high
level
informaDon
models
• PlaIorm-‐as-‐a-‐Service
and
gateway
enabled
• Open
Source,
IPR-‐free
• Distributed,
event-‐driven
applicaDon
soNware
runs
anywhere
in
the
network
• Web
standard
protocols
and
best
pracDces
3. API
IoT
1.0
–
Things
Connected
to
Apps
M2M
CoAP
M2M
MQ
M2M
XMPP
M2M
HTTP
App
API
App
API
App
API
App
• App
runs
on
single
service
–
Single
Points
Of
Failure
• Each
app
wriWen
to
a
custom
API
• Diverse
M2M
is
someDmes
required
but
can
inhibit
interoperability
• SoNware,
User
data,
and
Things
are
trapped
in
Silos
• Difficult
to
connect
new
types
of
things
and
deploy
new
plaIorms
• Very
difficult
to
share
resources
or
connect
across
plaIorms
• Apps
are
not
network-‐
effect
enabled
Connected
Things,
Sensors,
Actuators,
Data
Sources
4. IoT
2.0
–
Interoperability
M2M
CoAP
M2M
MQTT
M2M
XMPP
M2M
HTTP
Smart
Object
API
IoT
Toolkit
Discovery
ApplicaDons
Data
Models
• Object
Model
• REST
+
Event
Model
• M2M
Abstrac9ons
IoT
Toolkit
Connected
Things,
Sensors,
Actuators,
Data
Sources
Model
Database
• Easy
to
deploy
new
things
and
applicaDons
using
data
models
• Write
once,
run
anywhere
soNware
• Any
app
to
any
thing
via
any
M2M,
use-‐
case
appropriate
M2M
• Network
effect
enabled
Machine
Models
5. Graph-‐Structured,
Event-‐Driven,
Real
Time
Distributed
ApplicaDons
SO
SO
SO
Gateways
Server
Cloud
Endpoints
• Sensors
• Devices
ApplicaDon
Components
And
Resources
Databases
Registry
-‐
Instances
Repository
-‐
Models
Models
• Discovery
• Persistence
• ReplicaDon
• Resource
Access
• Data
Models
• Sensor
Models
• Machine
Models
• Templates
HTTP
MQTT
CoAP
XMPP
HTTP
CoAP
MQTT
Smart
Objects
6. What
Is
The
Smart
Object
API?
• Virtual
RepresentaDon
of
a
physical
Smart
Object
• Object
Model
–
Web
Object
EncapsulaDon
of
properDes
• REST
API
using
JSON,
XML,
RDF,
core-‐link-‐format
representaDons
• Data
Models
–
Linked
Data
descripDons,
Resource
Discovery
and
Linkage
• Event
Model
–
Asynchronous
M2M
and
applicaDon
soNware
event
handlers
7. Object
Model
Web
Object
EncapsulaDon
Smart
Object
Web
protocol
interfaces,
also
M2M
e.g.
MQTT,
XMPP,
…
Event
Model
Links
data
with
acDons
Pub-‐Sub
and
event
handlers
Encapsulates
local
soNware
components
and
handlers
Self-‐describing
data
model
For
Resource
Discovery
and
Linkage,
RDF
and
core-‐
link-‐format
Sensor
or
other
data
JSON,
XML,
data
feeds
8. API
–
DescripDon
(Data
Model)
• Contains
graphs
describing
the
resource
data
model
• RDF
triples
in
many
popular
representaDons
– create
(POST)
loads
a
graph
into
the
descripDon
delete
(DELETE)
removes
a
graph
or
subgraph
from
the
descripDon
– set
(PUT)
updates
a
graph
or
subgraph
– get
(GET)
returns
a
graph
or
subgraph
• SemanDc
Proxy
for
core-‐link-‐format
compaDbility
9. API
–
Observable
Property
• Represents
sensor
data
or
a
data
feed
• Can
be
JSON,
xml,
text,
or
other
content
type
– create
(POST):
make
new
observable
property
– delete
(DELETE)
remove
observable
property
– set
(PUT)
update
ObservaDon
Value
or
data
feed
– get
(GET)
returns
the
current
ObservaDon
Value
• Formats
for
embedded
Dme
+
locaDon
data
10. API
–
Agent
• Container
for
Event
Handlers,
soNware
components
invoked
within
the
local
context
of
a
Smart
Object
• Observer
class
invokes
Event
Handler
code
in
the
Agent
• Reference
ImplementaDon
– create
(POST)
make
a
new
code
object
instance
• handler
or
daemon
– delete
(DELETE)
remove
code
instance
– set
(PUT)
updates
sefng
of
a
code
instance
– get
(GET)
returns
sefng
of
a
code
instance
11. API
–
Observers
• Contains
graphs
which
define
the
nodes
and
endpoints
of
event
driven
processing
• Publish,
Subscribe,
and
Event
Handler
paWerns
• Reference
ImplementaDon
– create
(POST)
make
a
new
Observer
– set
(PUT)
update
an
Observer’s
sefngs
– get
(GET)
return
an
Observer’s
sefngs
– delete
(DELETE)
remove
an
Observer
13. REST
API
• Python
API
–
Local
SoNware,
Agents
and
Handlers
– Resources
(objects)
are
hierarchical
properDes
of
other
resources
– self.indoorTempValue = sensors.weather.indoor_temp.get()!
• Web
API
–
HWp
and
CoAP
REST
Client
access,
MQTT
topics
– Resources
are
organized
in
hierarchical
path
– GET http:my_server:8000/sensors/weather/indoor_temp!
– GET coap:my_server:5683/sensors/weather/indoor_temp!
– MQTT subscribe my_server:1883 /sensors/weather/indoor_temp!
• Default
Property
– Returns
a
resource
associated
with
a
higher
level
resource
– GET
of
Smart
Object
returns
it’s
DescripDon;
GET
of
Observable
Property
returns
it’s
ObservaDon
Value
14. Protocol
Bridge
Examples
• MQTT
Endpoints
and
Bridge
using
Observer
• CoAP
Server
Endpoint
and
link-‐data
Proxy
15. MQTT
Observer
MQTT
Broker
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
Publish
from
data
producer
Publish
From
REST
API
Publish
to
Other
Subscribers
SUB
Publish
to
REST
API
Connects
REST
Resource
to
MQTT
Topic
Publish
and
Subscribe
16. MQTT
Observer
MQTT
Broker
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
Publish
from
data
producer
Publish
From
REST
API
Publish
to
Other
Subscribers
SUB
Publish
to
REST
API
Publisher
Publishes
REST
Resource
updates
to
the
broker
17. MQTT
Observer
MQTT
Broker
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
Publish
from
data
producer
Publish
From
REST
API
Publish
to
Other
Subscribers
SUB
Publish
to
REST
API
Subscriber
Makes
last
published
data
available
at
the
REST
endpoint
18. MQTT
Observer
MQTT
Broker
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
Publish
from
data
producer
Publish
From
REST
API
Publish
to
Other
Subscribers
SUB
Publish
to
REST
API
Pub+Sub
Repeats
data
updates
in
both
direcDons
19. MQTT
Bridge
to
mulDple
REST
endpoints
MQTT
Broker
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
Publish
from
data
producer
Publish
to
Other
Subscribers
REST
Endpoint
ObservableProperty
mqWObserver
PUT
GET
22. IoT
Toolkit
• IoT
Toolkit
is
a
reference
implementaDon
of
the
Smart
Object
API
and
related
tools
• REST
API
with
real-‐Dme
event
model
for
the
Internet
of
Things
• Lightweight
server
that
can
run
on
small
computers
e.g.
Raspberry
Pi,
ARM/Linux
PC,
AWS
t1.micro
• M2M
using
HTTP,
MQTT,
and
CoAP,
others
23. IoT
Toolkit
Project
Status
• Smart
Object
API
is
complete
and
stable
• IoT
Toolkit
Demo
• M2M
interoperability:
MQTT,
CoAP,
HTTP
interfaces
• Development
Roadmap
Examples
– Object
model,
Data
model
namespaces
and
ontologies
– Programming
model
UI:
Node
Red
integraDon
– Graph-‐based
resource
access
control
– Harden
code,
excepDon
handling,
API
Tests
– Scalable
server,
mulD-‐tenancy
– XMPP
endpoint
and
proxy
for
XEP-‐0060,
XEP-‐0323,
XEP-‐0325
– Web
UI
for
debug
and
demo,
applicaDons
• Navigator,
Dashboard,
AnalyDcs,
Graphs
and
Charts
24. Code
Examples
• Arduino
Sketch
that
updates
SmartObject
in
the
gateway
• Server
startup
code
• Example
Resources
• Event
Model
Examples
–
Observers
• Based
on
the
Weather
Sensor
Demo
25. Weather
sensor
example
Sensor
(Arduino)
Gateway
(Rpi)
Sensor
Hardware
• Wind
Speed
• Wind
DirecDon
• Rainfall
• Temperature
• Humidity
• Barometer
Reads
sensor
elements
and
creates
sensor
output
values
to
update
Smart
Object
in
the
Gateway
using
a
simple
hWp
client
Gateway
runs
Smart
Object
API
and
exposes
HTTP
interface,
adds
descripDonand
other
resources,
Observers
send
updates
to
cloud
server
Local
Ethernet
Cloud
Server
acts
as
Gateway-‐as-‐a-‐Service
for
Xively
Receives
updates
from
the
gateway,
Observers
Send
periodic
updates
to
Xively
feed
Cloud
Server
Internet
Client
(Xively)
Internet
Xively
acts
as
client
applicaDon
and
receives
updates
from
the
cloud
service
acDng
as
GaaS
26. Arduino
Sketch
PString jsonObject(objectBuffer, sizeof(objectBuffer));!
!
if(nextPushPoint==0) {!
nextPushPoint=1;!
/* use Pstring.print to format JSON string from integer */!
jsonObject.println(daily_rain,1); !
/* PUT update to Smart Object server property using JSON */!
client.print("PUT ");!
client.print(serverPath);!
client.print(”daily_rain");!
client.println(" HTTP/1.1");!
client.println("Content-Type: application/json");!
client.print("Content-Length: ");!
client.println(jsonObject.length()-2);!
client.println("Connection: close");!
client.println();!
client.println(jsonObject);!
}!
27. Demo
Code
for
Weather
Sensor
–
Smart
Object
and
Service
CreaDon
baseObject
=
SmartObject()
#
create
a
Smart
Object
to
serve
as
the
base
container
for
other
Smart
Objects
and
resources
server
=
SmartObjectService(baseObject)
#
make
an
instance
of
the
service,
baseObject
is
the
object
root
server.start(8000)
#
forks
a
server
thread
to
listen
on
port
8000
print
'hCpd
started
at',
baseObject.Proper9es.get('hCpService’)
#
top
level
object
container
for
sensors,
class
is
SmartObject
sensors
=
baseObject.create({'resourceName':
'sensors',
'resourceClass':
'SmartObject'})
#weather
sensor
Smart
Object
under
sensors
for
the
weather
sensor
weather
=
sensors.create({'resourceName':
'rhvWeather-‐01',
'resourceClass':
'SmartObject’}!
28. Data
Model
–
DescripDon
for
object
discovery
and
linkage
#
make
a
reference
to
the
weather
sensor
object
DescripDon
and
build
an
example
graph
(could
use
the
built-‐in
reference
as
well)
weather.descripDon
=
weather.Resources.get('Descrip9on')
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/outdoor_temperature'),
RDFS.Resource,
Literal('sensor')))
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/outdoor_temperature'),
RDF.type,
Literal('temperature')))
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/outdoor_humidity'),
RDFS.Resource,
Literal('sensor')))
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/outdoor_humidity'),
RDF.type,
Literal('humidity')))
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/sealevel_pressure'),
RDFS.Resource,
Literal('sensor')))
weather.descripDon.set((URIRef('sensors/rhvWeather-‐01/sealevel_pressure'),
RDF.type,
Literal('pressure')))!
29. EncapsulaDon:
Observable
Property,
Observer,
and
Subscriber
sealevel_pressure
=
weather.create({'resourceName':
'sealevel_pressure',
'resourceClass':
'ObservableProperty'})
sealevel_pressure.Observers.create({'resourceName':'demoServiceObserver',
'resourceClass':
'hCpPublisher',
'targetURI':
'hCp://smartobjectservice.com:
8000/sensors/rhvWeather-‐01/sealevel_pressure'})
#
make
a
named
subscriber
resource
outdoor_humidity.Observers.create({'resourceName':
'humiditySubscriber',
'resourceClass':
'hCpSubscriber',
'observerURI':
'hCp://localhost:8000/sensors/rhvWeather-‐01/
indoor_humidity',
'observerName':
'humiditySubObserver'
})
30. Event
Model:
MQTT
Observer
• Publish,
Subscribe,
or
Pub+Sub
using
the
mqWObserver
resource
class
• Prototype
opens
a
connecDon
to
a
specified
broker
for
each
endpoint
Observers.create({'resourceName': 'mqttTestObserver',!
! ! ! ! ! 'resourceClass': 'mqttObserver',!
'connection': 'smartobjectservice.com',!
'pubTopic': ’sealevel_pressure',!
'subTopic': None,!
'QoS': 0,!
'keepAlive': 60 })!
32. Event
Model
–
Handler
and
Callback
NoDfier
#addHandler
class
adds
2
properDes
values
together
and
stores
in
a
third
weather.Agent.create({'resourceName':
'addHandler',
'resourceClass':
'addHandler',
'addendLink1':'sensors/rhvWeather-‐01/indoor_temperature',
'addendLink2':
'sensors/rhvWeather-‐01/indoor_temperature',
'sumOutLink':
'sensors/rhvWeather-‐01/outdoor_humidity'})
#
now
create
a
callback
observer
endpoint
indoor_temperature.Observers.create({'resourceName':
'callbackTempObserver',
'resourceClass':
'callbackNo9fier',
'handlerURI':
'callback:///sensors/rhvWeather-‐01/Agent/
addHandler'})