+ All Categories
Home > Documents > 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson,...

8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson,...

Date post: 26-Dec-2015
Category:
Upload: myra-page
View: 216 times
Download: 0 times
Share this document with a friend
Popular Tags:
81
8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250. For educational use only. All rights reserved. Sept 18, 2009
Transcript
Page 1: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.1

Grid Portals

Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009.Chapter 8, pp. 234-250. For educational use only. All rights reserved. Sept 18, 2009

Page 2: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.2

Grid Portal

• Web page designed to provide a user-friendly interface to a Grid computing environment rather than a command line interface.

Page 3: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Dynamic Content

• Portal must support dynamic content, that is, Web pages that can be altered to display different information during viewing.

8-2.3

Page 4: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

• Hosted as a dynamic Web page on a server.

• Accessed by user through a Web browser from anywhere.

• The portal should:– Hide details of the Grid middleware– Provides single sign-on to access to Grid computing

services, distributed resources and Grid information.

8-2.4

Page 5: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.5

Provides access to Grid computing services:• Security Services

– Management of certificates

• Remote File Management– Access to files and directories– Moving files

• Remote job management– Job submission– Workflow management

• Grid information services– Static information (machine type, etc.)– Dynamic information (machine load, etc.)

Page 6: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.6

Access to Information

• Portals also provide access to information -- anything related to tasks at hand, including communication with virtual organization.

• In fact, some portals started simply as informational portals in the same vein as web portals such as yahoo.

Page 7: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Generic layout of a Grid portal

8-2.7Fig 8.11

Page 8: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

A Grid portal comes in one of two forms:

1.General-purpose portal - front-end to a Grid computing platform in non-specific application domains, e.g.:

– SURAGrid portal– Our Grid computing course portal

2.Portal tailored to a particular application domain, e.g. a bioinformatics portal.

– Application-specific portal should provide access to specific tools of application domain.

8-2.8

Page 9: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Terms

Science portal - emphasis in science domain.

Gateway also used to describe a portal.

Science gateway -- for scientists -- physics, chemistry, biology, etc.

Any self-respecting Grid computing project has a portal.

8-2.9

Page 10: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.10Table 8.1

Page 11: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portal ToolkitsA software framework and components to put together a portal easily.

•Ideally re-useable software components •Potentially components developed by others can be incorporated.•Ideally, standard interfaces should exist.•Ideally, presentation layer that the user sees should be separated in software construction from back-end.

8-2.11

Page 12: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.12

Available Technologies for putting together portal toolkits

Page 13: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Dynamic ContentRefers to a Web page display that can be altered as opposed to static content.

Dynamic content can be done:

1. At client side, that is, after the page is downloaded. – Downloaded HTML page has embedded code– JavaScript language specifically for such embedded code– All browsers support JavaScript.

2.At server side– When Web client makes request within a Web page, server

receives this request and sends appropriately altered HTML page, which is then displayed.

Client-side and server-side methods can be used together.

Grid portals can use client-side dynamic content but generally require server-side dynamic content.

8-2.13

Page 14: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Generating server-side dynamic content

Can use languages such as C and Java to create HTML pages.

Technologies specifically for generating server-side dynamic content :

• CGI (Common Gateway Interface)–Oldest - standard protocol between Web servers and client applications

• PHP (originally Personal Home Page, now Hypertext Preprocessor)– Scripting language specifically designed for server-side dynamic content

–non-Java technology

• ASP.NET (Active Server Pages .NET framework)– Microsoft Web application framework that can provide dynamic content

– Successor to ASP (Active Server Pages).

– Non-Java technology

• Java Servlets• JSP (Java Server Pages)

Many Grid portals focus on Java implementations using Java Servlets/JSP8-2.14

Page 15: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Java Servlets• Small Java programs (objects) that receive requests from Web

clients and generate responses, usually handling HTTP requests/responses.

• Allows a software developer to add dynamic content to a Web server using Java platform.*

• Generate content commonly HTML but may be other data such as XML.*

• Can maintain state across server transactions by various means.

• javax.servlet package defines required methods that must be implemented for client-servlet interaction.

* http://en.wikipedia.org/wiki/Java_Servlet

