Web Services for Remote Portlets (WSRP) WSRP Kickoff Meeting March 18-20 2002 Dr. Carsten Leue Thomas Schäck Peter Fischer.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

18 Copyright © 2005, Oracle. All rights reserved. Distributing Modular Applications: Introduction to Web Services.
Overview Environment for Internet database connectivity
Web Service Architecture
MIT Lincoln Laboratory A Service-Oriented Approach to Application Development Robert Darneille & Gary Schorer WPI MQP Presentations ICS Group 10 October.
OASIS WSRP Technical Commitee Web Services for Remote Portlets (WSRP) Overview OASIS WSRP Technical Commitee September, 2003.
Web Service Ahmed Gamal Ahmed Nile University Bioinformatics Group
Apache Struts Technology
G O B E Y O N D C O N V E N T I O N WORF: Developing DB2 UDB based Web Services on a Websphere Application Server Kris Van Thillo, ABIS Training & Consulting.
The KB on its way to Web 2.0 Lower the barrier for users to remix the output of services. Theo van Veen, ELAG 2006, April 26.
Presentation 7 part 2: SOAP & WSDL. Ingeniørhøjskolen i Århus Slide 2 Outline Building blocks in Web Services SOA SOAP WSDL (UDDI)
6/11/2015Page 1 Web Services-based Distributed System B. Ramamurthy.
Wesley Budziwojski Senior Architect Sun ONE Portal Server Web Services for Remote Portlets, WSRP Jun/2003.
Servlets and a little bit of Web Services Russell Beale.
Chapter 12 Extending Web Applications. ASP.NET 2.0, Third Edition2.
Application Architectures Vijayan Sugumaran Department of DIS Oakland University.
1 Web Services Visual C# 2008 Step by Step Chapter 30.
1 Java Server Programming zLecture 1 focuses on: yIntroduction to web services y Web Services using Axis y The bigger Picture: Introduction to J2EE y Java.
UNIT-V The MVC architecture and Struts Framework.
INTRODUCTION TO WEB DATABASE PROGRAMMING
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 4 Web technologies: HTTP, CGI, PHP,Java applets)
A Scalable Application Architecture for composing News Portals on the Internet Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta Famagusta.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
SSC2: Web Services. Web Services Web Services offer interoperability using the web Web Services provide information on the operations they can perform.
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
SDPL 2002Notes 7: Apache Cocoon1 7 XML Web Site Architecture Example: Apache Cocoon, a Web publishing architecture based on XML technology
© 2006 IBM Corporation IBM WebSphere Portlet Factory Architecture.
1 HKU CSIS DB Seminar: HKU CSIS DB Seminar: Web Services Oriented Data Processing and Integration Speaker: Eric Lo.
J2EE Structure & Definitions Catie Welsh CSE 432
James Holladay, Mario Sweeney, Vu Tran. Web Services Presentation Web Services Theory James Holladay Tools – Visual Studio Vu Tran Tools – Net Beans Mario.
11 Web Services. 22 Objectives You will be able to Say what a web service is. Write and deploy a simple web service. Test a simple web service. Write.
Web Services Kanda Runapongsa Dept. of Computer Engineering Khon Kaen University.
1 ® Copyright 2009 Adobe Systems Incorporated. All rights reserved. Adobe confidential. 1 Building Portlets with ColdFusion Pete Freitag Foundeo, Inc.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Dr. Azeddine Chikh IS444: Modern tools for applications development.
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
Java Portals and Portlets Submitted By: Rashi Chopra CIS 764 Fall 2007 Rashi Chopra.
® IBM Software Group © 2007 IBM Corporation Best Practices for Session Management
1 Web Services Web and Database Management System.
XML and Web Services (II/2546)
Server-side Programming The combination of –HTML –JavaScript –DOM is sometimes referred to as Dynamic HTML (DHTML) Web pages that include scripting are.
Kemal Baykal Rasim Ismayilov
An Introduction to Web Services Web Services using Java / Session 1 / 2 of 21 Objectives Discuss distributed computing Explain web services and their.
JS (Java Servlets). Internet evolution [1] The internet Internet started of as a static content dispersal and delivery mechanism, where files residing.
Integrating Distributed End-User Experiences Business Scenarios and Use Cases Embedded Consumer.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
OASIS | November 16, 2003 Organization for the Advancement of Structured Information Standards OASIS OASIS | November 18, 2003 Web Services Remote Portlets.
Preface IIntroduction Objectives I-2 Course Overview I-3 1Oracle Application Development Framework Objectives 1-2 J2EE Platform 1-3 Benefits of the J2EE.
Intro to Web Services Dr. John P. Abraham UTPA. What are Web Services? Applications execute across multiple computers on a network.  The machine on which.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
July 28, 2004WSRF Technical Committee F2F meeting1 WSRP leveraging WSRF Use case for Portlets as WS-Resources.
.NET Mobile Application Development XML Web Services.
AJAX Use Cases for WSRP Subbu Allamaraju BEA Systems Inc WSRP F2F Meeting, May 2006.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Chapter 4 Request and Response. Servlets are controlled by the container.
Copyright 2007, Information Builders. Slide 1 iWay Web Services and WebFOCUS Consumption Michael Florkowski Information Builders.
DEVELOPING WEB SERVICES WITH JAVA DESIGN WEB SERVICE ENDPOINT.
Net-centric Computing Web Services. Lecture Outline  What is Web Service  Web Service Architecture  Creating and using Java Web Services  Apache Axis.
The Holmes Platform and Applications
Sabri Kızanlık Ural Emekçi
T Network Application Frameworks and XML Web Services and WSDL Sasu Tarkoma Based on slides by Pekka Nikander.
Subbu Allamaraju BEA Systems Inc
Web Software Model CS 4640 Programming Languages for Web Applications
Wsdl.
How Do You Implement Them?
Serpil TOK, Zeki BAYRAM. Eastern MediterraneanUniversity Famagusta
Introduction of Week 11 Return assignment 9-1 Collect assignment 10-1
Introduction to Web Services
Distributed System using Web Services
Distributed System using Web Services
Presentation transcript:

