transparencies
Download
Report
Transcript transparencies
1
Service oriented computing
Gergely Sipos, Péter Kacsuk
www.lpds.sztaki.hu
2
Progress in Grid Systems
Supercomputing
(PVM/MPI)
Clusters
Network
Computing (sockets)
Cluster
computing
Web Computing
(scripts)
OO Computing
(CORBA)
Client/server
High-throughput
computing
High-performance
computing
Object Web
Condor
Globus
Web Services
OGSA
Semantic Grid
Grid Systems
3
Context:
Open Grid Services Architecture
• Define a service-oriented architecture …
– the key to effective virtualization
• … to address vital “Grid” requirements
– on-demand, system management, collaborative
computing
• … building on Web services standards
– extending those standards where needed
4
Open Grid Services Architecture
(www.ggf.org/ogsa-wg)
Standardization
Domain-Specific Services
Program
Execution
Data Services
Core Services
Open Grid Services Infrastructure
Web Services Messaging, Security, Etc.
5
Grid Service technology
• Two basic components:
– OGSA (Open Grid System Architecture)
– OGSI (Open Grid Services Infrastructure)
• An extension of the WS technology
• Focuses on dynamic service behaviour:
– service factories
– lifetime management
– notification framework
• Prepare WSes for Grid environments
• www.ggf.org
6
Roots of OGSA/OGSI
Globus
Web Services
OGSA
7
Roots of OGSA/OGSI
• The Globus toolkit:
– GRAM
– GridFTP
– MDS-2
– GSI
• Web services:
– SOAP (Simple Object Access Protocol)
– WSDL (Web Services Description
Language)
8
The Globus model
Resource
description
GIIS (MDS-2)
Publish
MDS-2 API
(configuration description)
Resource
requestor
GRAM API
Resource
provider
Your program moves to resource(s)
Security is a serious problem!
9
The Web services model
Service
description
Service
registry
Find
(WSDL, UDDI)
Service
requestor
Publish
(WSDL, UDDI)
Bind
Service
provider
(SOAP)
Predefined programs (services) wait for your invocation
Much more secure than the Globus concept
10
Moving from Globus to OGSA
Globus toolkit
OGSA mechanism
GRAM GridFTP
MDS-2
HTTP
LDAP
FTP
GRAM GridFTP
MDS-2
Grid Services Abstraction
TLS/GSI
SOAP+TLS/GSI Other transports
IP
IP
11
Basic features of OGSA
• Objectives: to integrate services across
– distributed
– heterogeneous
– dynamic “virtual organizations” (VO)
• Solution scheme:
– defines standard mechanisms for creating,
naming, and discovering transient Grid service
instances
– provides location transparency and multiple
protocol bindings for service instances
– Supports integration with underlying native
platform facilities
12
Web services
• Web services define a technique
– For describing software components to be accessed
– Methods for accessing these components
– Discovery methods that enable the identification of
relevant service providers
• Web services standards are being defined within the
W3C (World Wide Web Consortium) and other
standard bodies and form the basis for major new
industry initiatives such as
– Microsoft .Net
– IBM Dynamic e-Business
– Sun One
13
Simple Object Access Protocol
(Service-Oriented Access Protocol)
Service requester
Service provider
SOAP: XML over HTTP
• SOAP provides a means of messaging between a
service provider and a service requester.
• SOAP is a simple enveloping mechanism for XML
payloads that defines an RPC convention.
• SOAP is independent of the underlying transport
protocol
• SOAP payloads can be carried on HTTP, FTP, Java
Messaging Service (JMS) and the like.
14
Simple Object Access Protocol
Service requestor
Service provider
SOAP: XML over HTTP
SOAP messages are XML documents, usually sent over HTTP
A simple XML document:
<invoice id = ‘12345’>
<item> ball <\item>
<amount> 400 <\amount>
<\invoice>
15
Standards and Protocols - SOAP
(Simple Object Access Protocol)
Protocol for messaging and RPC-style communication
between applications and services
XML-based
Uses common Internet transport protocols (HTTP,
SMTP, FTP, MQ, etc.)
SOAP elements:
HTTP header
SOAP envelope
SOAP header
SOAP body
http://www.w3.org/TR/SOAP/
16
SOAP container
Service provider
XML over HTTP
Soap
container
Native call
Service
• The easiest way to publish a sw component as a web service is
to use a Soap container which
– Accepts incoming requests
– Dispatches them to published components
– Translates them to the component’s native language interface
• Soap containers are available for Java, C++, Perl, etc.
17
Standards and Protocols - SOAP
XML messaging using SOAP:
Application
(Web service)
Application
(Requestor)
SOAP
SOAP
Network protocol
2
3
4
1
Response
Request (service invocation)
Network protocol
18
Role of WSDL
Client
Server
1. Fetch WSDL
WSDL
2. Invoke service using SOAP
Service
A client needs WSDL before invoking service
• SOAP clients read a WSDL file to get
– the address
– and message information of a web service.
SOAP containers automatically generate WSDL, so developers
don’t have to write WSDL manually.
• Once the WSDL file is read, the client can start sending SOAP
messages to the web service.
19
Standards and Protocols - WSDL
Used by the service provider to describe a service
XML-based
Describes
what a web service can do
where it resides
how to invoke it
Components:
Messages (corresponds to messages between the client and service)
PortType (corresponds to operations)
Binding (corresponds to a portType implemented by a specific
protocol as SOAP or CORBA)
Service (collection of ports)
http://www.w3.org/TR/wsdl/
20
Standards and Protocols - UDDI
(Universal Description, Discovery and Integration Service)
A standard that allows information about businesses
and services to be electronically published and queried
a “meta service” for locating web services by enabling
robust queries against rich metadata
to find a WS of a particular provider
to find providers that offer a required WS
Under development! UDDI is evolving fairly rapidly.
http://www.uddi.org/
21
Usage of a Web Service
service data
of the
requested WS
Client
URI
stub
HTTP get
Enough
information to
use the WS.
May change
during WS
lifetime.
UDDI
registry
Globally unique
ID of the WS.
Belongs to it
„forever”.
WSDL
doc.
service
data
elements
URI
WS provider
XML file
SOAP/HTTP
message
22
OGSA and Web Services Technology
• OGSA (Grid) services are described as WSDL
interfaces:
– which defines the method names, parameters, and
their types for Grid service access
– A new tag gsdl has been added to WSDL for Grid
service description
• The UDDI registry and WSIL document are used to
locate Grid services.
• The transport protocol SOAP is used to access Grid
services.
23
Components of a Grid Service
• The Grid service is a special Web service that provides
– a set of well-defined interfaces (Open Grid Service Interface)
– that follow specific conventions (for naming and upgrading)
• The interfaces of Grid services are for:
– Discovery and service characterization (a variety of
information about the Grid service instance)
– Lifetime management of transient service instances
• SoftStateDestruction (set and get termination time for
Grid service instance)
• ExplicitDestruction (terminate Grid service instance)
– Registry (conduct soft-state registration of Grid service
handles)
– Factory (gatekeeper) (create new Grid service instance)
– Handle mapping (return Grid service reference)
– Notification (subscribe to notifications of service-related
events)
– Manageability (support remote management of Grid service
instances)
24
Grid-service
MUST implement a serviceType that aggregates:
the Grid Service portType
zero or more other OGSI defined portTypes
discovery
dynamic service creation
notification
manageability
one or more portTypes that define domain specific
behavior
25
OGSA/OGSI adds to WS technology
• PortType definitions:
– GridService: every GS must implement
– Factory: GS factories must implement
– HandleMap: to find a new GSR (Grid Service
Reference) if the old expires
• Service lifetime management
• Notification framework
26
Implementation of OGSA
• The standard interface of a Grid service includes
multiple bindings and implementations such as
– Java
– C#
• Such Grid services can be deployed on different
hosting environments (even different operating
systems).
• OGSA also provides a Grid security mechanism to
ensure that all the communications between
services are secure.
• The basic idea of OGSA:
Grid structure + Web services + Toolkit
27
Semantics of a Grid service interface
• OGSA enables application programs and application
users
– to create transient services
– to discover and evaluate the properties of available Grid
services
• The OGSA
–
–
–
–
Factory
Registry
Grid Service
and HandleMap interfaces
cover the aspects of the
– creation of transient Grid service instances
– the service discovery
– characterization in a virtual organization
28
Semantics of a Grid service interface
• OGSA defines the semantics of a Grid service
instance including
– service instance creation
– Naming
– lifetime management
– communication protocols.
• The creation of a new Grid service instance =>
creation of a new process in the hosting
environment
• Multiple Grid service instances may correspond
to the same Grid service interface
29
Usage of a Grid Service
service data
of the
requested GS
Client
Customise
the GS
GSH instance
request
UDDI
registry
service
data
elements
Practically a
URI
GSH
GS
Factory
XML file
SOAP/HTTP
message
30
Factory PortType
Creation of new Grid-service instances
Operation:
Factory :: CreateService
creates a new Grid service instance
returns a GSH (Grid Service Handle) and a GSR
(Grid Service Reference) for the instance
supports soft state lifetime management
CurrentTerminationTime
MaximumExtension
implementation is not specified in OGSA
31
Usage of a Grid Service
UDDI
registry
service data
of the
requested GS
Client
stub
GSH
request
GSR
Practically a
WSDL doc.
GSH
service
data
elements
GSH
GS
Factory
GS
instance
XML file
SOAP/HTTP
message
32
GSH and GSR
GSH: Grid Service Handle
globally, uniquely and for all time identifies a Grid-service
instance (URI)
not enough information to invoke the service
GSR: Grid Service Reference
protocol and instance specific information
network address
supported protocol bindings
can change – expiration time
in case of a SOAP binding WSDL
GSH to GSR mapping is required
33
HandleResolver PortType
Takes a GSH and returns a valid GSR
Steps:
identifying home HandleResolver – included in GSH
contacting the HandleResolver to obtain the GSR
relationship between Factory and HandleResolver
Operation:
HandleResolver :: FindByHandle
GSH GSR
34
Goal of the HandleMap GSs
HandleMap
GS
Client
GSH
GSR
stub
GS
instance
35
Goal of the HandleMap GSs
Must contain
information
about the
“home
HandleMap”
Client
GSH
GSR
stub
Valid no more
HandleMap
GS
GSR
New
functionalities
added
GS
instance
36
GS lifetime management
GS
Factory
request
GSH
Client
GSR
initial lifetime
stub
„Keepalive” request
To avoid „soft”
service termination
GS
instance
37
GS lifetime management
GS
Factory
request
GSH
Client
GSR
initial lifetime
stub
Termination request
GS
instance
Methods for lifetime management are part of the GridService portType!
Every GS is able to provide lifetime functionality
38
Notification
Delivering messages from Notification Source to
Notification Sink
NotificationSource PortType:
allows clients to subscribe to notification messages
operation: NotificationSource :: Subscribe
NotificationSink PortType: :
defines a single operation for delivering a notification message
operation:NotificationSink :: DeliverNotification
NotificationSubscription PortType:
a subscription causes the creation of a Subscription instance
used by clients to manage the lifetime of the subscription
39
Notification framework
Client
Notification
subscription
stub
GS instance
stub
Event message
Must implement
the
NotificationSink
portType
Must implement
the
NotificationSource
portType
XML file
SOAP/HTTP
message
40
OGSA does not define
• GS implementation details:
– Language
– How to generate SOAP messages
– What protocol to use for the stub-GS
communication
41
Application example:
data mining
• The environment initially comprises four
simple hosting environments:
– One that runs the user application
– One that encapsulates computing and storage
resources
– Two that encapsulate database services
R
User appl.
Storage
reservation
factory
ftp
Mining
service
factory
ftp
Storage
R
R
R
Database
service
Database
service
Storage
Storage
ftp
42
Application example:
data mining
• The user application invokes “create Grid service”
request on the two factories in the second hosting
environment:
– Requesting the creation of a “data mining
service”
– And an allocation of temporary storage
• Each request involves mutual authentication of the
user and the relevant factory followed by
authorization.
• The new data mining service instance is also
provided with delegated proxy credentials that
allow it to perform further remote operations on
behalf of the user.
43
Application example:
data mining
Create
mining
service
Storage
Mining
R
reservation
service
User appl.
factory
factory
Create storage
Storage
Mining service
reservation
ftp
reservation ftp
ftp
R
Storage
R
R
Database
service
Database
service
Storage
Storage
44
Application example:
data mining
• The data mining service
– uses its proxy credentials to start requesting data from
the two database services, placing information in local
storage
– Uses notification mechanisms to provide the user
application with periodic updates on its status.
• The user application
– Generates periodic “keepalive” requests to the Grid
services
R
User appl.
Keepalive
ftp
Status
update
notification
Storage
Mining
R
reservation
service
factory
factory
Storage
Mining service
reservation ftp
ftp
Storage
R
R
Database
service
Database
service
Storage
Storage
Query
45
Application example:
data mining
• The user application fails:
– The data mining computation continues
but there is no more “keepalive”
requests.
R
User appl.
ftp
Status
update
notification
Storage
Mining
R
reservation
service
factory
factory
Storage
Mining service
reservation ftp
ftp
Storage
R
R
Database
service
Database
service
Storage
Storage
Query
46
Application example:
data mining
• As a result the two Grid services
– time out and terminate, freeing the
storage and computing resources
R
User appl.
Storage
reservation
factory
ftp
Mining
service
factory
ftp
Storage
R
R
R
Database
service
Database
service
Storage
Storage
ftp