You are on page 1of 26

UNIT – III

Single Board Computer


Single-board computer (SBC) is a complete computer built on a
single circuit board, with microprocessor(s), memory,
input/output (I/O) and other features required of a functional
computer.

Made as demonstration or development systems, for educational
systems, or for use as embedded computer controllers.
WAMP – Auto Bahn

WAMP is a WebSocket subprotocol registered at IANA,specified to offer
routed RPC and PubSub.

Its design goal is to provide an open standard for soft real-time message
exchange between application components and ease the creation of loosely
coupled architectures based on microservices.

WAMP requires a reliable, ordered, full-duplex message channel as a
transport layer, and by default uses Websocket.
WAMP – Auto Bahn
WAMP – Web Application Message Protocol
Is a sub-protocol of Webcocket whcih provides publish-subscribe and
remote procedure call (RPC) messaging patterns.
Key components of WAMP:-
Transport:- is the chanel that connects two peers. WAMP uses Websocket
as the channel by default.
Session:- is a conversation between two peers that runs over a transport
Client:- clients are the peers that can have one or more
roles In WAMP client can be either
Publisher:- publishes the events
Subscriber:- subscribes to the topic and receives the events including
the payload.
In RPC client can be either
Caller:- issues calls to the remote procedures
Callee:- executes the procedures and returns the result back
WAMP – Auto Bahn
WAMP – Web Application Message Protocol
Is a sub-protocol of Webcocket whcih provides publish-subscribe and
remote procedure call (RPC) messaging patterns.
Key components of WAMP:-
Transport:- is the chanel that connects two peers. WAMP uses Websocket
as the channel by default.
Session:- is a conversation between two peers that runs over a transport
Client:- clients are the peers that can have one or more
roles In WAMP client can be either
Publisher:- publishes the events
Subscriber:- subscribes to the topic and receives the events including
the payload.
In RPC client can be either
Caller:- issues calls to the remote procedures
Callee:- executes the procedures and returns the result back
WAMP – protocol interaction between
the peers
WAMP – protocol interaction between
peers
the

The WAMP transport used is Websocket.

First the Transmission Control Protocol (TCP) connection will be

established. Transport Layer Security (TLS) connection will be established.

Websocket connection setup request will take

place Response accepting the request will be done

Then the WAMP session lifetime will be

established Simillarly, multiple sessions will takes

place.
Once the communication is over Websocket connection close request will
be sent


Then the response for the closing websocket will be sent

Finally, TLS connection will be
close And TCP connection will be
Xively Cloud for IoT

Xively is a commercial Platform-as-a Service that can be used for
creating solutions for IoT.

With Xively cloud, IoT developers can focus on the fron-end infrastructure
and
device for IoT, while the backend data collection infrastructure is managed
● by Xively.
Xively platform comprises of a message bus for real-time
● message management and routing, business services, etc...
● Xively provides an extensive support for various languages platform.
It’s libraries leverages standards-based API over HTTP, Sockets and MQTT
● for connecting IoT devices to Xively cloud.
The Xively IoT platform is built on LogMeIn’s foundation of quality and
security, and is trusted by companies worldwide.
Django

Django is a free and open-source web framework, written in Python,
which follows the model-view-template architectural pattern. It is
maintained by the Django Software Foundation.

Django – Architecture
Django is a MTV framework:- Model – Template – View based architecture

M stands for “Model,” the data access layer. This layer contains
anything and everything about the data: how to access it, how to validate
it, which behaviors it has, and the relationships between the data. Acts as a
definition of some stored data.

T stands for “Template,” the presentation layer. This layer
contains presentation-related decisions: how something should be displayed
on a Web page or other type of document. In typical Django web
application is simply HTML pages with few extra placeholders.

V stands for “View,” the business logic layer. This layer contains the
logic
that accesses the model and defers to the appropriate template(s). You
can think of it as the bridge between models and templates. The view
ties the model to the template.
Django – Configuring Database

Database is a structured set of data held in a computer, especially one that
is accessible in various ways.

Django provides a unified API for database backends, giving the freedom
to choose the database.

It supports various relational database engines including
MySQL,
● PostgreSQL, Oracle and SOLite3.
Also support for non-relattional databases such as MongoDB using
● additional engines.
Following code shows the installation and set of databases.
Django – Configuring Database

Database is a structured set of data held in a computer, especially one that
is accessible in various ways.

Django provides a unified API for database backends, giving the freedom
to choose the database.

It supports various relational database engines including
MySQL,
● PostgreSQL, Oracle and SOLite3.
Also support for non-relattional databases such as MongoDB using
● additional engines.
Following code shows the installation and set of databases.
Amazon Web Services for IoT
Amazon Web Services is a subsidiary of Amazon.com that offers on-
demand cloud computing platforms. Following are some of the Amazon

services Amazon EC2

Amazon

AutoScaling

Amazon S3