Web Services for Remote Portlets (WSRP) WSRP Kickoff Meeting March Dr. Carsten Leue Thomas Schäck Peter Fischer

Summary  Web Services for Remote Portlets  Idea and Goals  Architecture and Design  Markup, Actions and Persistence  Implementation  J2EE standalone version  Integration into portal servers  Standards  Relationship to WSIA  Interoperability

WSRP Motivation  Enable the sharing of portlets (markup fragments) over the internet Visual Component Pool  Internet Client  Text processor Client  Browser Client  Portal

Goals of Web Services for Remote Portlets (WSRP)  Allow visual, interactive, user-facing web services to be easily plugged into all standards-compliant portals  Let anybody create and publish their content and applications as user-facing web services  Portal administrators can browse public or private UDDI directories for user-facing web services to plug into their portals as new portlets, without any programming effort  Let portals interact and publish portlets so that they can be consumed by other portals  Make the internet a pool of visual web services, waiting to be integrated

Remote Portlets vs. data oriented WS  WSRP  visual & user facing & interactive Data service WS Presentation Layer WSRP Service WS Presentation Layer

WSRP Sample Usage Stocks serviceDocument serviceCartoon service Internet or Intranet via SOAP

WSRP Advertising UDDI Stocks service Publish ? Find Bind Live Connection SOAP Publish

WSRP Entities  Service  exposes the WSRP interface  Aggregation (client)  consumes multiple WSRP services  aggregates the services onto pages  Device  displays the aggregated markup to the end user  handles user input Service Component WSRP Aggregation Component (client) Device Component portlet e.g. HTTP

WSRP Instances  Scenario  The same service may be accessed multiple times with different settings  The server must manage and identify each of these settings  Solution  Service + settings form a „ remote instance“  Clients always integrate instances of WSRP services  The management of the instance‘s settings can be negotiated between client and server Aggregation Component (client) WSRP IBM stocks HP stocks SUN stocks Service Component

What needs to be defined?  Interfaces  Management of remote instances  Markup retrieval and action processing  Protocol  Sequence of calls  Markup rules  Action and namespace encoding  UDDI configuration  How to publish?  What to publish? foo UDDI

Summary: Traditional Back-End Usage Scenario  Local Portlets  Efficient  Local deployment of code   Specific UI for each deployed portlet   Business layer and presentation layer both located on the portal server   Portlets cannot be shared between portals!!  Aggregation User Portlet 1 Portlet 2 Portlet API DataLayer 1 DataLayer 2 BE specific API BE specific API Portal Server

„Traditional“ Web Service Usage Scenario  Portlets using Web Services  Different Web Services expose different interfaces   Specialized UI and proxy code required for each WS   Local deployment of code is still necessary   Data layer separated from presentation layer Portal Server Aggregation User Portlet 1 Portlet 2 Portlet API Data Layer 1 Proxy 1 Proxy 2 Web Service 1 WS specific interface Data Layer 2 WS specific interface Web Service 2

