Service-Orinted Computing
Download
Report
Transcript Service-Orinted Computing
CIS*6650.01
Service-Oriented Computing
Course Information & Overview
Qusay H. Mahmoud, Ph.D.
[email protected]
Qusay H. Mahmoud
CIS*6650.01
1
Course Information
Course URL :
http://www.cis.uoguelph.ca/~qmahmoud/teaching.html
Lectures: Tue 1:00 – 4:00pm (10-min
break every 50 minutes)
Book: No single book covers all topics
– On reserve at McLaughlin library (2-hr inlibrary use): Service-Oriented Computing:
Semantics, Processes, Agents
– Check course homepage for online resources
Qusay H. Mahmoud
CIS*6650.01
2
Grading Scheme
Assignments (40%)
– Programming assignment (10%)
– Write a short paper (15%), and present it (5%)
– Reading research paper, critique(5%), presentation (5%)
Midterm (15%): Tue, Feb 27 (1-hr)
Project (45%)
–
–
–
–
Project idea and initial design (5%)
Implementation/Performance evaluation (15%)
Presentation & Demo (10%)
Final paper (15%)
Qusay H. Mahmoud
CIS*6650.01
3
Goals
This is a systems course (skills)
Understand the fundamentals of SOA, Web
Services, SOC, and related standards
Learn about “some” of the technologies that
can be used to develop SOC applications
Learn about research challenges
Work effectively in groups to develop a
significant SOC system, or a solution to a
challenging problem
Qusay H. Mahmoud
CIS*6650.01
4
Course Content
Distributed Paradigms
Service-Oriented Architecture
Service-Oriented Computing
Web Services (1st&2nd generation standards)
Interoperability, agents
Service Composition, Coordination, Transactions
Semantic Web and Ontologies
Wireless Web Services
Security and Trust
Service-Centric Engineering
Qusay H. Mahmoud
CIS*6650.01
5
Limitations
Too many 2nd generation specifications
We will not be able to cover all topics in
details
For some topics, the course is more like an
eye opener
Do not expect to become an expert in every
single topic that we will cover
It is almost impossible to master all the
technologies for service-oriented computing
or even just Web Services (i.e. the focus is
not on the tools)
Qusay H. Mahmoud
CIS*6650.01
6
Towards Network Computing
The evolution of computing?
– Stand-alone computers
– Mainframes
– PCs
– C/S Computing
– Network Computing
The Internet (and Web) factor
The Java factor
The network is the computer
Qusay H. Mahmoud
CIS*6650.01
7
Client/Server Computing
Processing distributed between nodes
(front-end or client, and back-end or
server)
Monolithic programs are divided into two
parts:
– Client & Server
Client applications run on local machines
Server applications run on centralized
machines
Qusay H. Mahmoud
CIS*6650.01
8
The Internet factor
Attempts to inter-connect all private and
public networks together
DARPA’s IP is the de-facto standard for
exchanging data between different networks
TCP is the de-facto standard transport
protocol over IP (combo as TCP/IP)
Classical applications: email, file transfer,
remote login
Qusay H. Mahmoud
CIS*6650.01
9
The Web factor
What is the most useful piece of software of
the 1990’s (and even today)? The browser!
The browser is becoming more or less an
operating system (or the computing platform)
for many users
Traditional network applications (e.g. email)
have been incorporated in the browser
New business opportunities emerged (ecommerce)
New technologies to address challenges (e.g.
search engines)
Qusay H. Mahmoud
CIS*6650.01
10
The Java factor
Portability
Platform independent
Java bytecodes can be executed on any
computer with a JVM
Web browsers implement the JVM
Possible to enhance Web pages (applets)
Remote objects can be upgraded online by
pushing new bytecodes to the hosting JVM
– Corel’s attempt with WordPerfect in 1997
(software as a service?)
Qusay H. Mahmoud
CIS*6650.01
11
Distributed Computing Paradigms
Technologies for building distributed apps
– Sockets
– Remote procedure calls (RPC)
– Java RMI (Remote Method Invocation)
– CORBA (and DCOM)
– Mobile agents
Qusay H. Mahmoud
CIS*6650.01
12
Sockets
BSD sockets (early 1980s)
Analogous to telephones – provide the
developer with an interface to the network
Think of a socket as an end point of a Unix
pipe
Used in the same way as a file descriptor:
– Creation (open socket)
– Read/write (receive/send to socket)
– Destruct (close socket)
Types: SOCK_STREAM, SOCK_DGRAM,
SOCK_RAW
Qusay H. Mahmoud
CIS*6650.01
13
Remote Procedure Calls
Sun Microsystems developed the Open
Network Computing RPC (1987) –
communication mechanism for NFS
A remote function could be invoked as if it
were a local one
Open Software Foundation’ DCE
(Distributed Computing Environment) 1989
Microsoft RPC initiative based on
DCE/RPC (1990)
Qusay H. Mahmoud
CIS*6650.01
14
CORBA
Common Object Request Broker
Architecture (OMG, 1991)
A specification for creating and using
distributed objects
It is not a programming language
Qusay H. Mahmoud
CIS*6650.01
15
Java RMI
RMI is a core package of Java 1.1+
The power of Java interfaces (no
protocols)
Methods can be invoked from JVMs,
possibly running on remote hosts
Qusay H. Mahmoud
CIS*6650.01
16
CORBA vs. RMI
Interfaces in IDL
Languageindependent
Heterogeneous
language
environment
Garbage collector
(No)
In, out, inout
parameters
Pass by reference
Qusay H. Mahmoud
CIS*6650.01
Interfaces in Java
Java-based
Homogenous
language
environment
Garbage collector
(Yes)
No such parameters
Pass by copy (local
objects), by reference
to stub (remote
objects)
17
Summary of Distributed Paradigms
Socks
– too low-level mechanism
RMI
– Java-to-Java object distribution
– Java-specific (not language-neutral)
– RMI-IIOP: depends on CORBA for communication and
Java-specific interfaces
CORBA
– OMG standard, language-neutral
– Interoperability issues (no guarantee vendors would
implement the full specification)
DCOM
– Microsoft distributed object technology
– Windows-specific
Qusay H. Mahmoud
CIS*6650.01
18
Agents
An agent is an entity that:
– Acts on behalf of others in autonomous
fashion
– Proactive Reactive
– Exhibits some levels of the key attributes of
learning, cooperation, mobility (mobile
agents)
Qusay H. Mahmoud
CIS*6650.01
19
The Web
Designed for people to share information: human to
machine interaction
Source: http://www.w3.org/2003/Talks/0521-hh-wsa/slide2-0.html
First generation Web: static HTML
Second generation Web: dynamic HTML, Web-based
services
– 2.5G: AJAX?
Third generation Web: Web services
Fourth generation Web: Semantic Web Services
Qusay H. Mahmoud
CIS*6650.01
20
CGI (Common Gateway
Interface)
Server-side technology
Mainly used to interpret fill-out forms
CGI scripts can be written in any language
Acts as a gateway between output/input
Environment variables:
– REMOTE_HOST, REMOTE_ADDR
– CONTENT_TYPE, CONTENT_LENGTH
– QUERY_STRING
Stateless
Qusay H. Mahmoud
CIS*6650.01
21
Servlets
Server-side technology
Designed to overcome some limitations of
existing technologies (e.g. CGI is stateless)
Characteristics:
– A light-weight task that can be executed as a
thread
– A servlet can remain in memory (a CGI script
terminates when it finished)
Advantages:
– A servlet can service multiple client requests
– Can handle multiple clients without re-initializing
Qusay H. Mahmoud
CIS*6650.01
22
JSP (Java Server Pages)
Server-side technology
Enables you to embed Java code within an
HTML document
When an HTTP request is received, the
compilation engine converts the JSP
document into a Java Servlet then the servlet
will be loaded
Qusay H. Mahmoud
CIS*6650.01
23
XML (eXtensible Markup Language)
A meta-language used to define documents
containing structured data
A simple and extensible subset of SGML to
capture new vocabularies
XML vs. HTML
– Markup languages (tags used to annotate data)
– In HTML, the syntax and semantics of a document
are defined (can be used alone to create
presentation). XML allows you define doc syntax
– HTML docs are not well-formed (not all tags have
end tags). XML is well-formed
– In XML, tag names are case sensitive (not in HTML)
Qusay H. Mahmoud
CIS*6650.01
24
Features and Benefits of XML
Extensibility: XML can be used to create other
markup languages
Precise structure: HTML suffers from poor
structure (difficult to process effectively). XML
documents are well structured
– Each element has a root and all elements must be
nested within other elements
Powerful extensions: XML used to define
syntax or content, other languages are needed
to define semantics, style, or presentation
Qusay H. Mahmoud
CIS*6650.01
25
XML Document Types
Two types:
– Valid document: Defined by a Document Type
Definition (DTD) – grammar of the document that
defines what kind of elements, attributes, and
entities can be in a document
– Well-formed document: Doesn’t have to adhere
to a DTD, but must follow two rules:
1) Each element must have open&closed tag
2) There must be one root element that contains
all other elements
Qusay H. Mahmoud
CIS*6650.01
26
XML
Sample XML document
Qusay H. Mahmoud
CIS*6650.01
27
XML Namesapces
The freedom to define arbitrary tag names can
become a problem
– Two or more parties use XML to exchange information, but
could use the same tag to refer to different things (sol: use
namespaces)
A namespace is declared: prefix, element and URI:
<wsdl: definitions
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/>
– Any child element can use the defined prefix
– QualifiedName (QName) is the prefix + element/attribute
Qusay H. Mahmoud
CIS*6650.01
28
XML Namespaces
Source: IBM
Without namespaces, the processor cannot distinguish between the
two <binding> elements
Qusay H. Mahmoud
CIS*6650.01
29
Presenting XML Documents
stocks.xml in a browser
Qusay H. Mahmoud
CIS*6650.01
30
Displaying XML Nicely
Apply a transformation on the XML document
– To extract the data, or
– To create a new format (XML to HTML)
Can be done using a transformation language
– Extensible Stylesheet Transformation Language
(XSLT), which is part of XSL
Two parts to XSL
– Transformation language (XSLT)
– Formatting language (XSL formatting objects)
Qusay H. Mahmoud
CIS*6650.01
31
Transformation
XSL Stylesheet (stocks.xsl)
Qusay H. Mahmoud
CIS*6650.01
32
XSL Stylesheet
XSL syntax
To apply xsl to stocks.xml, change first line to:
<?xml:stylesheet type=“text/xsl”
href=“./stocks.xmls”> version…etc?>
Qusay H. Mahmoud
CIS*6650.01
33
Parsing XML
1) Simple API for XML (SAX)
– It is not a parser, but a standard interface
– Developed by members of the XML-DEV mailing list
(now hosted by OASIS)
– It is lightweight and fast (because it is event-based
– reports parsing events directly to app using
callbacks)
Qusay H. Mahmoud
CIS*6650.01
34
Parsing XML
2) Document Object Model (DOM)
– A platform- and language-neutral interfaces
for accessing and updating XML documents
– Uses a tree structure, composed of element
nodes and text nodes
– Tree is built in memory (but it is simpler to
program than SAX).
Qusay H. Mahmoud
CIS*6650.01
35
Transforming XML
Transform XML into any desired format
A transformation engine takes an XML
document and applies the XSL to create a
new document format
Qusay H. Mahmoud
CIS*6650.01
36
The Stocks Example
The example on the previous slides and all
source code can be found at the following
URL; ignore the JSP stuff if you wish…
http://java.sun.com/developer/technicalArti
cles/xml/WebAppDev2/
Qusay H. Mahmoud
CIS*6650.01
37
XML Schema
XML Schema allows you define and constrain
the content of an XML document (alternative to
DTD – Document Type Definition)
– You can define custom types
– You can define simple and complex types
It is a document created using the XML
schema definition language (XSD)
Qusay H. Mahmoud
CIS*6650.01
38
XML Schema
Example from
w3schools.com/schema
Qusay H. Mahmoud
CIS*6650.01
39
Jini
Pronounced “Gee-nee”
A network infrastructure on top of Java to
create a “federation” of virtual machines
Discovery/Join/Lookup Protocols
Qusay H. Mahmoud
CIS*6650.01
40
Service-Oriented Architecture
(SOA)
It is an architectural style for building software
applications based on services available on a
network such as the Web
A service is an implementation of a well-defined
business functionality (can be consumer by clients
in other applications)
SOA promotes loose coupling between components
(for reuse)
Allows businesses to reuse existing applications,
and promises interoperability between apps and
technologies
Qusay H. Mahmoud
CIS*6650.01
41
SOA
Uses the “find-bind-execute” paradigm
Qusay H. Mahmoud
CIS*6650.01
42
SOA
Provides a new level of flexibility, meaning:
– Services are software components with welldefined interfaces (implementation-independent)
– Services are self-contained (perform predetermined tasks) and loosely coupled (for
independence)
– Services can be dynamically discovered
– Composite services can be built from aggregates
of other services
Qusay H. Mahmoud
CIS*6650.01
43
Principles forming the baseline
foundation for SOA
Services are loosely coupled
Services are autonomous
Services share a formal contract
Services abstract underlying logic
Service are composable
Services are stateless
Services are reusable
Services are discoverable
Qusay H. Mahmoud
CIS*6650.01
44
Extended SOA
Basic SOA didn’t address concerns such as
management, orchestration, transaction and
coordination, security, and others.
Source: Mike P. Papazoglou, Service-Oriented Computing: Concepts, Characteristics and Directions
Qusay H. Mahmoud
CIS*6650.01
45
Web Services
Machine to machine interaction
Source: http://www.w3.org/2003/Talks/0521-hh-wsa/slide3-0.html
SOA can be realized with Web Services
Qusay H. Mahmoud
CIS*6650.01
46
What is a Web Service?
(W3C): A Web service is a software system identified
by a URI, whose public interfaces and bindings are
defined and described using XML. Its definition can
be discovered by other software systems. These
systems may then interact with the Web service in a
manner prescribed by its definition, using XML based
messages conveyed by Internet protocols (w3C)
(Microsoft): A piece of business logic accessible via
the Internet using open standards
(): Web services are application components that are
designed to support interoperable machine-tomachine interaction over a network. This
interoperability is gained through a set of XML-based
open standards
Qusay H. Mahmoud
CIS*6650.01
47
Web Services Standards
Basic Standards (first generation)
Service registry and discovery (UDDI)
Service Description (WSDL)
XML-based Messaging (SOAP)
Network (HTTP, FTP, e-mail)
WSDL: Web Service Description Language
SOAP: Simple Object Access Protocol
UDDI: Universal Description, Discovery, and
Integration
Qusay H. Mahmoud
CIS*6650.01
48
Overview of Lifecycle
Invoking web services…
Source: http://web-services.gov/7
Qusay H. Mahmoud
CIS*6650.01
49
Service-Oriented Computing
A computing paradigm that utilizes services
as fundamental elements for developing
applications
Services perform functions (simple requests
or complicated business process)
Services can be “simple” or “composite”.
Composite services assemble existing
services to offer high-level functionality
Automatic service composition is a major
challenge
Qusay H. Mahmoud
CIS*6650.01
50
Software-as-a-Service (SaaS)
Enterprise software is being transformed from
an installed product to a hosted service
Customer pays on a subscription or pay per
use basis to access functionality using web
browser or other clients
Corel tried this (more or less) in 1997 with
WordPerfect
Qusay H. Mahmoud
CIS*6650.01
51
Software-as-a-Service
Benefits:
– Reduced acquisition and maintenance costs
(customer)
– Scalability and QoS is responsibility of service
provider (customer)
– Easier support and maintenance (service provider)
Downside
– Security: confidential info visible to others
(customer)
– Availability and reliability are harder to guarantee
(service provider)
Qusay H. Mahmoud
CIS*6650.01
52