Professional Documents
Culture Documents
Unit 5 Short Answers: 1. Write Short Notes Wamp? Ans: Wamp For Iot
Unit 5 Short Answers: 1. Write Short Notes Wamp? Ans: Wamp For Iot
SHORT ANSWERS:
Web Application Messaging Protocol (WAMP) is a sub-protocol of Web socket which provides
publish-subscribe and remote procedure call (RPC) messaging patterns.
• IaaS provides users the ability to provision computing and storage resources. These
resources are provided to the users as a virtual machine instances and virtual storage.
• Users can start, stop, configure and manage the virtual machines & virtual storage.
• Users can deploy operating systems and applications of their choice on the virtual
resources provisioned in the cloud.
• Virtual resources provisioned by the users are billed based on pay-per-use paradigm.
Advantages:
• Enhanced Scalability.
• Flexibility.
Disadvantages:
• Security issues
• Service delays
• Network delays
Ans: Web APIs are designed to represent widely used resources like HTML pages and
are accessed using a simple HTTP protocol. Any web URL activates a web API. Web APIs
are often called REST (representational state transfer) or RESTful because the publisher
of REST interfaces doesn't save any data internally between requests. As such, requests
from many users can be intermingled as they would be on the internet.
LONG ANSWERS:
1. Explain cloud for IoT with the help of Xively cloud service?
Xively Concepts :
Xively device: It is your “device” or the IoT project you are building. Consider it as an envelope
containing the data.
Channels: It is the streaming coming from your sensors. Usually, the channel number is equal
to the sensor number (as long as you want to monitor them all).
Sending data to Xively and monitoring :
Step1:Adding the “device” to our account
Step2:Define the channels
Step3:Use the Xively library for your device
Step4:Send data to Cloud
Step5:Run the Code
Step6:Create a dashboard using the data stored in Xively
• Xively Datastream that holds the four stream we send to Xively platform.
• Remember to use in the data stream the same name used in the Xively interface.
Xively Data:
• Connecting Freeboard.io to Xively.
Create dashboard:
2. Explain in detail about cloud service models?
Service models of Cloud Computing
• Service models are the reference models on which the Cloud Computing is based. These
can be categorized into three basic service models as listed below:
• IaaS provides users the ability to provision computing and storage resources.
These resources are provided to the users as a virtual machine instances and
virtual storage.
• Users can start, stop, configure and manage the virtual machines & virtual
storage.
• Users can deploy operating systems and applications of their choice on the
virtual resources provisioned in the cloud.
Advantages:
• Enhanced Scalability.
• Flexibility.
Disadvantages:
• Security issues
• Service delays
• Network delays
Platform-as-a-Service(PaaS)
• PaaS provides users the ability to develop and deploy application in cloud using the
development tools, APIs, software libraries and services (OR)
Advantages:
Disadvantages:
• No virtual machines/storage.
• Vendor lock-in
Software-as-a-Service(SaaS)
• SaaS provides the user a complete software application or the user interface
to the application itself
Advantages:
Disadvantages:
• Less flexibility
• Browser issues
• Vendor lock-in
Used by: End Consumers
Ans:
Introduction to Django
Django architecture:
View: The View is the user interface — what you see in your browser when you
render a website. It is represented by HTML/CSS/Javascript and Jinja files.
Django is famous for its unique and fully managed app structure. For every functionality, an
app can be created like a completely independent module. This article will take you through
how to create a basic app and add functionalities using that app.
To create a basic app in your Django project you need to go to directory
containing manage.py and from there enter the command :
python manage.py startapp projectApp
def index(req):
return HttpResponse("<h1> KMIT IT IOT-LAB WELCOMES YOU</h1>")
Step 8: So, we have finally created an app but to render the app using urls we need to include
the app in our main project so that urls redirected to that app can be rendered. Let us explore it.
Move to projectName-> projectName -> urls.py and add below code in the header
urlpatterns = [
path('admin/', admin.site.urls),
path('projectApp',views.index)
]
WAMP
1. Transport: Transport is channel that connects two peers.
2. Session: Session is a conversation between two peers that runs over a transport.
3. Client: Clients are peers that can have one or more roles. In publish-subscribe model client
can have following roles:
a) Publisher: Publisher publishes events (including payload) to the topic maintained
by thebroker.
b) Subscriber: Subscriber subscribes to the topics and receives the events including
the payload.
In RPC model client can have following roles: –
1. Caller: Caller issues calls to the remote procedures along with call arguments. – Callee:
Callee executes the procedures to which the calls are issued by the caller and returns the results
back to the caller. • Router: Routers are peers that perform generic call and event routing. In
publish-subscribe model Router has the role of a Broker: – Broker: Broker acts as a router and
routes messages published to a topic to all subscribers subscribed to thetopic.
1. Dealer: Dealer acts a router and routes RPC calls from the Caller to the Callee and routes
results from Callee toCaller.
2. Application Code: Application code runs on the Clients (Publisher, Subscriber, Callee or
Caller).
Framework for WAMP and WebSocket i.e Web, Mobile and IoT
Implementation
•$ git clone https://github.com/tavendo/AutobahnPython.git
Cloud computing works more as a service Grid computing uses the available
provider for utilizing computer resource resource and interconnected computer
systems to accomplish a common goal
Cloud offers more services all most all the Grid provides limited services
services like web hosting, DB (Data Base)
support and much more
Cloud computing is typically provided within a Grid computing federates the resources
single organization (eg : Amazon) located within different organization.