Wish list  Client‘s view  Plug-and-play  Configurable  Interactive  Markup and user aware  Server‘s view  Modest implementation overhead  Scalable  Client aware  Users‘ view  Does not want to bother Standard?

WebServices for Remote Portlets (WSRP)  All remote connections share a unified API  No coding required, proxy and stub are coded once or generated automatically  Stable and standardized transport mechanism (e.g. SOAP)  Visual and user-facing Portal Server WS specific interface Aggregation User Portlet API Generic Proxy Generic Proxy Web App1 Web App2 Generic Stub Generic Stub SOAP WSRP API WSRP API Presentation and Interaction Layer

Requirements for a remote API  Local case  Each Portlet forms a logical instance  Portlets generate markup based on user and device profile  Portlets can store state data in a database  Portlets can encode actions as URLs  Remote case  The service must be instance aware  User and device data must be transmitted to the service  The service must either be persistent or it must delegate the persistence to the caller  Actions encoded by the service must be recognized and remoted by the caller  To authorize calls, remote instances are embedded in a binding context Aggregation Portlet APIWSRP API

WSRP Contract  WSRP technical contracts define  Action handling and embedding in URLs  Namespacing of named entities  Restrictions on markup produced  Allowed order of method invocation  WSRP interfaces define  Lifecycle handling  Markup Retrieval  Action handling

Life Cycle Management createPortletInstance Service Binding Instance Session Persistent Transient bindClient [createSession] Instance Session Binding Aggregation Component (client) Service Component Instances are identified by handles

performPortletAction destroyInstance createPortletInstance Example of Portal  WSRP Service Interaction Aggregation Component (client)Service Component Adds Portlet Removes Portlet Clicks Action getPortletMarkup IS S User Views Portlet Allocate new Instance Generate Markup, (opt: create Session) Action Handling (opt: create Session) I I A I S A I I A I IS I Destroy instance I A S I A

Markup Retrieval  Client  User information  Client state  Locale  Instance/session handle  Markup type  Request parameters  Server  Generates markup based on the client‘s request data  May have internal state  May embed encoded action URLs in the markup  Use namespace to encode named entities

Markup Retrieval (cont‘d) WSRP Service Registry data 2. Client stores state User management user data MarkupRequest markup User Aggregation MarkupResponse WSRP Aggregation Component (client) Service Component

State Handling  Idea  Let the server decide whether to store persistent data on the server or client  Concept  Allow the server to return its (modified) state in a serialized form to the client  The client persists the server‘s state and passes it to the server in each request  Servers may choose to persist only parts of its state (security) Aggregation WSRP Registry ??

State Handling (cont‘d) Aggregation WSRP Service Portal Registry S S S 3. Client hands over server ‘ s state 1.Service generates or modifies state 2. Client stores state Aggregation Component (client) Service Component WSRP

Action Handling  Server  Encodes actions in a special WSRP URL syntax  Client  Recodes WSRP action URLs to match the portal‘s URL syntax  Intercepts WSRP URL clicks  Invokes action processing via WSRP  Server  Processes an action and optionally invalidates its markup  Client  Requests new markup if necessary

Action Handling (local case) Action encoder generate Portlet encode Portal URL clic k Browser markup Invoke action handler decoder Invoke action handler

PortletAction WSRP encoder generate encode clic k Browser markup decoder Action Handling (remote case) WSRP URL Invoke action handler Proxyencoder Portal URL Proxy parse Service Interface Invoke action handler Process Action recode SOAP markup WSRP

Action Handing (summary)  Transparency  Actions are represented by handles  No changes in portlet programming required  Client can handle WSRP URLs without knowledge of the server‘s details  Neither client nor server needs to be a portal  Uniqueness  URLs are automatically unique by using a GUID  Efficiency  Simple string replacement required on client side (eg. BM algorithm) {3096CAEB-031A-42a1-923C-F641CA340E4E}{0} Escape IdentifierAction handleClient Mode

Namespace Encoding  Problem  The portlet‘s markup may contain named entities (e.g. form names)  Names from different portlets that are aggregated onto a single page may conflict  The same portlet may be aggregated multiple times which leads to conflicting names Service instance 2 Aggregator (Portal) Name clash in „ Stocks “ Service instance 1 Stocks STOCKS

Namespace Encoding (cont‘d)  Solution  The aggregator must lift every named entity into a unique namespace  When passing the names to the portlets the namespace must be resolved for each destination portlet  How to locate the named entities in the markup? –Write a parser for each markup type  –Let the portlet indicate the names by tagging them Service instance 2 Aggregator (Portal) Ok, no naming problems Service instance 1 ID1:Stocks ID2:Stocks WSRP:STOCKS

