19
Building QuakeSim portlets with GTLAB Mehmet A. Nacar 1 , Marlon E. Pierce 1 , Andrea Donnellan 2 , and Geoffrey C. Fox 1 1 Community Grids Lab, Indiana University 2 Jet Propulsion Lab, California Institute of Technology

Building QuakeSim portlets with GTLAB

  • Upload
    pelham

  • View
    36

  • Download
    0

Embed Size (px)

DESCRIPTION

Building QuakeSim portlets with GTLAB. Mehmet A. Nacar 1 , Marlon E. Pierce 1 , Andrea Donnellan 2 , and Geoffrey C. Fox 1 1 Community Grids Lab, Indiana University 2 Jet Propulsion Lab, California Institute of Technology. Grid Portlets for QuakeSim. QuakeSim portlets in production - PowerPoint PPT Presentation

Citation preview

Page 1: Building QuakeSim portlets with GTLAB

Building QuakeSim portlets with GTLAB

Mehmet A. Nacar1, Marlon E. Pierce1, Andrea Donnellan2, and Geoffrey C. Fox1

1Community Grids Lab,Indiana University

2Jet Propulsion Lab,California Institute of Technology

Page 2: Building QuakeSim portlets with GTLAB
Page 3: Building QuakeSim portlets with GTLAB

Grid Portlets for QuakeSim• QuakeSim portlets in production

– Initial effort was to build the portal Web services– QuakeSim portlets invoke the services and then execute simple

workflows built in shell scripts• Problem: QuakeSim portlets should also work on TeraGrid

resources.– TeraGrid restricts the services run on TeraGrid resources.

• Our approach:– Prototyping QuakeSim portlets using Grid Tag Libraries and Beans

(GTLAB).• Advantages:

– QuakeSim portlets utilize IU, SDSC, NCSA and other TeraGrid resources

– Rapid development by using reusable components3

Page 4: Building QuakeSim portlets with GTLAB

QuakeSim portlets using TeraGrid• Disloc is used to calculate surface displacements from earthquake faults. • 1994 Northridge earthquake• 2003 San Simeon Earthquake• 2004 Great Sumatran Earthquake. 

Page 5: Building QuakeSim portlets with GTLAB

<target name="MakeWorkDir"> <echo message="Creating ${workDir.prop}" /> <mkdir dir="${workDir.prop}" /> </target> <target name="ExecDisloc" depends="MakeWorkDir"> <echo message="Bin directory: ${bindir.prop}"/> <exec executable="${bindir.prop}/disloc“ output="${workDir.prop}/${projectName.prop}.stdout" dir="${workDir.prop}"> <arg line="${workDir.prop}/${projectName.prop}.input"/> <arg line="${workDir.prop}/${projectName.prop}.output"/> <env key="PATH" path="${bindir.prop}:/bin/:$PATH"/> </exec> </target>

Ant script for Disloc service

5

Page 6: Building QuakeSim portlets with GTLAB

<o:multitask id="multi" persistent="true" taskname="#{resource.taskname}">

<o:myproxy id="mypr" hostname="gf1" lifetime="2" password="manacar" port="7512" username="manacar"/>

<o:jobsubmit id="make" arguments="/home/manacar/disloc-work" executable="/bin/mkdir" hostname="gf1.ucs.indiana.edu" provider="GT2" stdout="/home/manacar/tmp/out-make"/>

<o:jobsubmit id="disloc" arguments="/home/gateway/GEMCodes/Disloc/input.txt /home/manacar/disloc-work/disloc.out" executable="/home/gateway/GEMCodes/Disloc/disloc" hostname="gf1.ucs.indiana.edu" provider="GT2" stdout="/home/manacar/disloc-work/out-disloc"/>

<o:dependency id="dep" dependsOn="make" task="disloc"/></o:multitask>

Grid tags for Disloc portlet

Page 7: Building QuakeSim portlets with GTLAB

• Grid tags are embedded into JSF view pages and decorated with standard JSF form, input, output and button components– Grid components are non-visual.

GTLAB

Standard JSF

JSF Action

Page 8: Building QuakeSim portlets with GTLAB

GTLAB• Grid Tag Libraries and Beans (GTLAB)• Encapsulates clients to common Grid services as XML tag libraries and

server side Java beans.– Embedded by portlet developers in their portlet pages to invoke common tasks– Specification of the composite action you want to occur when a user hits the

submit button.– Allows portal developers to concentrate on the user interface components.

• Tags can be arranged in directed acyclic graphs (dependency chains).– These represent simple workflows.

• Based on extensions to Java Server Faces (JSF) and the Java CoG Kit.• Implements a component model for User Interfaces (UI) that is more

powerful than portlets

Page 9: Building QuakeSim portlets with GTLAB

ArchitectureOverview

• Grid portals are client to backend codes through Web/Grid services.• Grid tags are part of user interface tier and embedded into portlet container. • Grid tags use local services in Apache Tomcat to manage sessions and handlers.• Implies that “portal” is quite sophisticated as must support integration• Note CoG kit is here to act as a broker to hide complexities of evolving services (e.g. different versions of Globus)• “violates service model” in that core software centralized in portal application

9

Page 10: Building QuakeSim portlets with GTLAB

GTLAB features• GTLAB provides common components for building portlets using tags and

reusable parts.• The goal of GTLAB to simplify Grid portlet development

– Enable rapid development from reusable components• GTLAB capabilities include Grid operations with XML based tags within

JSF framework.• Grid tag libraries are built using JSF custom component development

techniques• Grid tags are interfaces to backing Grid beans

