0% found this document useful (0 votes)
50 views42 pages

Unit 2 Lec 2 Cloud Computing

Uploaded by

Manvendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views42 pages

Unit 2 Lec 2 Cloud Computing

Uploaded by

Manvendra
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 42

Subject Name:- Cloud Computing

Subject Code:- KCS-713


Unit No.:- 2
Lecture No.:- 2
Topic Name: Web Services, Publish Subscribe Model

1
Content
1:- Web Services
2:-Publish Subscribe Model

2
Review: Why is SOA Different?
• Loose coupling
– No interdependencies between systems
• Reuses existing technology infrastructure
• Everything is based on XML and other industry
standards
– Platform and language independent
– Easy, inexpensive
• Industry momentum:
– Every player is on board: IBM, Microsoft, SAP, Oracle …
– Proven interoperability
• The timing is right

3
Web Fundamentals
•Key Architectural Components
• Identification: URI
• Interaction: HTTP
• Standardized Document Formats: HTML,
XML, JSON, etc

4
Resource Representation

5
Web(API)
• Application Programming Interface
• Specifies how software components communicate
with each other
• e.g., Java API, 3rd party library APIs
• usually come with documentation
• Web API: specify how applications communicate
with other over the Web (HTTP, URI, XML, etc.)

• Web Applications == Web Services == Web APIs ?

6
• Web Applications are designed to be
accessed by end users through Web client
software
• Web Services are intended to be used
by other software applications

• Web APIs ≈ Web Services

7
•Example operations:
• Publish image on Flickr
• Order a book at Amazon
• Post a message on your friend’s Facebook wall

8
Web Services
• Cloud computing fosters the vision
“ Everything as a service(XaaS): Infrastructure,
platform, services and applications.
• The entire IT computing stack- from
infrastructure to applications- can be
composed by relying on Cloud computing
services.

9
Web Service: Definition
• The term “web service” is often referred to a
self-contained, self-describing, modular
application designed to be used and accessible
by other software applications across the web.
• Once a web service is deployed, other
applications and other web services can
discover and invoke the deployed service

10
What is a Web Service: A Simpler Definition
• A Web Service is a standards-based way for an
application to call a function over a network
and to do it without having to know:
– the location where the function will be executed,
– the platform where the function will be run,
– the programming language it is written in, or
even who built it.

11
Web Services: 3 Things at the core
• Discovery: Where is the service
• Description:
– What services does it offer?
– How do I use it?
• Messaging:
– Let’s Communicate

12
Web Services Interaction

13
Figure: A simple web service interaction among provider,
user, and the UDDI registry.

14
Web Service: W3C definition
• In fact, a web service is one of the most common
instances of an SOA implementation.
• W3C working group defines a web service as a
software system designed to support
interoperable machine-to-machine interaction
over a network.
• According to this definition, a web service has an
interface described in a machine-executable
format (specifically Web Services Description
Language or WSDL).

15
• Other systems interact with the web service in
a manner prescribed by its description using
SOAP messages, typically conveyed using
HTTP with an XML serialization in conjunction
with other web-related standards. The
technologies that make up the core of today’s
web services are as follows:

16
SOAP(Simple Object Access Protocol)
• SOAP used to stand for Simple Object
Access Protocol
• SOAP is a communication protocol
• SOAP is designed to communicate via
Internet
• SOAP is based on XML
• SOAP is simple and extensible
• SOAP is platform and language independent
• SOAP is a W3C standard

17
SOAP

18
WSDL
• WSDL stands for Web Services
Description Language
• WSDL is used to describe and locate Web
Services
• WSDL is based on XML
• WSDL is a W3C standard

19
WSDL
• Describes three fundamental properties
• What a service does
• Operations (methods) provided by the service
• How a service is accessed
• Data format and protocol details
• Where a service is located
• Address (URL) details

20
WSDL Document Structure

21
UDDI(Universal Description, Discovery and Integration)

• UDDI stands for Universal Description, Discovery and


Integration
• UDDI a standard for publishing and discovering Web
services
• UDDI is a specification for a distributed registry of
Web services
• UDDI is built upon standards such as HTTP, XML,
XML Schema, SOAP, WSDL
• UDDI can communicate via SOAP, CORBA, Java RMI
Protocol
• UDDI uses WSDL to describe interfaces to Web
Services
22
Ways to use UDDI
• White pages
– – name, address, contact person, Web site
• Yellow pages
– – types of business, locations, products,
services, categorizations
• Green pages
– – technical information about business
services, pointers to WSDL descriptions of the
services

23
Publish Subscribe Model
• In the past few years, with the tremendous
development of Internet and rapid growth of
information, more and more Internet
applications require information
dissemination among a large number of
widely scattered entities.
• In this environment, thousands or even
millions entities are distributed globally and
their locations and behaviors may vary.