Namespace Encoding (cont‘d) WSRP Service WSRP encoder WSRP decoder namespace encoder Aggregation Browser clic k namespace decoder WSRP encoder WSRP decoder Aggregator (Portal)Service STOCKS WSRP:STOCKS STOCKS ID1:STOCKS STOCKS WSRP:STOCKS STOCKS ID1:STOCKS Start

Possible Implementations  Baseline  Implementing both a WSRP server and a WSRP client is very simple !  Sample Implementations  Java based WSRP Server (on Tomcat)  Java (Swing) based WSRP Client .NET service as WSRP Server  ActiveX Control as WSRP Client

Implementing a WSRP Server on Tomcat SOAP Servlet WSRP Information Provider Server Simple Service WSRP-let Service WSRP-let Request Dispatcher Client Persistence Registry JSP WSRP Service generates markup directly Service invokes a standard servlet Standard servlet calling JSPs WSRP ‘ Servlet

Making a portal server a WSRP server Request Dispatcher Device SOAP Servlet WSRP Portal Server WSRP Router Portlet Invoker Local Portlet Portlet API Prepare the WSRP parameters such that they are compatible to the portal ‘ s internal parameters Aggregation Device Remote case Local case One single local portlet can be used for the local and the remote case. Portlet API WSRP specific

Making a portal server a WSRP client Aggregation Device Request Dispatcher Portlet API Generic Proxy Portlet Invoker WSRP Service Portal Server WSRP

Open Source Projects used for Reference Impl.  Projects for server impl.  Jakarta Tomcat –Application server  Axis –SOAP implementation  UDDI4J –UDDI access  Xerces –XML parsing  Standards  SOAP –Basis for the communication layer –Guarantees interoparability  WSDL –Used as the interface definition  UDDI –Serving portals publish the UDDI to make their content available –Client portals can query published portals from UDDI –UDDI registry strores binding and configuration information  WSIA –WSRP is a special case of a WSIA service –Remote portlets will be accessible from WSIA clients  Portlet API

WSIA  WSRP Relationship  Basic Issues  WSIA provides a generic set of basic interfaces for life cycle, presentation, persistence and event handling  WSRP extends selected WSIA interfaces and provides an own specialized interface to its services  Design Goals  Implementing a compliant service should be as easy as possible  Services should be extensible  Accessing interfaces should be efficient

WSIA  WSRP Interoperability  Interoperability goals  Specialized clients can access WSRP services by only using the WSRP interface  Generic clients can make use of WSRP services by only using the WSIA interfaces  Implications  WSRP services must implement the WSIA interfaces for special cases only (the WSRP relevant ones)

WSIA  WSRP Interoperability (cont‘d) WSIA Service WSIABase WSIA WSIA aware service Portlet WSIABase WSRP WSRP aware service WSIA Client Portlet Proxy Adaptor WSRP WSIABase WSIA WSIABase WSRP

Summary  A standardized portlet model is key to interoperability between portal servers and portlets  Portlets can be published as WSRP services  WSRP services can be wrapped in Portlets  Interoparability with different platforms  J2EE client and server .NET client and server  In sync with WSIA

Client Server Communication (Java) WSRP Client Tomcat Server WSRP  To be demonstrated  Find a portlet via UDDI  Bind to the portlet  React on an action

Java client consuming at.NET service IIS.NET object MS Office as OLE server WSRP

WSRP service inside a Word Document Tomcat Server.NET object

Questions!?

Publish/Find/Bind Service Requestor Service Provider Service Registry PublishFind Bind Access point Description tModel key service description title default expiry window states markup types locales keywords UDDI entry XML description WSRP Server Server Database WSRP Client Client WSRP

Action Handling (URL recoding)  Portlets  Use the same URL encoder in local and remote case  Client  Provides different encoders for the local and remote (same interface) case  Each action is assigned a locally unique action handle  Recognizes WSRP URLs in the markup  Decodes the URL to distinguish between window state changes and remote action handles  WSRP  Defines globally unique action identifiers which prefix action handles

Information Flow  Persistent Attributes  Portal registration  initialization per portal  Portlet ID to bind to  initialization per portlet  Transient Attributes  Markup type (HTML, VoiceXML, etc.)  Locale  User information  Window state  Session  Actions  transfer per request

Web Services for Remote Portlets (WSRP) – some Details March Dr. Carsten Leue Thomas Schäck Peter Fischer

Summary  WebServices for Remote Portlets  Recapitulation: Architecture and Design  Interfaces  Protocoll  Implementation  Client Sample  Server Sample  Misc  Performance, Caching  Discussion

