520 likes | 611 Views
CIS*6650.01 Service-Oriented Computing. Course Information & Overview Qusay H. Mahmoud, Ph.D. qmahmoud@uoguelph.ca. Course Information. Course URL : http://www.cis.uoguelph.ca/~qmahmoud/teaching.html Lectures: Tue 1:00 – 4:00pm (10-min break every 50 minutes)
E N D
CIS*6650.01Service-Oriented Computing Course Information & Overview Qusay H. Mahmoud, Ph.D. qmahmoud@uoguelph.ca CIS*6650.01
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 in-library use): Service-Oriented Computing: Semantics, Processes, Agents • Check course homepage for online resources CIS*6650.01
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%) CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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) CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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 (e-commerce) • New technologies to address challenges (e.g. search engines) CIS*6650.01
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?) CIS*6650.01
Distributed Computing Paradigms • Technologies for building distributed apps • Sockets • Remote procedure calls (RPC) • Java RMI (Remote Method Invocation) • CORBA (and DCOM) • Mobile agents CIS*6650.01
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 CIS*6650.01
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) CIS*6650.01
CORBA • Common Object Request Broker Architecture (OMG, 1991) • A specification for creating and using distributed objects • It is not a programming language CIS*6650.01
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 CIS*6650.01
Interfaces in IDL Language-independent Heterogeneous language environment Garbage collector (No) In, out, inout parameters Pass by reference 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) CORBA vs. RMI CIS*6650.01
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 CIS*6650.01
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) CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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) CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
XML • Sample XML document CIS*6650.01
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 CIS*6650.01
XML Namespaces Source: IBM • Without namespaces, the processor cannot distinguish between the two <binding> elements CIS*6650.01
Presenting XML Documents • stocks.xml in a browser CIS*6650.01
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) CIS*6650.01
Transformation • XSL Stylesheet (stocks.xsl) CIS*6650.01
XSL Stylesheet • XSL syntax • To apply xsl to stocks.xml, change first line to: <?xml:stylesheet type=“text/xsl” href=“./stocks.xmls”> version…etc?> CIS*6650.01
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) CIS*6650.01
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). CIS*6650.01
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 CIS*6650.01
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/technicalArticles/xml/WebAppDev2/ CIS*6650.01
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) CIS*6650.01
XML Schema • Example from w3schools.com/schema CIS*6650.01
Jini • Pronounced “Gee-nee” • A network infrastructure on top of Java to create a “federation” of virtual machines • Discovery/Join/Lookup Protocols CIS*6650.01
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 CIS*6650.01
SOA • Uses the “find-bind-execute” paradigm CIS*6650.01
SOA • Provides a new level of flexibility, meaning: • Services are software components with well-defined interfaces (implementation-independent) • Services are self-contained (perform pre-determined tasks) and loosely coupled (for independence) • Services can be dynamically discovered • Composite services can be built from aggregates of other services CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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 CIS*6650.01
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-to-machine interaction over a network. This interoperability is gained through a set of XML-based open standards CIS*6650.01
Web Services Standards • Basic Standards (first generation) • WSDL: Web Service Description Language • SOAP: Simple Object Access Protocol • UDDI: Universal Description, Discovery, and Integration Service registry and discovery (UDDI) Service Description (WSDL) XML-based Messaging (SOAP) Network (HTTP, FTP, e-mail) CIS*6650.01
Overview of Lifecycle • Invoking web services… Source: http://web-services.gov/7 CIS*6650.01
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 CIS*6650.01