24
• A pub/sub system enables information
dissemination from publishers (data/event
producers) to subscribers (data/event
consumers) in large-scale distributed
networks.
• This pub/sub technology was invented by
Frank Schmuck, who probably should get the
credit as the first person to ever invent a fully
functional pub- /sub solution

25
• Pub/sub systems have been applied to a wide
range of group communication applications
including software distribution, Internet TV,
audio or video-conferencing, virtual
classroom, multi-party network games,
distributed cache update, distributed
simulation and shared white-boards.

26
• A pub/sub system is composed of many nodes
distributed over a communication network. In such a
system, clients are autonomous entities that exchange
information by publishing events and by subscribing to
the classes of events they are interested in.
• Clients are not required to communicate directly
among themselves but are rather decoupled: the
interaction occurs through the nodes of the pub/sub
system that coordinate themselves in order to route
information from publishers to subscribers

27
Figure: A high-level view of a pub/sub system

28
• In the system, publishers produce information
and subscribers consume information.
Specifically, publishers publish information in
the form of events and subscribers express
their interests in an event or a pattern of
events in the form of subscription filters. A
data event specifies values of a set of
attributes associated with the event

29
• The subscriptions can be very expressive and
specify complex filtering criteria by using a set of
predicates over event attributes. When a pub/sub
system receives an event published by a
publisher, it matches the event to the
subscriptions and delivers the event to the
matched subscribers.
• A subscriber installs and removes a subscription
from the pub/sub system by executing the
subscribing and unsubscribing operations
respectively.

30
Important Questions
Q1. Explain publish subscribe model. List two examples
Q2. Define web services as per w3c.
Q3. Describe SOAP.
Q4. Describe ways to use UDDI.
Q5. Explain web services interaction.

31
References
• Text Books:-
1. Kai Hwang, Geoffrey C. Fox, Jack G. Dongarra,
“Distributed and Cloud Computing, From
Parallel Processing to the Internet of Things”,
Morgan Kaufmann Publishers, 2012.

32
Thank You

33
RESTful Web Services
• Platform independent.
• Language independent.
• Work on HTTP protocol.
• Flexible and easily extendible.
• They also have some constraints or principles.
▪ Client-Server
▪ Stateless
▪ Cacheable
▪ Uniform Interface
▪ Layered System
▪ Code on Demand

34
Client-Server
• Seperation of concerns.
• Client and server are independent from eachother.
• Client doesn’t know anything about the resource which is kept in the
server.
• Server responds as long as the right requests come in.
• Goal: Platform independency and to improve scalability.

35
Stateless
• Each request is independent from other requests.
• No client session data or any context stored on the server.
• Every request from client stores the required information, so that the
server can respond.
• If there are needs for session-specific data, it should be held and
maintained by the client and transferred to the server with each request
as needed.

36
Cacheable
• HTTP responses must be cacheable by the clients.
• Important for performance.
• If a new request for the resources comes within a while, then the
cached response will be returned.

37
Uniform Interface
• All resources are accessed with a generic interface (HTTP-based).
• This makes it easier to manage the communication.
• By the help of a uniform interface, client and server
evolve independently from eachother.

38
Layered System
• There can be many intermediaries between you and the
server you are connecting to.
• Actually, a client does not know if it is connected to
the last server or an intermediary server.
• Intermediaries may improve performance by caching and
message passing.
• Intermediary servers can increase scalability by
load-balancing and can force clients to form some sort of
security policies.
• This structure can be used when encapsulation is needed.

39
Code on Demand
• Servers can send some kind of executable scripts to
the client-side in order to increase or change the
functionality on the client side.
• This may cause low visibility, so it is the only optional
• constraint.
• EXAMPLE
• ...
• <head>
• <script src="utility.js"
type="text/javascript"
> 40
Example: RESTful Web Service in Amazon S3 Interface
• A good example of RESTful web service application in
high-performance computing systems is the Amazon
Simple Storage Service (S3) interface.
• Amazon S3 is data storage for Internet applications.
• It provides simple web services to store and retrieve
data from anywhere at any time via the web.
• S3 keeps fundamental entities, “objects,” which are
named pieces of data accompanied by some metadata
to be stored in containers called “buckets,” each
identified by a unique key.

41
• Buckets serve several purposes:
• They organize the Amazon S3 namespace at the
highest level, identify the account responsible for
storage and data transfer charges, play a role in
access control, and serve as the unit of
aggregation for usage reporting.
• Amazon S3 provides three types of resources: a
list of user buckets, a particular bucket, and a
particular S3 object, accessible through
https://s3.amazonaws.com/{name-of-bucket}/{na
me-of-object}.

42

You might also like