5.PIOT Unit 5
5.PIOT Unit 5
• Stateless: Each request from client to server must contain all the info. Necessary to
understand the request, and cannot take advantage of any stored context on the server.
• Cache-able: Cache constraint requires that the data within a response to a request be
implicitly or explicitly labeled as cache-able or non-cacheable. If a response is cache-able,
then a client cache is given the right to reuse that response data for later, equivalent requests.
• Layered System: constraints the behavior of components such that each component cannot
see beyond the immediate layer with which they are interacting.
• User Interface: constraint requires that the method of communication between a client and
a server must be uniform.
• Code on Demand: Servers can provide executable code or scripts for clients to execute in
their context. This constraint is the only one that is optional.
WebSocket-based Communication APIs
WebSocket-based Communication APIs
Cloud computing is a transformative computing paradigm that involves delivering applications and
services over the internet.
Introduction to Cloud Computing
The worker can use a cloud computing service to finish their work
because the data is managed remotely by a server. Another example: you
have a problem with your mobile device and you need to reformat it or
reinstall the operating system. You can use Google Photos to upload your
photos to internet-based storage.
After the reformat or reinstall, you can then either move the photos back
to you device or you can view the photos on your device from the
internet when you want.
Cloud Computing
Characteristics
Service models
Service delivery in cloud computing comprises three different
service models: software as a service (SaaS), platform as a service
(PaaS), and infrastructure as a service (IaaS).
Software as a service (SaaS) provides applications to the cloud’s
end user that are mainly accessed via a web portal or service-
oriented architecture-based web service technology. These services
can be seen as ASP (application service provider) on the application
layer. Usually, a specific company that uses the service would run,
maintain and give support so that it can be reliably used over a
long period of time.
Service and Deployment
• JSON
• JavaScript Object Notation (JSON) is an easy to read and write data-interchange format. JSON is
used
as an alternative to XML and is is easy for machines to parse and generate. JSON is built on two
structures - a collection of name-value pairs (e.g. a Python dictionary) and ordered lists of values
(e.g..
a Python list).
• XML
• XML (Extensible Markup Language) is a data format for structured document interchange. The Python
minidom library provides a minimal implementation of the Document Object Model interface and has
an API similar to that in other languages.
• HTTPLib & URLLib
• HTTPLib2 and URLLib2 are Python libraries used in network/internet programming
• SMTPLib
• Simple Mail Transfer Protocol (SMTP) is a protocol which handles sending email and routing e-mail
between mail servers. The Python smtplib module provides an SMTP client session object that can be