Portlet / User Interaction  User actions  Read the markup  Trigger actions by clicking on links  Enter data into forms and send it to the server  Edit the portlet  Portlet  Generate markup based on user settings (identitiy, markup type, locale)  Encode actions as links in the markup  Encode namespaces  React on actions triggered by the user by modifying the portlet‘s state  Receive form data entered by the user and process it

Performance  Goal  Use as little rountrips as possible –two roundtrips to setup a portlet ( bind, createInstance ) –one single roundtrip per markup request ( getPortletMarkup ) –one or two roundtrips per action ( invokePortletAction )  Enable caching of remote services  Efficient markup interpretation –Fast string search algorithms –Use of escape tokens for efficient parsing

Caching  Requirements  WSRP clients may want to provide caching to relieve the WSRP service  The WSRP service must provide information on the expiry of its content  Solution  The WSRP service returns an expiry flag to the client on each markup call  Each action event may explicitely expire the markup –either a subsequent getPortletMarkup call follows –or the service returns its markup in a single roundtrip

Boyer – Moore String Search (Robert S. Boyer, J Strother Moore: A Fast String Searching Algorithm, Communications of the ACM, October 1977, Volume 20, Number 10)  Requirements  String search is needed for URL rewriting and namespace encoding  BM offers a verify efficient string search algorithm  Run time typically of order O(N/M) N = len(text), M = len(token)  Small initialization costs  Implications for WSRP  Select the same escape token for URLs and namespaces  Choose the token as long as possible consisting of unlikely characters

WSRP Interface public interface WSRPComponent extends WSXLBindable { // markup and actions public WSRPMarkupResponse getPortletMarkup( String hPortlet, WSRPMarkupRequest request) throws WSXLException; public WSRPActionResponse invokePortletAction( String hPortlet, String hAction, WSRPActionRequest request) throws WSXLException; // instance management public String createPortletInstance( String hBinding, String classID) throws WSXLException; public String createSession (String hPortlet) throws WSXLException; public void destroyInstance (String hGeneric) throws WSXLException; public String bindClient () throws WSXLException; };

WSRP Interface – bindClient public String bindClient () throws WSXLException;  Input:  None  Output:  Handle identiying the binding  Remarks:  Can be omitted if the binding information has been transfered otherwise

WSRP Interface – createPortletInstance public String createPortletInstance( String hBinding, String classID) throws WSXLException;  Input:  Binding handle  Identifier of the service within the server (LUID)  Output:  Handle identiying the remote instance String hBinding = bindClient(); String hInstance = createPortletInstance(hBinding,“107“);... destroyInstance(hInstance); destroyInstance(hBinding);

WSRP Interface – destroyInstance public void destroyInstance (String hGeneric) throws WSXLException;  Input:  Arbitrary handle  Output:  none String hBinding = bindClient(); String hInstance = createPortletInstance(hBinding,“107“);... destroyInstance(hInstance); destroyInstance(hBinding);

WSRP Interface – getPortletMarkup public WSRPMarkupResponse getPortletMarkup( String hPortlet, WSRPMarkupRequest request) throws WSXLException;  Input:  Instance or session handle  Markup request containing client data, user data, portlet state etc.  Output:  Markup response String hBinding = bindClient(); String hInstance = createPortletInstance(hBinding,“107“); WSRPMarkupResponse res = getPortletMarkup(hInstance,request); System.out.println(res.getResultString()); destroyInstance(hInstance); destroyInstance(hBinding);

WSRP Interface – invokePortletAction public WSRPActionResponse invokePortletAction( String hPortlet, String hAction, WSRPActionRequest request) throws WSXLException;  Input:  Instance or session handle  Action handle  Action request containing client data, user data, portlet state etc.  Output:  Action response... WSRPActionResponse res = invokePortletAction(hInstance,hAction,request); String out = res.getResultString(); if (out==null) out = getPortletMarkup(hInstance,request).getResultString(); System.out.println(res.getResultString());

Implementing a WSRP Server on Tomcat SOAP Servlet WSRP Information Provider Server Simple Service WSRP-let Service WSRP-let Request Dispatcher Client Persistence Registry JSP WSRP Service generates markup directly Service invokes a standard servlet Standard servlet calling JSPs WSRP ‘ Servlet

Instantiating a WSRP service  the server defers the service type from the incoming class handle  the registry maps the service type against a service factory  the factory instantiates the service Server Service Factory Service Registry type _0x_class ClassID type mapping create factory class WSRP ‘ createInstance instantiation 5

Summary

Questions!?