Presentation is loading. Please wait.

Presentation is loading. Please wait.

Designing Grid Tag Libraries and Grid Beans Mehmet Nacar, Marlon Pierce, Gordon Erlebacher, Geoffrey Fox GCE 2006 Tampa, FL.

Similar presentations


Presentation on theme: "Designing Grid Tag Libraries and Grid Beans Mehmet Nacar, Marlon Pierce, Gordon Erlebacher, Geoffrey Fox GCE 2006 Tampa, FL."— Presentation transcript:

1 Designing Grid Tag Libraries and Grid Beans Mehmet Nacar, Marlon Pierce, Gordon Erlebacher, Geoffrey Fox GCE 2006 Tampa, FL

2 Introduction Science portals and gateways gain importance by providing portable and useful tools for community.  TeraGrid User portal and Science Gateways There are efforts to provide reusable Grid portlets and portal containers for Grid community  JSR-168 compatible portlets uPortal, GridSphere, Jetspeed2  Grid portlets from OGCE, GridSphere, and others Portlets can be shared between members of the Grid community  Work across JSR 168 compliant containers

3 Problems with portlet development Grid portlets typically wrap each single Grid capability in a separate portlet  Credential generation and management  Job Submission  File transfer and operations  Workflow management Problem is that Grid portlets need to combine these operations  Portlets are entire web applications  We need a way of making it easier to build Grid portlets out of reusable parts  We need a component model for portlets Why is JSFsuitable for Grid Portals?  OGCE community used templates to develop portlets Velocity and JSP (web development templates)  JSF uses Inversion of Control pattern to implement its Model-View- Controller architecture 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)

4 Related Work Grid Portlets 1.3 of GridSphere  Now they are trying to decouple with GridSphere. It’s called Vine (Portlet Vine) as separate 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

5 GTLAB: Grid Tag Libraries and Beans Grid tag libraries are built using JSF custom component development techniques 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.

6 Grid TagsAssociated Grid BeansFeatures ComponentBuilderBean Creating components, job handlers, submitting jobs MonitorBean Handling monitoring page actions MultitaskBean Constructing simple workflow MultitaskBean Defining dependencies among sub jobs MyproxyBean Retrieving myproxy credential FileOprationBean Providing Gridftp operations JobSubmitBean Providing GRAM job submissions FileTransferBean Providing Gridftp file transfer ResourceBean Describes common properties among all tags and beans. Passing values given by standard visual JSF components.

7 Advanced Operations GTLAB can be used to associate multiple Grid tasks with a single 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.  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.

8 Multitask Multitask provides a simple workflow Directed Acyclic Graph (DAG) This example demonstrates a composite Grid job using Grid tags

9 <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/tmp/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” /> GTLAB: Multitask Example JSF Page

10 Going Beyond JSF Tag Libraries JSF Tag Libraries framework is a starting point, but we had to extend it in several ways to support GTLAB requirements.  Parsing XML tag library description and constructing the workflow  Maintaining jobs within a session Bean and listener tables keep handler information  Sharing job handlers between multiple tags in different pages. Job submission forms create job handlers Monitoring pages retrieve handlers from tables and list the status information

11 Component and session management We need to handle JSF component model to import Grid tags that embedded into JSF page  ComponentBuilderBean (CBB) parses JSF page and extracts Grid tags Standard JSF session can also manage only one job submission at a time But GTLAB framework provide session management to handle multiple jobs in a session Most of the Grid jobs are either batch or takes long time to finish. Obviously portlet pages should not block while the job runs  Need to manage job sessions GTLAB allows users proceeding to next pages  Depending on the navigation rules, users can move on to monitoring pages

12 Architecture CBB handles user requests using JSF form pages CBB parses custom components embedded into JSF view page. Creates corresponding Grid task using Factory bean Constructs the workflow by using Multitask bean with dependencies Maintains task handlers and task objects in the session Submit multitasks to Grid services

