190 likes | 294 Views
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
E N D
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
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 components
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.
Ant script for Disloc service <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>
Grid tags for Disloc portlet <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>
GTLAB Standard JSF JSF Action • 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 • 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
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
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 do
Encoding DAGs in Portlets 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
DAG Example JSF Page <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> This encodes the DAG on the previous page.
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
GTLAB Overhead • 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.
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
More Information • GTLAB version 1.0 Beta release available at • http://grids.ucs.indiana.edu/users/manacar/GTLAB-website • See link from main OGCE web site • http://www.collab-ogce.org • Contact OGCE: discuss@ogce.org • Contact Mehmet: mnacar@indiana.edu
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)