Amazon RDS

Amazon

DynamoDB Amazon

kinesis Amazon
SQS Amazon EMR
AWS - EC2

Amazon EC2:- Amazon Elastic Compute
Cloud

Amazon EC2 is an Infrastucture-as-a Service (IaaS) provided by

Amazon. It delivers scalable, pay-as-you-go compute capacity in the

cloud.
It provides computing capacity in the form of virtual machines that

are launched in Amazon’s cloud.
EC2 can be used for several purpose for IoT such as IoT developers
can deploy IoT applications(developed under Django), setup IoT

platforms with REST web services.
EC2 provides users with control over the geographical location of
instances that allows for latency optimization and high levels of redundancy.
AWS - Amazon AutoScaling

Amazon AutoScaling:- Automatically Scale EC2
Instances

Allows automatically scalling Amazon EC2 capacity up or down according
to user defined conditions.

Can also be used for auto scaling IoT applications and IoT
platforms deployed on Amazon EC2.

Auto Scaling helps ensure that you are running your desired
number of Amazon EC2 instances.

Users can increse the number of EC2 instancesrunning their
applications
seamlessly during spikesin the application workloads to meet the
application performance requirements.
AWS - Amazon S3

Amazon S3:- Amazon Simple Storage
Service

It is a cloud based data storage infrastucture for storing and retreving a
very lage amount of data.

Amazon S3 provides storage through web services interfaces (REST,
SOAP, and BitTorrent).

S3 is designed to provide 99.999999999% durability and 99.99%
availability of objects over a given year, though there is no service-level
agreement for durability.

Amazon S3 provides options to host static websites with Index
document support and error document support.

Amazon S3 allows users to enable or disable logging. If enabled, the
logs are stored on Amazon S3 buckets which can then be analyzed.
AWS - RDS

Amazon RDS:- Amazon Relational Database
Service

It is aweb service that allows you to create instances of MYSQL, Oracle
or Microsoft SQL server in the cloud.

RDS also makes it easier to set up, operate, and scale a relational
database in the cloud.

It provides cost-efficient, resizeable capacity for an industry-
standard relational database and manages common database

administration tasks.

RDS can serve as a scalable datastore for IoT.
With RDS, IoT system developer can store any amount of data in
scalable relational databases.
AWS - DynamoDB

Amazon DynamoDB:- Amazon Dynamo
DataBase

Is a fully-managed, scalable, high performance No-SQL database

service. It can serve as a scalable datastore for IoT systems.

With this DynamoDB, IoT system developers can store any amount of
data and serve any level of request for the data.

It is a fully managed cloud database and supports both document and
key- value store models.

Its flexible data model and reliable performance make it a great fit for
mobile, web, gaming, ad tech, IoT, and many other applications.
AWS - Kinesis

Amazon Kinesis:- Kinesis platform

Amazon Kinesis is a platform for streaming data on AWS, making it easy
to load and analyze streaming data, and also providing the ability for
you to build custom streaming data applications for specialized needs.

Kinesis is well suited for IoT systems that generate massive scale data
and have strict real-time requirements for processing the data.

Amazon Kinesis Streams to collect and process large streams of
data
● records in real time
Amazon Kinesis Firehose to deliver real-time streaming data to
● destinations such as Amazon S3 and Amazon Redshift.
Amazon Kinesis Analytics to process and analyze streaming data
with standard SQL.
AWS - SQS

Amazon SQS:- Amazon Simple Queue Service

It is a fully-managed message queuing service for reliably
communicating among distributed software components and microservices -

at any scale.
SQS makes it simple and cost-effective to decouple and coordinate

the components of a cloud application.
Using SQS, you can send, store, and receive messages between
software components at any volume, without losing messages or

requiring other services to be always available.
SQS can be used in distributed IoT applicxations in which
various application components need to exchange messages.
AWS - EMR

Amazon EMR:- Amazon Elastic
MapReduce

It is a web service that uses Hadoop, an open-source framework, to
quickly
● & cost-effectively process vast amounts of data.
Amazon Elastic MapReduce (EMR) is an Amazon Web Services (AWS)
● tool for big data processing and analysis.
EMR allows processing of massive scale data, hence, suitable for
● IoT applications that generate large volume of data that needs to be
analyzed.
● With EMR Data processing jobs are formulated with the
MapReduce parallel data processing model.
Amazon EMR offers the expandable low-configuration service as an
easier
alternative to running in-house cluster computing.
SkyNet
SkyNet IoT Messaging Platform

SkyNet is an open source instant messaging platform for Internet of Things.

The SkyNet API supports both HTTP REST and real-time WebSockets.

It allows you to register devices (or nodes) on the network.

A device can be anything including sensors, smarthome devices, cloud
resoures, drones, etc...

Each device is assigned a UUID and a secrete token.

Device or client applications can subscribe to other devices and receive/send
messages.

You might also like