1 / 20

Building Grid Portlets with GTLAB

Building Grid Portlets with GTLAB. Mehmet A. Nacar and Marlon E. Pierce Community Grids Lab Indiana University. TeraGrid represents large and growing collection of supercomputing and data storage resources. 20 Petabytes of storage, 280 Teraflops computing power

candra
Download Presentation

Building Grid Portlets with GTLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Building Grid Portlets with GTLAB Mehmet A. Nacar and Marlon E. Pierce Community Grids Lab Indiana University

  2. TeraGrid represents large and growing collection of supercomputing and data storage resources. • 20 Petabytes of storage, 280 Teraflops computing power • Unified accounting and allocation system

  3. The “Grid” in TeraGrid: View from Space The Coordinated TeraGrid Software and Services (CTSS) represents a common software/middleware stack on TeraGrid machines. Globus and other parts of CTSS give a common programming environment for remotely interacting with TeraGrid resources. Services include GRAM: resource access GridFTP: data management MyProxy: remote authentication infrastructure Information Services (GPIR, QBETS, MDS, etc) You Are Here

  4. Science Portals and Gateways Science Gateways and Web portals build on the CTSS stack. Aggregating clients, user interfaces Ex: VLAB portal TeraGrid Science Gateway program: http://www.teragrid.org/programs/sci_gateways/ Many Java-based gateways are based on the portlet component model. Portlets are reusable portal parts that can be shared between development groups. Open Grid Computing Environments project provides grid portlets encapsulating common features. Our work to support VLAB is to build reusable libraries for building portlets. GTLAB

  5. Motivation • OGCE Grid portlets typically wrap each single Grid capability in a separate portlet • GridFTP-->GridFTP Portlet • Gateway portlets encapsulate sophisticated but specialized functionality. • Submitting PWSCF jobs • We need a middle way • We need a component model for portlets: reusable portlet parts • Java Server Faces (JSF) is our starting point • Remove dependencies on the Servlet API. • Backing beans are just beans, so can be reused more easily outside of web and portlet applications. • JSF also provides an extensible framework (tag libraries) • Apache JSF portlet bridge allows you to convert standalone JSF applications (development phase) into portlets (deployment phase).

  6. Introduction to GTLAB • Encapsulates clients to common Grid services as XML tag libraries and backing 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 and the Java CoG Kit.

  7. GTLAB Example • Grid tags are associated with Grid services via Grid beans • Grid Beans wrap the Java COG Kit (version 4) • We show an example JSF page section below. • This allows you to develop new Grid portlets with no additional Java code. <html><body> < f:view> <!-- Other user interface tags go here--> <f:form> <o:submit id=”test” action=”next_page”> <o:myproxy id=”pr” hostname=”gf1.ucs.indiana.edu” port=”7512” lifetime=”2” username=“mnacar” password=”***” /> <o:jobsubmit id=”task” hostname=”cobalt.ncsa.teragrid.org” provider=”GT4” executable=”/bin/ls” stdout=”tmp/result stderr=”tmp/error” /> </o:submit> </f:form> </f:view> </body> </html>

  8. Complex Operations • GTLAB can be used to associate multiple Grid tasks with a single <form> action click. • We call this a “multitask” • This is a form of workflow (DAG) • We build on top of CoG workflow capabilities. • We are investigating how to abstract this to use other workflow engines. • Each multitask should be associated with a submit button or command link. • This allows many multitasks in a JSF form. • It’s useful in some cases to bind relatively different multitask with the same user input parameters.

  9. 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

  10. 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.

  11. A Simple Use Case You (the portal developer) have a code that you want to run on the TeraGrid through your portal. You will need to develop these parts: User interface layout in JSF/JSP so user can provide input information and select a host to run on. The JSF/JSP file will also include the GTLaB tags on the following slide. Some Java code to construct an input file. You will NOT have to reimplement all of the Grid code that describes your action methods.

  12. JSF Page with Grid Tags Note the specific values would typically come from the user’s form inputs through the Resource Bean. <o:submit id="submit" value="Submit" binding="#{builder.body}" action="#{builder.junkAction}" > <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="/…/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> </o:submit>

  13. Integration with JSF Form Elements • Developers embed Grid tags snippet into JSF page • These components are non-visual and are not displayed in HTML. • Resource bean provides bridging with form inputs and GTLAB framework. • <h:outputText value="Taskname: "/>   <h:inputText value="#{resource.taskname}" />   <o:multitask id="multi" persistent="true" taskname="#{resource.taskname}" /> • Dynamic values to Grid tag attributes are provided by Resource bean.

  14. Tracking and Managing Jobs • GTLAB manages lifecycles of jobs and monitor their status. • Grid operations are usually batch processes • We provide callback mechanism to follow up the jobs • GTLAB creates callback handlers for jobs and persistently stores them via object serialization. • Can be later de-serialized. • GTLAB handlers manages the job events such as stopping, canceling or resuming the running jobs. • GTLAB provides archive for job metadata and allows managing the archive • Handler tag helps to organize user’s job repository • <o:handler id=”delete” action="#{monitor.delete}" > <f:param id="task" name="taskname“ value="#{task}"/> </o:handler>

  15. Managing Metadata Repositories • Job metadata is stored in metadata repositories • Metadata includes: submission parameters and files, execution host and information, output parameters, files and their location • Job data is stored on the specified servers. As a result data files are transferred by using GridFTP • Metadata of the data files such as URL location or GridFTP locations are saved in the metadata repository • Portal users see the job metadata that has links to the exact location of the data • Metadata repository is built by using WS-Context repository • Users see job metadata with the time stamped hierarchical repository labels • /vlab/userA/sessionC/08-08-07/12:22/jobID

  16. Summary and Conclusions • We briefly described the TeraGrid, Grid middleware, and Science Gateways. • Motivation for our work: portlet-based gateways need to be composed out of reusable parts. • Our solution: GTLAB tag libraries and backing beans • XML tag libraries backed by Java beans that encapsulate common (Globus) Grid tasks. • Extend JSF framework • GTLAB tags can be arranged into DAGs to express composite tasks

  17. More Information • GTLAB version 1.0 Beta release available at • http://grids.ucs.indiana.edu/users/manacar/GTLAB-website • Contact Marlon: mpierce@cs.indiana.edu • Contact Mehmet: mnacar@indiana.edu

  18. Relation to Web 2.0 Web 2.0 can be divided into several major categories, including primarily Rich client interfaces (RCI) such as AJAX REST-style Web services (typically transmitting RSS or Atom XML). GTLaB and RCI GTLaB does not directly address this either way RCI can be achieved through JSF implementations (which generate the necessary JavaScript). Or you can mix and match, using YUI or Scriptaculous Javascript libraries with your JSF. GTLaB and REST Conceivably we could also build REST clients for consuming and manipulating RSS feeds. (c.f. Yahoo Pipes) This would require a new workflow engine implementation. For a more thorough survey, see http://grids.ucs.indiana.edu/ptliupages/presentations/CTSpartIMay21-07.ppt http://grids.ucs.indiana.edu/ptliupages/presentations/Web20Tutorial_CTS.ppt http://grids.ucs.indiana.edu/ptliupages/publications/CIWeb20Chapter.doc

  19. Related Work Grid Portlets 1.3 of GridSphere Now they are trying to decouple with GridSphere. It’s called Vine (Portlet Vine) asseparate project Grid Portlets 1.3 provide API and UI tags to build Grid portlets RSF (Reasonable Server Faces) Derived from JSF, but it separates HTML pages and backing beans RSF provides non-visual components unlike JSF Beans can be contained by Spring like containers. Lifecycles of beans managed by Spring OGCE portlets Packages Velocity, JSP and JSF portlets Provides portlet package for several Grid applications such as Globus, Condor, SRB and GPIR

More Related