8-2.15

Page 16: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Servlet container

• A Web server that provides environment for servlets

• Maps URLs to specific servlets.

servlet engine - Another term for servlet support.

e.g. Apache Tomcat with Gridsphere portal

8-2.16

Page 17: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Using Java servlets alone would typically require invoked Java programs to create HTML using println statements.

8-2.17

Page 18: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Java Server Pages (JSP)

A complementary SUN technology to Java servlets .

Used to create Java servlet code from static content.

•JSP file is an HTML page with embedded JSP tags.

•JSP tags provide for creating servlet Java code.

•This Java code created automatically from JSP file by JSP compiler.

•Code might be fully compiled machine-executable code or Java byte code executed by a JVM.

8-2.18

Page 19: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

JSP/Java servlet environment

8-2.19Fig 8.12

Page 20: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

JSP tagsFive tags, Three tags available for inserting code.

declaration tag (<%! ... %>)

Used to declare variables and methods, i.e.:

<%!

Java variable declarations or/and

Java methods

%> 8-2.20

Page 21: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

JSP tags

scriptlet tag (<% ... %>

Used to include Java code including variable declarations and methods, but broader to include any Java code fragment, i.e.:

<%!

Any Java code fragment

%>

8-2.21

Page 22: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

JSP tags

expression tag (<%= ... %>)

Will compute a Java expression and convert result into a string that is inserted in-line into HTML code, i.e.

HTML code <%= Java expression %> HTML code

8-2.22

Page 23: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Other JSP tags

directive tag ( <%@ directive ... %>) - Provides information about the JSP page. Can extend functionality of tags and include other files.

Example

<%@ include file = "shared/template.html" %>

action tag <jsp : .... > - To invoke server-side JavaBeans, transfer control to another page, and support for applets.

More information: http://java.sun.com/products/jsp/docs.html8-2.23

Page 24: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.24

JavaBeans

Java classes used to encapsulate many objects into a single object (the bean), so that the bean can be passed around rather than the individual objects.

http://en.wikipedia.org/wiki/JavaBeans

Page 25: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Commodity Grid (CoG) Kits

Conceived during Globus development from 1996 –

Objective

Combining commodity software technologies with Grid components (hence the name “Commodity Grid Kit”) and providing a higher-level interface to Grid components.

8-2.25

Page 26: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

“Commodity technologies”

• Accepted software components – Common libraries,

– Programming languages such as Java, C, Python

– Standard distributed computing frameworks

• Standard network protocols

Should not be confused with hardware commodity components.

8-2.26

Page 27: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Java CoG kit

• First most prevalent Commodity Grid Kit

• Provides Java APIs that enable one to:

– Submit and monitor Globus jobs

– Transfer files by CoG calls within a Java application program

• Avoids lower level Globus APIs, which change from one version to another

• CoG kit development continued during same time period as Globus. Python version.

8-2.27

Page 28: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.28

Commodity Grid (CoG) Kits

Used within GT3.2 and GT4:

Java-based GSI, gridFTP, myProxy, GRAM.

A part of CoG kit, known as JGlobus now included in Globus 4 distribution.

CoG kit provides support for portal developers.

http://wiki.cogkit.org/index.php/Main_Page

Page 29: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

CoG kit program to

transfer files (Villalobos 2007)

8-2.29Fig 8.13

Page 30: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.30

Early Portal Toolkit ExamplesLate 1990s:

• Grid Portal Development Kit (GPDK)– JSP for presentation layer – JavaBeans and Java CoG back-end.– GPDK is not now supported

• NPACI Grid Portal Toolkit (Gridport) (National Partnership for Advanced Computational Infrastructure)

– HTML for presentation layer and Perl/CGI

• Ninf/Gridspeed portals–JSP/Java Servlet for presentation layer– Java CoG back-end

Page 31: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.31From (Li and Baker, 2005).

Page 32: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.32

Examples

Page 33: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.33

MPI program

Starting job

From a paper”Building GridPortals: The NPACI Grid Portal Toolkit” by M. P. Thomas and J. R. Boisseau.

NPACI Hotpage Grid portal(based upon GridPort)

Page 34: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.34Adapted from slides “The NCSA Alliance Portal and the Open Grid Computing Environment Project” by D. Gannon, G. Fox, B. Plale, M. Pierce, M. Thomas, C. Severance, G. von Lazewski, and J. Alameda.

Page 35: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.35

DOE Fusion Grid Portal

Adapted from slides “Reuseable Grid Portral Components” by M Thomas.

Page 36: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.36

Linked Environments for Atmospheric Discovery (LEAD)

Adapted from slides “Reuseable Grid Portral Components” by M Thomas.

Page 37: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.37

• Early grid portals “tools” not very flexible.

• Tied to specific programming tools and Grid software, such as Globus 2.4.

• Specific programming structure not suitable for users to develop portals themselves.

• Not standardized APIs.

Page 38: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.38

Portal Implementation

• Should be flexible, meet grid industry standards, be able to be extended using parts developed by others.

• General approach currently is to use “software components” called portlets.

Page 39: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portlets• A general approach for portal design developed in

the early-mid 2000’s

• Presentational layer of portal constructed with portlets – software components

• Each portlet provides specific functionality and a window within portal

• Each portlet can be associated with a particular service

• User can have any number of portlets (will be associated with user’s persistent context).

8-2.39

Page 40: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.40

Portlets provided for all the functionality expected to access Grid resources, including:

• Proxy certificate management• Job submission and run-time management• Remote file transfers• Access to information services (resource status…)• Collaborative tools (email, chat, discussion boards…)

and also depending upon application, specialized portlets for interfacing to domain specific applications.

Page 41: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portlets

8-2.41Fig 8.14

Page 42: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portlet server and portlet container

• Portlets can be compared to servlets and requires a similar environment called a portlet container managed by a portlet server.

• In general, portlets do not communicate with each other, only with the services they front-end, and only provide for the presentation-level.

• With the portlet approach, it should be easy to reconfigure user’s view.

• Different portlets from different sources should be able to be plugged into portal.

8-2.42

Page 43: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portlet development

Several groups developed portlet API’s including:• IBM’s Websphere portlet API’s• Open-source Apache Jetspeed project.

After early experiences of portal designs in mid-late 1990’s, effort made to develop a Java portlet specification in 2000-2002 period leading to Java Specification Request JSR 168 Portlet Specification released in Oct. 2003.

JSR 168 Based upon Apache Jetspeed portlets.

8-2.43

Page 44: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Java Specification Request JSR 168Portlet Specification

(Also called Java Portlet Specification version 1.0)

Portlet code generally has the following structure:

1. Initialize

2. Render portlet

3. For a request received:

Accept request and perform required back-end

actions

Render display according to result

4. Finalize and destroy portlet

8-2.44

Page 45: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.45Fig 8.15

Page 46: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.46

National Science FoundationMiddleware Initiative (NMI)

• Started in 2001 initially over 3 years “to create and deploy advanced network services that simplify access to diverse Internet information and services.”

• Provided a centralized location for important grid software including Globus, Condor, MPI-G2, and:

– A new grid portal project called OGCEGrid (funding started Sept 2003).

Page 47: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.47

Consortium established “Fall 2003 to foster collaborations and shareable components

with portal developers worldwide”

Page 48: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

OGCE portal release 2

• Consisted of a core set of JSR 168 compatible Grid portlets.

• Portal independent of specific container.• Two portal containers supported:

– uPortal

– GridSphere

Originally GridSphere and OGCE2 together described as a OGCE2/GridSphere portal, but subsequently isimply referred to as GridSphere.

8-2.48

Page 49: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.49

GridSphere

• Portal framework provides an open-source portlet based Web portal.

http://www.gridsphere.org/gridsphere/gridsphere

Page 50: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.50Fig 8.17

Page 51: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.51

Core GridSphere portlets•Login•Locale, profile and layout personalization• Administration portlets for creation of users, groups, portlet management•Localization support French, English, Spanish, German, Dutch, Czech, Polish, Hungarian, Italian, Arabic, Japanese, and Chinese

onto which many other portlets can be installed from various sources, for example:

•myProxy server portlet,•Globus job submission and control portlets,•information services portlets•collaborative tools such as Sakai, etc.

Page 52: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.52

GridSphere portlets deployed into a servlet engine (Tomcat)

Fig 8.16

Page 53: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.53

Step 1 -- Download and Install Tomcat

Page 54: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.54

Step 2: Download and Install Gridsphere

After downloading and installing Gridsphere, Gridsphere located at:

http://localhost:8080/gridsphere/

Page 55: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.55

Goto http://localhost:8080/gridsphere/ to get set-up screen:

Page 56: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.56

After filling details, get usual Gridsphere screen.Similar to course portal except PURSe registration portlet not installed (a separate package):

Page 57: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.57

Creating your own portlet

GoalCreate and deploy a portlet that will accept one number and say whether it is odd or even (“oddeven” portlet)

The code for this portlet is given.

You simply have to deploy it.

Later you will to ceate your own portlets.

Page 58: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.58Fig 8.18

Page 59: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Portlet layout

8-2.59Fig 8.19

Page 60: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.60

Files

Gridsphere provides tool to create template files.

Portlet designer then needs to provide java source file that does the required evaluation,

and

Provide/modify three portlet deployment descriptor files.

Page 61: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.61

HTML/JSP file

HTML page layout defined in JSP file called MainPage.jsp

Mostly simple HTML code modified with JSP tags added at beginning.

Page 62: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.62MainPage.jsp

Fig 8.20

Page 63: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.63

JSP tags added at beginning

<portlet:defineObjects/>

creates renderRequest, renderResponse and portletConfig objects.

<%@ taglib uri="LibraryURI" prefix="tagPrefix" %>

declares that custom tags used defined in a tab library given by URI,and provides prefixes names.

Page 64: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.64

Java portletcode

public class OddEven extends ActionPortlet { private static final String DISPLAY_PAGE = "MainPage.jsp"; public void init(PortletConfig config) throws PortletException { super.init(config); DEFAULT_VIEW_PAGE = "prepare"; } public void action(ActionFormEvent event) throws PortletException { TextFieldBean value1 = event.getTextFieldBean("valueTF1"); TextBean answer = event.getTextBean("answer"); int val = Integer.parseInt( value1.getValue() ); if (value1.getValue() == null ) { answer.setValue(""); } else { if( isEven(val) ) { answer.setValue("The number: " + value1.getValue() + " is Even"); } else { answer.setValue("The number: " + value1.getValue() + " is Odd"); } } setNextState(event.getActionRequest(), DISPLAY_PAGE); } public void prepare(RenderFormEvent event) throws PortletException { setNextState(event.getRenderRequest(), DISPLAY_PAGE); } public boolean isEven(int val) { return val % 2 == 0; }}

Fig 8.21

Page 65: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.65

Deployment descriptor files

Three deployment descriptor files needed to create a portlet: • Portlet.xml JSR 168 standard, describing portlet

• Layout.xml Gridsphere file describing layout ofportlet within page

• Group.xml Gridsphere file describing collection

of portlets

(There are other deployment files, which generated automatically during deployment.)

Page 66: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.66

Portlet.xml… <portlet> <description xml:lang="en">Odd Even Portlet</description> <portlet-name>OddEven</portlet-name> <display-name xml:lang="en">Odd Even Portlet</display-name> <portlet-class>edu.uncc.abw.portlets.OddEven</portlet-class> <expiration-cache>60</expiration-cache> <supports> <mime-type>text/html</mime-type> <portlet-mode>edit</portlet-mode> <portlet-mode>help</portlet-mode> </supports> <supported-locale>en</supported-locale> <portlet-info> <title>Odd Even</title> <short-title>Odd Even</short-title> <keywords>odd even</keywords> </portlet-info> </portlet></portlet-app>

Portlet

Fig 8.22

Page 67: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.67

<portlet-tabbed-pane> <portlet-tab label="Odd Even"> <title lang="en">Odd Even</title> <portlet-tabbed-pane style="sub-menu"> <portlet-tab label="oddeventab"> <title lang="en">Odd Even</title> <table-layout> <row-layout> <column-layout> <portlet-frame label="Odd Even"> <portlet-class> edu.uncc.abw.portlets.OddEven </portlet-class> </portlet-frame> </column-layout> </row-layout> </table-layout> </portlet-tab> </portlet-tabbed-pane> </portlet-tab></portlet-tabbed-pane>

Layout.xml

Specified columns and rows of a table in portlet. Components are in cells of table.

Path to portlet code(There is an alternative format using # symbol)

Fig 8.23

Page 68: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.68

group.xmlSpecifies group for portlet

<?xml version="1.0" encoding="UTF-8"?><portlet-group> <group-name>demo</group-name> <group-description>The demo group</group-

description> <group-visibility>PUBLIC</group-visibility> <portlet-role-info> <portlet-class>edu.uncc.abw.portlets.OddEven </portlet-class> <required-role>USER</required-role></portlet-role-info></portlet-group>

Group name

Portlet

Fig 8.24

Page 69: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.69

Directory Structure

src holds directory structure leading to java source file

webapp holds deployment descriptor files

Page 70: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.70

webapp\WEB-INF directory

Layout.xml

Portlet.xml

Group.xml

Page 71: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Web Services for Remote Portlets (WSRP)

Standard introduced by OASIS for defining a Web service interface for interacting with “presentation-oriented Web services” in 2003 (version 1)

Uses WSDL for its interface description.

WSRP Version 2 introduced in 2008

8-2.71

Page 72: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

JSR 286Portlets Specification v2.0

Updated version of JSR 168 released in June 2008 after about fives years of development.

Backward compatible with JSR 168 portlets

JSR 168 portlets can be deployed in JSR 286 portlet containers.

JSR 286 incorporates inter-portlet communication, which was absent in JSR 168.

JSR 286 includes an alignment with WSRP v 2 .

8-2.72

Page 73: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.73

More Information

on Gridsphere

See the links on the Gridsphere portal page

Page 74: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

Multiple-choice question

8-2.74

Page 75: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

What is meant by dynamic content in the context of the implementation of Web pages?

(a) A Web page that keeps changing at regular intervals

(b) A Web page that changes in response to changing information and client requests

(c) A Web page using dynamic memory

(d) A Web page that has to be refreshed at regular intervals

8-2.75SAQ 8-10

Page 76: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

What is a Java servlet?

(a) A Java program (object) that handles requests from Web clients

(b) A Web service written in Java

(c) A small Java-based server

(d) A Java program that hands out small objects

8-2.76SAQ 8-11

Page 77: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

What is a Java Server Page (JSP)?

(a) Java code that implements a Web service

(b) A SUN technology used in conjunction with servlets to create Web pages with dynamic content

(c) Java code that can implement a server

(d) An XML language used to describe Java server programs

8-2.77SAQ 8-12

Page 78: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

What is Commodity Grid (CoG) kit?

(a) A toolkit to create a Grid platform for Grids on commodity cluster hardware

(b) A toolkit specifically for trading commodities on the Grid

(c) The lowest level software beneath Globus to access the Grid resources

(d) A toolkit providing higher-level interfaces to Grid components than basic Globus APIs

8-2.78SAQ 8-13

Page 79: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

What is a portlet?

(a) A pull-down menu in a Grid portal

(b) A group of portals

(c) A small Grid portal

(d) A tabbed window within a portal

(e) A back-end component in a portal such as a Web service

(f) Software component used for an area within a portal providing a presentation-level interface associated with some functionality

8-2.79SAQ 8-14

Page 80: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

In a JSR 168 portlet environment, suppose the file layout.xml describes a table with two rows and two columns. Describe its effect?

(a) It creates a layout for a portal window that has four cells arranged as two rows and two columns, one cell for each portlet.

(b) It creates a layout for a portlet that has four cells arranged as two rows and two columns.

(c) It creates a layout for a complete portal that has four cells arranged as two rows and two columns. The lower left cell can hold selectable menu items. The upper left cell can hold a logo.

(d) It defines a user input layout.8-2.80SAQ 8-15

Page 81: 8-2.1 Grid Portals Slides for Grid Computing: Techniques and Applications by Barry Wilkinson, Chapman & Hall/CRC press, © 2009. Chapter 8, pp. 234-250.

8-2.81

Questions


Recommended