Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are...

15
Javascript Cog Kit By Zhenhua Guo

Transcript of Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are...

Page 1: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Javascript Cog Kit

By Zhenhua Guo

Page 2: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Grid Applications

• Currently, most grid related applications are written as separate software.– server side:

• Globus, UNICORE, gLite ...

– client side• Most groups write their own client-side programs to

utilize remote grid services.

Page 3: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Web 2.0

• Recently, web 2.0 becomes popular as a rich client technology.– Ajax– Flex– Silverlight– ...

Page 4: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Combination

• web-based applications vs traditional software– Platform independent– No installation (or minimum installation)

• So, why not write a web 2.0 library for gird access client.

Page 5: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Architecture - Job Submission

client AgentExecutor

MyProxy

Grid

Service

Account database

Authentication.

job execution

Fetch proxy certificate

job submissionrequest. job

forward

XML-RPC or JSON-RPC

By web service interface

CoG Kit

fetch Account data

certificate

Page 6: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Architecture – Query(1)

job queryrequest.client Agent

Executor

MyProxy

Grid

Service

Account database

Authentication.

job status check

Fetch proxy certificate

XML-RPC or JSON-RPC

By web se

rvice

interface

?

CoG Kit

fetch Account data

certificate

Status Repository

status query

status update

Page 7: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Architecture – Query(2)

job queryrequest.client Agent

Executor

MyProxy

Grid

Service

Account database

Authentication.

job status check

Fetch proxy certificate

XML-RPC or JSON-RPC

By web service interface

CoG Kit

fetch Account data

certificate

status query

Page 8: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Procedure Sample• First, user must be authenticated by username and password• User is provided a web-based text area where workflow description

can be input.

For example, a user inputs following Karajan workflow

<project> <include file="cogkit.xml"/> <execute executable="/bin/date" stdout="thedate"

host="gf1.ucs.indiana.edu" provider="GT2" redirect="false"/> <echo message="Job completed. Transferring the output"/> <transfer srchost="gf1.ucs.indiana.edu" srcfile="thedate"

desthost="localhost" provider="gridftp"/> <echo message="Transfer complete"/></project>

• The workflow is transferred to agent server.• Agent server forwards (maybe does some transformation) received request to bac

kend web service.• Backend web service fetches a proxy certificate from MyProxy server before it is a

ble to submit jobs to grid infrastructure.

Page 9: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Client-side Tech

• We choose Ajax because it is enabled almost on all machines.

• Users can submit workflow description by web-based interface

• Users must have accounts to submit jobs.• Javascript library is being written to make

development of client-side grid access program easier (Currently, abstraction is based on Cog kit)

Page 10: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Communication between client and agent

• XML vs JSON– XML

• extensible, powerful• but sometimes we don’t need all its features.

– JSON• simple, efficient• built-in support in Javascript• have limitations

– No absolutely good or bad– Our choice:

• support both of them• users can choose either one they like.• Conversion between them is supported.• XML-RPC and JSON-RPC are used to specify the detailed format.• Currently, XML-RPC is used.

Page 11: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Examples(1)

• XML

<project> <task execute=“/bin/ls” stdout=“list”/> <transfer src=“list” dst=“locallist”/></project>

• JSON{ project: {

task:{execute:/bin/ls,stdout:list} transfer:{src:list, dst:locallist}

}}

Page 12: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Example(2)• XML-RPC • JSON-RPC

{ version:1.1 method:BioCalculate params:

[

workflow1 description,

workflow2 description

]

}

<methodCall> <methodName> BioCalculate </methodName> <params> <param> <value> <string>

workflow1 description </string> </value> </param> <param> <value> <string>

workflow2 description </string> </value> </param> </params> </methodCall>

Page 13: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Agent

• Before users submit jobs, they must be authenticated first.

• Agent receives job submission request from client.

Page 14: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Executor

• CoG Kit is used to hide complexity of various grid infrastructure.

• Before submitting job to final grid infrastructure, a valid proxy certificate must be fetched from MyProxy server.

• This functionality is wrapped as web service to enhance interoperability.

• In my project, Axis2 is used to generate web service interface.

Page 15: Javascript Cog Kit By Zhenhua Guo. Grid Applications Currently, most grid related applications are written as separate software. –server side: Globus,

Future

• Session management– Agent audits job submission from users and

related information should be stored.

• Job management

• More sophisticated authentication mechanism.