Portal Presentation Material
Portal Presentation Material
Portal Presentation Material
Using Portlets
Marlon Pierce
Community Grids Lab
Indiana University
Overview of Material
General remarks on portals and portlets.
• General remarks to provide context for the remainder of
the session.
OGCE Portal capabilities.
• Summary of things we do in OGCE.
JSR 168 Review
Developing OGCE portlets
• How to develop OGCE compatible portlets.
• With launching points for Dennis and Gregor.
Useful third party testing tool: HttpUnit.
A brief JSR 168 tutorial.
At the risk of a low tutorial rating, I will cover
higher level issues. Slides on nuts and bolts
details are provided for homework.
Towards A Common Grid
Client Hosting
Environment
Grid portal background and
emerging common
frameworks
What Is a Grid Computing Portal?
Browser based user interface for accessing grid
and other services
• “Live” dynamic pages available to authenticated,
authorized users.
• Use(d) Java/Perl/Python COGs
• Manage credentials, launch jobs, manage files, etc.
• Hide Grid complexities like RSL
• Can run from anywhere
• Unlike user desktop clients, connections go through
portal server, so overcome firewall/NAT issues
Combine “Science Grid” with traditional web
portal capabilities
• Get web pages for news feeds
• Post and share documents
• Search engine interfaces, calendars, etc.
• Enabled by portlets, as we will see.
Customizable interfaces and user roles/views
What a Grid Portal Is/Is Not
It is
• A tool for aggregating and managing web content
• A user customizable view of these Web content pieces.
You see what you want/can see.
But you must log in.
• Implemented on top of standard services
Like login, authorization, customization.
May include collaboration, etc, that depend on login.
• A way to accomplish Grid tasks through browsers:
Launch, monitor jobs
Move files
Run science applications based on these services.
• Compatible with emerging standards and best practices
(such as portlets, JSR 168 and WSRP).
It is not (just)
• A web page
• A collection of links
• An applet
Which Is the Portal?
Which Is the Computing Portal?
In fairness, the screenshots are not large
enough to see, but you have to log in to
the one on the right.
• Point is that they are superficially similar to
browser users, but have many differences
under the hood.
The screen shot on the left is of the NASA
JPL QuakeSim project page.
• http://quakesim.jpl.nasa.gov/
The screen shot on the right is the NASA
JPL QuakeSim portal.
• http://www.complexity.ucs.indiana.edu:8282
• Go here to run QuakeSim earthquake
simulation codes, access earthquake
databases, etc.
Let 10,000 Flowers Bloom
Many portal projects have been launched
since late ’90s.
• HotPage from SDSC, NCSA efforts, DOD, DOE
Portals, NASA IPG
• 2002 Special Issue of Concurrency and
Computation: Practice and Experience.
Continue to be important component of
many large projects
• NEESGrid, DOE SciDAC projects, NASA, NSF,
many international efforts
Global Grid Forum’s Grid Computing
Environments (GCE) Research Group
• Community forum
Three-Tiered Architecture
Grid and JDBC,
Web Local, or
Protocols Remote
Connection
Portal User Interface
Portal
Database
Client Database
Service
Stub
Portal HPC
Grid Resource
Client or
Broker Service
Stub Compute Cluster
Portal Information
Grid Information
Client and
Services, SRB
Stub Data Services
CoG Workflow demonstration Set up and run task graphs using the Java
portlet CoG
Job Scheduling and Sequencing Schedule sequences of jobs on several hosts
using Community Scheduling Framework.
<classname>org.apache.jetspeed.portal.portlets.VelocityPortlet</clas
sname>
<parameter name="template" value="myScienceApp"
hidden="true"
cachedOnName="true" cachedOnValue="true"/>
<parameter name="action" value="portlets.myScienceAppAction"
hidden="true" cachedOnName="true" cachedOnValue="true"/>
<media-type ref="html"/>
<url cachedOnURL="true"/>
</portlet-entry>
</registry>
Specifying The Template
The parts in red <parameter
(template and name="template"
action) point to value="myScienceApp
"
things that you
must write. hidden="true"
cachedOnName="true
The line below is ”
used to name the cachedOnValue="true"
VM template in the />
XREG.
• Points to
myScienceApp.vm
Actions in Templates
Note our velocity template is just HTML (at this
point) with a form action.
• The action implementation is specified in the XREG file.
• MyScienceAppAction.java is the code that does the work
when you click the button.
Jetspeed action managers are responsible for
calling your actions.
• You just need to write the java code, put it in the right
place, and connect it to a Velocity template in the XREG
file.
• Jetspeed will take care of the invocation.
Writing An Action
A portlet action is just a java class.
It should extend VelocityPortletAction
You should implement the
buildNormalContext() method.
• This method is called by default when you
invoke an HTML form action.
• This can do anything you want (i.e. make calls
to Grid services through the Java COG).
• You can also implement other action methods.
Getting Started
Let’s give our simple <parameter name="action"
portlet an action. value="portlets.myScience
To do this, we first ApAction"
modify the hidden="true"
• Don’t forget to cachedOnName="true
shutdown tomcat first. "
cachedOnValue="true"
We then write the />
action and compile it
into nmi/WEB-
INF/classes.
• See next slide
• Set classpath correctly!
Restart the server.
A Minimal Action:
myScienceAppAction.java
package org.apache.jetspeed.modules.actions.portlets;
//Import Turbine packages.
import org.apache.turbine.util.RunData;
List of
Test Classes
Bandera
CSF Blanco
Buda
<
<Status>New</Status>
<Step>
<Status>Unscheduled</Status>
<Type>CSFJob</Type>
<Parameter
name="jobFactorySer vi ceHandle">http://129.116.218.36:15080/ogsa/ser vic es/metascheduler/
JobFactoryService</Par ameter >
Sequencer
<Parameter name="queue">normal</Parameter>
<Parameter name="executable"> pam</Parameter>
<Parameter name="arguments">-g 1 mpichp4_wrapper
/home/monitor/mpi_jobs/mpi md_5</Parameter>
<Parameter name="directory">/home/monitor/mpi_jobs</Par ameter >
GPIR
<Parameter name="count">4</Parameter>
<Parameter name="stdIn">/dev/null</Parameter>
<Parameter
name="stdOut">/home/monitor/mpi_jobs/tomi slavSequencerJobOut</Par ameter >
<Parameter
name="stdErr">/home/monitor/mpi_jobs/tomi slavSequencerJobErr </Parameter>
</Step>
<Step>
<Status></Status>
<Type>GridFTP</Type>
<Parameter name="fromHost">[Previous]</Par ameter >
<Parameter name="toHost">blanco.tacc.utexas.edu:2811</Parameter>
<Parameter
name="fromFileFullName">/home/monitor/mpi_jobs /tomisl avSequencerJ obOut< /Parameter
>
<Parameter
name="toFileFullName" >/home/monitor/mpi_jobs/tomislavSequencerJobOutCopied</"> /ho
me/monitor/mpi_j obs/tomislavSequencerJobErr</Parameter>
<Parameter
name="toFileFullName" >/home/monitor/mpi_jobs/tomislavSequencerJobErrCopi ed</Param
eter>
</Step>
</JobSequence>
Portal