13 GTLAB Portal Applications Virtual Laboratory for Earth and Planetary Materials (VLAB)  Focuses on computational material science  Scientists launch PWSCF simulations and get visual results.  Composite tasks are orchestrated within a workflow Preparing entry parameters, simulation submissions, transferring results, starting visualization applications Common Instrument Middleware Architecture (CIMA)  Focuses on X-Ray crystallography, instruments and sensor data.  Scientists launch SAINT application Integrates CCD image frames  Example of simple workflow through portlets.

14 Advantages of GTLAB 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 bean methods are bound to tags with attributes to simplify the building of new Grid portlets

15 Conclusion and Future Work We have developed GTLAB Tag Libraries and Java Beans for Java Server Faces.  Encapsulate common Grid tasks  Build Grid portlets out of reusable components  Support multiple Grid tasks in a single user action.  Adapt JSF to consume tag workflow expressions and manage multiple Grid jobs. We will investigate use of sub-graphs within We are investigating abstracting our approach to support different workflow engines. Investigate integrating AJAX with our session management and monitoring.

16 Acknowledgments OGCE http://www.collab-ogce.org/ogce2/ This work is supported by the National Science Foundation’s Information Technology Research (NSF grant ITR- 0428774, 0427264, 0426867 VLab) and Middleware Initiative (NSF Grant SCI 0330613) programs.

17 Additional Slides

18 Overview of JSF Tag Development Basically JSF uses JSP Standard Tag Library (JSTL) and Expression Language (EL) for tag development. There are two types of JSF standard components  Visual: CommandButton, InputText etc.  Non-visual: form, param etc. Two classes required for development of the tags:  UIComponent: Describes encoding/decoding HTML.  ComponentTag: Describes attributes Tag classes should describe attribute bindings.  Value binding -> #{bean.property}  Method binding -> #{bean.method} Grid tags are embedded into JSF view pages and decorated with standard JSF form, input, output and button components

19 Grid tags and attributes

20

21 Sequence diagram

22 Monitoring and management MonitorBean keeps track of status information  Updates archival storage  Retrieves information about jobs Status, input parameters, results and time  MonitorBean caches the monitoring info within the session. Monitoring pages list jobs within HTML Data Table Refreshing the page updates the job list with current information MonitorBean allows users to manage job archive:  Delete tasks, rename for resubmission  Download output files or transfer to the storages Action methods of MonitorBean are fired off by handler tag

23 Input values and navigation handling Grid tags are primarily non-visual tags  They need to bind to JSF form, input and output tags A mediator (ResourceBean) collects user-provided Resource bean describes common property values  Values are hostname, provider, taskname, username etc.  Values are bound to tags using expression language semantic. Grid tags decouples submit pages and monitoring pages Users need not wait on the submit page until it is completed. Directed to the next page immediately. JSF page navigation is done by configuration file called faces- config.xml which describes navigation rules.

24 Background Grid tags have advantages:  Provides more attributes specific to Grid tags that are self- contained and can be customized easily  Composite tasks can contain an unlimited number of subtasks  It gives flexibility to developers to use their own Grid beans library or add more Grid beans to the existing ones.  Grid bean methods are bound to tags with attributes to simplify the building of new Grid portlets  JSF eliminates intervention by proposing JSF tags that separate backing bean and server pages.  Mediates between visual tags and non-visual tags using standard JSF components.

25 JSF Grid Beans Using the factory bean for constructing GenericGridBean beans. We create and manage multiple beans for each task.  That is, I submit the job four times in one session. Beans have listeners and maintain state called TaskListener  Unsubmitted, submitted, active, suspended, resumed are “live”  Failed, canceled, completed, unknown are “dead” Stored in archive (WS-Context or other) Core beans are:  ResourceBean - No action methods defined  MonitorBean, ComponentBuilderBean (CBB) - Action methods


Download ppt "Designing Grid Tag Libraries and Grid Beans Mehmet Nacar, Marlon Pierce, Gordon Erlebacher, Geoffrey Fox GCE 2006 Tampa, FL."

Similar presentations


Ads by Google