Towards a Javascript CoG Kit Gregor von LaszewskiFugang WangMarlon PierceGerald Guo laszewski @gmail.com http ://grid.rit. edu Please note not everything is yet available. This is a prototype and shows that we can handle Grid Jobs via Javascript. The APIs are not yet released.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Towards aJavascript CoG Kit
Gregor von LaszewskiFugang WangMarlon PierceGerald Guo
• What we need to do: A set of design rules to deal with these. Verification, Input sanitation, Output sanitation, etc.
The Architecture
Grid Abstractions
• We introduce a convenient subset of abstractions that we found useful within the CoG Kits
• We developed new abstractions that increase the functionality and abstraction level to the users
• Abstractions are expressed in Javascript through “objects”
JavaScript CoG Objects - Job / Authentication
• “Executable” is an abstraction for all executable entities, jobs or workflows.– It has fields Attributes, and Provider. Provider could be system, Karajan or another workflow engine’s name. Attributes would be commands or the content of the workflow description while using workflow stated in Provider.
• “Authenticator” is used to do the authentication.– It has fields Attributes, and Provider. And function
authenticate(). Provider could be MyProxy for example, while Attributes contains necessary info to authenticate the user through the specified provider.
Javascripit CoG Workflow• “KarajanWorkflow” represents a Karajan
workflow. It supports hierarchical workflow, which means a workflow can be a “job” in another workflow.– addJob (jobname, job) – A new job is appended to
this workflow. – deleteJob (jobname) – The job with the name
specified by parameter jobname is deleted. As a result, all related dependency is deleted as well.
– listJobs( ) – List all jobs in a workflow. – searchByName(jobname) – Search job in terms of
name. – addDependency (jobparent, jobchild) – Add
dependency which says that job jobparent should be executed before job jobchild.
– removeDependency(jobparent, jobchild) – Remove dependency between job jobparent and job jobchild.
JavaScript CoG Workflow Queue
• “WFQueue” represents a client side queue of Executable objects that have no dependency on each other. – addWorkflow(name, workflow)– Append the
workflow specified by parameter to a workflow queue.
– removeWorkflowByIndex(index) – Remove a workflow according to parameter index.
– removeWorkflowByName(name) – Remove a workflow with name specified by parameter name.
– clearAll( ) – Remove all workflows in the queue. – searchByName(name) – Return the index of the
workflow with the name specified by parameter. If no corresponding workflow exists, return -1.
JavaScript CoG API• Jobs and their status (“CoGJob”)
– authenticate(Authenticator) – The Authenticator’s authenticate() function will be called to authenticate the user.
– execute(Executable, resources) – Submit a workflow to server side to execute. The resources specify necessary resources associated with the jobs.
– transfer(from, source, to, dest) – transfer data “source” from “from” to “dest” in “to”.
– query( ) – Get state of all workflows that were submitted to execute by the user.
– query(workflowids) – Get state of specified workflows that were submitted to execute by the user.
JavaScript CoG API
• “CoGQueue” - Collaboration Queue– listQueues( ) – List all the public queues and/or
queues that the user are participating. – grantAccess(queueID, userlist) – The owner of a
queue can give some other users access privilege to the queue.
– add(queuename, Executable) – Submit a workflow to store for future use or share with other users.
– remove(queueID, sharedWorkFlowID) – The owner of a workflow can remove it. list(queueID); list all workflows’ metadata shared in the queue.
– listParticipants(queueID) – List all the participants of the queue.
– listByUser(queueID, username) – List the workflows’ metadata owned by a user from one queue.