– End users pass values to Grid beans by using tag attributes.• Each backing Grid bean has equal capability with a portlet application in

case of Grid portlet approach.– GridFtp tag generates GridFTP Portlet

• But tags allow service backend component model to map into an intermediate UI component models – each tag set is a component– The components/tags can easily be composed into a rich UI which portlets cannot

do10

Page 11: Building QuakeSim portlets with GTLAB

Grid Tags Associated Grid Beans Features

<submit/> ComponentBuilderBean Creating components, job handlers, submitting jobs. This is visually rendered as HTML

<handler/> MonitorBean Handling monitoring page actions

<multitask/> MultitaskBean Constructing simple workflow

<dependency/> MultitaskBean Defining dependencies among sub jobs

<myproxy/> MyproxyBean Retrieving myproxy credential

<fileoperation/> FileOperationBean Providing Gridftp operations

<jobsubmission/> JobSubmitBean Providing GRAM job submissions

<filetransfer/> FileTransferBean Providing Gridftp file transfer

(Other JSF UI Tags)

ResourceBean Describes common properties among all tags and beans. Passing values given by standard visual JSF components.

Page 12: Building QuakeSim portlets with GTLAB

Encoding DAGs in Portlets

depends

depends

Input

Multi-staged task

Task DFile Transfer

Task AFile Operation

(mkdir)

Task BFile Transfer

Task CJob Submission

Output

depends

• Multitask provides a simple Directed Acyclic Graph (DAG)

• This example demonstrates a composite Grid job using multi-staged multitask

• GTLAB handles lifecycle of DAG within JSF application

Page 13: Building QuakeSim portlets with GTLAB

<o:submit id=”test” action=”next_page” /> <o:multitask id=”mytask” taskname=”test” persistent=”true” > <o:myproxy id=”pr” hostname=”gf1.ucs.indiana.edu” port=”7512” lifetime=”2”

username=“nacar” password=”***” /> <o:fileoperation id=”taskA” command=”mkdir” hostname=”cobalt.ncsa.teragrid.org” path=”/home/manacar/tmp/” /> <o:filetransfer id=”taskB”

from=”gridftp://gf1.ucs.indiana.edu:2811/home/manacar/input_file” to=”gridftp://cobalt.ncsa.teragrid.org:2811/home/manacar/input_file” /> <o:jobsubmit id=”taskC” hostname=”cobalt.ncsa.teragrid.org” provider=”GT4”

executable=”/bin/execute” stdin=”tmp/input_file” stdout=”tmp/result” stderr=”tmp/error” /> <o:filetransfer id=”taskD”

from=”gridftp://cobalt.ncsa.teragrid.org:2811/home/manacar/tmp/result” to=” gridftp://gf1.ucs.indiana.edu:2811/home/manacar/result” /> <o:dependency id=”dep1” task=”taskB” dependsOn=”taskA” /> <o:dependency id=”dep2” task=”taskC” dependsOn=”taskB” /> <o:dependency id=”dep3” task=”taskD” dependsOn=”taskC” /> </o:multitask></o:submit>

DAG Example JSF Page

This encodes the DAG on the previous page.

Page 14: Building QuakeSim portlets with GTLAB

Advantages of GTLAB• GTLAB provides simplicity to develop science portals

– Rapid development– Easy deployment

• Grid tags provide rich selection of attributes to initialize Grid beans.

• Composite tasks can contain an unlimited number of subtasks

• GTLAB gives flexibility to developers to use their own Grid beans library or add more Grid beans to the existing ones.– Following the method name convention of GTLAB

• Grid beans also can be imported to any presentation logic– GCEShell is a command-line tool

• Grid bean methods are bound to tags with attributes to simplify the building of new Grid portlets

Page 15: Building QuakeSim portlets with GTLAB

• Total overhead = Tsubmit-Trequest = 156 msec (that includes JSF overhead)

• Average overhead of GTLAB is about few milliseconds• GTLAB does not add up significant delay on processing the requests. 15

GTLAB Processing JSF Processing Handler storing Submitting

Time (msec) 2 153 1 410

GTLAB Overhead

Page 16: Building QuakeSim portlets with GTLAB

Conclusion

• We have described Grid portlets to QuakeSim portal.– Initial effort was to build the portal Web services

• Described the process for creating Grid portlets using GTLAB.– We gained rapid development by using reusable

components• Grid tags can handle composite Grid operations

within QuakeSim applications.• Prototyped QuakeSim portlets

– Disloc and Simplex portlets.

16

Page 17: Building QuakeSim portlets with GTLAB

More Information

• GTLAB version 1.0 Beta release available at– http://grids.ucs.indiana.edu/users/manacar/GTLAB-web

site

• See link from main OGCE web site– http://www.collab-ogce.org

• Contact OGCE: [email protected]• Contact Mehmet: [email protected]

17

Page 18: Building QuakeSim portlets with GTLAB

Backup slides

Page 19: Building QuakeSim portlets with GTLAB

Motivation• OGCE Grid portlets typically wrap each single Grid capability in a

separate portlet – GridFTP-->GridFTP Portlet

• Gateway portlets encapsulate sophisticated but specialized functionality.– Such as submitting multiple linked jobs– Each functionality requires a separate portlet

• We need a middle way to “automatically” build complex functionality from component parts– Traditional portlets don’t work as no agreed way to combine component

portlets into an integrated user capability– We need a component model for portlets: reusable portlet parts

• JSF is our starting point– Removes dependencies on the Servlet API.– Backend software is just beans, so can be reused more easily outside of web

and portlet applications.• JSF also provides an extensible framework (tag libraries)