Gateway Developer Guide

Similar documents
HOW TO WRITE AN NDES POLICY MODULE

Online Mission Office Database Software

Whatever happened to cman?

ALEKS. Pairing Student LMS Accounts with ALEKS

Bank Chains Process in SAP

emop Workflow Design Description This section describes the current OCR process workflow at TAMU based on the work 1

MH Campus: Institution Pairing

Pairing Student Learning Management System (LMS) Accounts with ALEKS

How to secure the keyboard chain

Carolina Bachenheimer-Schaefer, Thorsten Reibel, Jürgen Schilder & Ilija Zivadinovic Global Application and Solution Team

Employee Timesheet. Hours Billable? Original S Complete? Client_Name Project Task Desc 03/01/2019

Grids: Why, How, and What Next

Pairing Student Canvas Accounts with ALEKS Through MH Campus

Quorums. Christian Plattner, Gustavo Alonso Exercises for Verteilte Systeme WS05/06 Swiss Federal Institute of Technology (ETH), Zürich

The Light Wizzard Content Management System (CMS)

Data Sharing and Synchronization using Dropbox

SQL: An Implementation of the Relational Algebra

BOOKING.COM CONNECTION PROCEDURE

DALI power line communication

SPIRARE 3 Installation Guide

KEEP THIS COPY FOR REPRODUCTION Pý:RPCS.15i )OCUMENTATION PAGE 0 ''.1-AC7..<Z C. in;2re PORT DATE JPOTTYPE AND DATES COVERID

Agency Info The Administrator is asked to complete and keep current the agency information including web site and agency contact address.

APRIL 2017 KNX DALI-Gateways DG/S x BU EPBP GPG Building Automation. Thorsten Reibel, Training & Qualification

Bigdata High Availability Quorum Design

DESIGNATED MENTOR AGREEMENT

DUBLIN Thick Whois Policy Implementation - IRT Meeting

Why We Measure on Purpose. Mike Waid and Keith Seabourn, Global Church Movements a division of Campus Crusade for Christ (Cru)

Streamlined Administration Model Report to Church Council

The recordings and transcriptions of the calls are posted on the GNSO Master Calendar page

Judaica Europeana: single access to Jewish heritage collections online

ENERGIZE EDITOR (Under 11s) APPLICATION PACK

Why use perfect money and what are its benefits?

Step by step guide to the ESR/Intrepid interface

User Manual Revision English

RootsWizard User Guide Version 6.3.0

Angel Tree Church Coordinator s Guide

Daniel Simmons on ADO.NET Entity Framework April 2, 2007 Our Sponsors

Report Generation WorkFlow. Production for Individual Instructors. BLUE Course Evaluation System. Hossein Hakimzadeh 6/1/2016

SINGAPORE At Large Registration Issues Working Group

APAS assistant flexible production assistant

New: DALI Gateways Launch Presentation

New York Conference Church Dashboard User Guide

E32-DE-IDM-32. Opto-Isolated I/O Board

Archiving websites containing streaming media: the Music Composer Project

ZAKAT AS A SUSTAINABLE AND EFFECTIVE STRATEGY FOR POVERTY ALLEVIATION: From The Perspective of a Multi-Dimensional Analysis

2018 Unit Charter Renewal Guide

Biometrics Prof. Phalguni Gupta Department of Computer Science and Engineering Indian Institute of Technology, Kanpur. Lecture No.

Summer Revised Fall 2012 & 2013 (Revisions in italics)

The AEG is requested to: Provide guidance on the recommendations presented in paragraphs of the issues paper.

NAVAL POSTGRADUATE SCHOOL

Introduction. Selim Aksoy. Bilkent University

The Gaia Archive. A. Mora, J. Gonzalez-Núñez, J. Salgado, R. Gutiérrez-Sánchez, J.C. Segovia, J. Duran ESA-ESAC Gaia SOC and ESDC

FIGURE The SIFRA Compendium. AWRD Tools menu option. Open Introduction of SIFRA. Open SIFRA File for Specific Country

Basic Algorithms Overview

Excel Lesson 3 page 1 April 15

72-Hour Prayer Vigil Procedures

Gateways DALIK v Programming manual

Durham Catholic District School Board. St. Luke the Evangelist Catholic School and St. Matthew the Evangelist Catholic School Boundary Report

Transcription ICANN Los Angeles Translation and Transliteration Contact Information PDP WG Update to the Council meeting Saturday 11 October 2014

Wittgenstein s Logical Atomism. Seminar 8 PHIL2120 Topics in Analytic Philosophy 16 November 2012

Gesture recognition with Kinect. Joakim Larsson

Report on the Digital Tripitaka Koreana 2001

Thriving Synagogue Learning Tool: Creating Buzz 1. Thriving Synagogue Learning Tool Creating Buzz. Overview

Verification of Occurrence of Arabic Word in Quran

LOS ANGELES - GAC Meeting: WHOIS. Let's get started.

What is The Diamond Co-Creative System & Why It Works!

Statistics, Politics, and Policy

TECHNICAL WORKING PARTY ON AUTOMATION AND COMPUTER PROGRAMS. Twenty-Fifth Session Sibiu, Romania, September 3 to 6, 2007

Leveraging mobile Esri technology at VDOT to move into the 21st Century. Michelle Fults, GISP Virginia DOT Matthew Kabak Esri Transportation Practice

AC recording: Attendance is located on agenda wiki page:

ICANN Transcription ICANN Panama City GNSO: CPH TechOps Meeting Wednesday, 27 June 2018 at 17:00 EST

SQL: A Language for Database Applications

Transcription ICANN London IDN Variants Saturday 21 June 2014

A Quranic Quote Verification Algorithm for Verses Authentication

PROPINSIGHT A Detailed Property Analysis Report

Making the stones speak

Toolkit 5 Mission Area Role Descriptions

Big Data: Pig Latin. P.J. McBrien. Imperial College London. P.J. McBrien (Imperial College London) Big Data: Pig Latin 1 / 44

Distributed Systems. 11. Consensus: Paxos. Paul Krzyzanowski. Rutgers University. Fall 2015

Semantic Web related Initiatives: Jewish Vocabularies, Community of Knowledge. Dov Winer

ICANN Prague Meeting New gtld Issues - TRANSCRIPTION Sunday 24th June 2012 at 11:00 local time

ICANN Transcription ICANN Hyderabad. RySG Meeting Sunday, 06 November 2016 at 08:30 IST

MusicKit on the Web #WWDC18. Betim Deva, Engineering Manager, Apple Music DJ Davis, Engineering Manager, Apple Music Jae Hess, Engineer, Apple Music

Lazy Functional Programming for a survey

DURBAN Africa DNS Forum Day 2

A Model for Small Groups at Scarborough Community Alliance Church

Smith Waterman Algorithm - Performance Analysis

Introducing a New Lenten Spiritual Experience for the Whole Parish

Transcription ICANN Durban Meeting. IDN Variants Meeting. Saturday 13 July 2013 at 15:30 local time

Hey everybody. Please feel free to sit at the table, if you want. We have lots of seats. And we ll get started in just a few minutes.

Plans for COSMO-1 within the project COSMO-NExT

10648NAT Diploma of Ministry (Insert Stream)

AUTOMATION. Presents DALI

St. Paul s Day of Action Energy Awareness Day 7 th November 2012

ICANN Transcription ICANN Copenhagen GNSO Non-Commercial Users Constituency (NCUC) E-Team Meeting Saturday, 11 March 2017 at 11:00 CET

OJS at BYU. BYU ScholarsArchive. Brigham Young University. C. Jeffrey Belliston All Faculty Publications

The recordings and transcriptions of the calls are posted on the GNSO Master Calendar page

IATTC Ad hoc Working Group on FADs

ICANN San Francisco Meeting IRD WG TRANSCRIPTION Saturday 12 March 2011 at 16:00 local

Closing Remarks: What can we do with multiple diverse solutions?

Transcription:

Gateway Developer Guide Apache Airavata's Programming API is the API which is exposed to the Gateway Developers. Gateway Developers can use this API to execute and monitor workflows. The API user should keep in mind that a user can not compose an Airavata workflow (.xwf) using the API. Inorder to do that a user can use the XBaya User Interface. Therefore, other than creation of the workflow; Client API supports all other workflow related operations. The main motivation behind, having a Client API is that to expose the user to an API that will let him/her access to a the persistent information stored in the Registry. The information persisted in the Registry can be; Descriptors Workflow information Workflow provenance information Airavata configuration Following are the high level usecases which uses Airavata API. Airavata API Usecases 1. 2. 3. 4. 5. Registry Operations #* Retrieve registry information Update registry information Delete registry information Search registry information Execute workflows#* Run workflow Set inputs Set workflow node IDs Workflow Monitoring Provenance User Management (This is not yet implemented. It's currently in our Road Map and this is added as a place holder.) User roles Administration Airavata API Components The Airavata API consists of 5 main components. 1. Airavata API

2. 3. 4. 5. 6. 7. It is an Aggregator API which contains all the base methods for Airavata API. Airavata Manager This exposes config related information on Airavata. This currently contains Service URLs only. Application Manager This will handle operations related to descriptors. Namely; a. Host description b. Service description c. Application description Execution Manager This can be used to run and monitor workflows. Provenance Manger This provides API to manage provenance related information. ie. Keeps track of inputs, outputs, etc related to a workflow. User Manger User management related API is exposed through this. Currently, Airavata does not support User management but it is in Airavata roadmap. Workflow manager Every operation related to workflows is exposed through this. ie: a. saving workflow b. deleting workflow c. retrieving workflow Registry Operations From AiravataClient, you can access methods of Airavata Regisrty API. Following code snippets shows how you can access registry API via Airavata Client. Once you have registry instance available, you can do many registry operations that are exposed by Registry API. Please note that this code snippet will only works if you are using airavata 0.4 release.

String user = airavataclient.getregistry().getusername(); List<WorkflowExecution> workflowexecutionbyuser = airavataclient.getregistry().getworkflowexecutionbyuser(user); //Get workflow execution data stored in the Registry WRT user for (WorkflowExecution next : workflowexecutionbyuser) { System.out.println(" Experiment ID : " + next.getexperimentid()); System.out.println(" Topic : " + next.gettopic()); System.out.println(" Meta data : " + next.getmetadata()); Thread.sleep(10); With airavata 0.5 release, Airavata Registry API has changed since we replace backend Jackrabbit registry with Mysql/Derby database. However Airavata Registry API is now hidden behind Airavata API. If you are using Airavata API 0.5 or later, you can follow the below code snippet. //get current registry user String user = airavataapi.getcurrentuser(); //get all the experiments run by the given user List<ExperimentData> experimentbyuser = airavataapi.getprovenancemanager().getexperimentdatalist(); //If you are using 0.5 //List<ExperimentData> experimentbyuser = airavataapi.getprovenancemanager().getworkflowexperimentdatalist(); for (ExperimentData next : experimentbyuser) { System.out.println(" Experiment ID : " + next.getexperimentid()); System.out.println(" Topic : " + next.gettopic()); System.out.println(" Meta data : " + next.getmetadata()); Airavata configuration related information can be retrieved using Airavata Manager. // Get Airavata configuration information using Airavata Manager AiravataManager airavatamanager = airavataapi.getairavatamanager(); System.out.println("Message Box Service URL : " + airavatamanager.getmessageboxserviceurl()); System.out.println("Eventing Service URL : " + airavatamanager.geteventingserviceurl()); System.out.println("Registry Service URL : " + airavatamanager.getregistryurl()); Registry can be searched for descriptors using regular expressions. Please note that, this is only valid for Airavata 0.4 release as well.

// Search the registry for a host ApplicationManager applicationmanager = airavataapi.getapplicationmanager(); List<HostDescription> hostdescriptions = applicationmanager.searchhostdescription("ranger"); Iterator<HostDescription> hostdescriptioniterator = hostdescriptions.iterator(); while(hostdescriptioniterator.hasnext()) { HostDescription hostdescription = hostdescriptioniterator.next(); System.out.println("Host Name : " + hostdescription.gettype().gethostname()); System.out.println("XML : " + hostdescription.toxml()); Can retrieve the descriptors saved in the registry using Application Manager. // Retrieve all the host descriptions in the registry List<HostDescription> allhostdescriptions = applicationmanager.getallhostdescriptions(); Iterator<HostDescription> descriptioniterator = allhostdescriptions.iterator(); while(hostdescriptioniterator.hasnext()) { HostDescription hostdescription = descriptioniterator.next(); System.out.println("Host : " + hostdescription.gettype().gethostname()); Saving the host descriptions to the registry using Application Manger. // Save host description HostDescription host = new HostDescription(); host.gettype().sethostname("cutom-host"); host.gettype().sethostaddress("127.0.0.1"); applicationmanager.savehostdescription(host); Execute Workflows Inputs can be set to the workflow using Airavata Client.

// Set the input values to the nodes AiravataAPI airavataapi = AiravataClientUtils.getAPI(config); Workflow workflow = airavataapi.getworkflowmanager().getworkflow(templateid); List<WorkflowInput> workflowinputs = workflow.getworkflowinputs(); int count = 10; for (WorkflowInput workflowinput : workflowinputs) { if ("int".equals(workflowinput.gettype())) { workflowinput.setvalue(count--); Airavata Client can be used to set CPU counts to the workflow nodes. int cpucount = 1; int nodecount = 1; // Set the CPU count to the node Property workflowasstring = airavataclient.getworkflowasstring(templateid); Workflow workflow = new Workflow(workflowAsString.getString()); List<NodeImpl> nodes = workflow.getgraph().getnodes(); for (Node node : nodes) { if (node instanceof WSNode) { ApplicationSchedulingContextDocument.ApplicationSchedulingContext applicationschedulingcontext = airavataclient.getbuilder().getcontextheader().getworkflowschedulingcontext().addnewap plicationschedulingcontext(); applicationschedulingcontext.setserviceid(node.getid()); if (cpucount!= -1) { applicationschedulingcontext.setcpucount(cpucount); if (nodecount!= -1) { applicationschedulingcontext.setnodecount(nodecount); if ("SimpleMathServicePortType_multiply".equals(node.getID())) { applicationschedulingcontext.setnodecount(2); applicationschedulingcontext.setcpucount(2); applicationschedulingcontext.setqueuename("normal"); Workflow can be executed using Airavata Client by dynamically setting the input parameters. // Run the workflow airavataclient.runworkflow("sampleworkflow", workflowinputs, "admin", null, "SampleWorkflow");

[EDIT] A workflow is identified using the name of the workflow called the workflowtemplateid. Given this workflow is present in the Airavata system we can invoke a workflow as follows, //setup inputs for the workflow List<WorkflowInput> workflowinputs = new ArrayList<WorkflowInput>(); workflowinputs.add(new WorkflowInputs("parameter1","value1")); workflowinputs.add(new WorkflowInputs("parameter2",42)); To run a workflow we use the execution managers in the Airavata API. We call this as running an experiment. An experiment is defined as running one or more workflows. Right now Airavata supports running one workflow per experiment as follows, //run the workflow airavataapi.getexecutionmanager().runexperiment(templateid, workflowinputs); Workflow Monitoring Workflow monitoring can be done through the Execution Manger. ExecutionManager executionmanager = airavataclient.getexecutionmanager(); Monitor workflowintancemonitor = executionmanager.getworkflowintancemonitor("sampleworkflow_50388753-1097-4f4a-9265-e6d 1135d3b80"); MonitorConfiguration monitorconfiguration = workflowintancemonitor.getconfiguration(); System.out.println("Topic : " + monitorconfiguration.gettopic()); System.out.println("Broker URL : " + monitorconfiguration.getbrokerurl()); System.out.println("Message Box URL : " + monitorconfiguration.getmessageboxurl()); if(monitorconfiguration.getinteractivenodeids()!=null) { List<String> interactivenodeids = monitorconfiguration.getinteractivenodeids(); for (String nodeid : interactivenodeids) { System.out.println("Node ID : " + nodeid);

Once an experiment is launched a unique id is returned to identify that experiment. You can use this unique id (here onwards called the experiment Id) to monitor the progress of the experiment through Airavata API, String experimentid=airavataapi.getexecutionmanager().runexperiment(templateid,workflowinputs ); Monitor experimentmonitor = airavataapi.getexecutionmanager().getexperimentmonitor(experimentid, new MonitorEventListener() { public void notify(monitoreventdata eventdata, MonitorEvent event) { System.out.println(event.getMessage()); ); experimentmonitor.startmonitoring(); Provanance Provenance related information can be accessed through the Provenance Manager. Please note that this code snippet works with airavata 0.4 release. ProvenanceManager provenancemanager = airavataclient.getprovenancemanager(); // Get all experiments if (provenancemanager.getexperiments()!=null) { List<String> experiments = provenancemanager.getexperiments(); for (String next : experiments) { System.out.println("Experiment : " + next); With airavata 0.5 release to get all experiment IDs, use the following code snippet. ProvenanceManager provenancemanager = airavataapi.getprovenancemanager(); // Get all experiments if (provenancemanager.getexperimentidlist()!=null) { List<String> experiments = provenancemanager.getexperimentidlist(); for (String next : experiments) { System.out.println("Experiment : " + next); User related provenance information can be retrieived through Provenance Manager. Please note that this code snippet works with airavata 0.4 release.

// Get workflow instance information List<WorkflowInstance> workflowinstances = provenancemanager.getworkflowinstances("admin"); for (WorkflowInstance next : workflowinstances) { System.out.println("Workflow Name : " + next.getworkflowname()); System.out.println("Experiment ID : " + next.getexperimentid()); System.out.println("Topic ID : " + next.gettopicid()); With airavata 0.5 release, you can retrieve user related provenance data from the below code snippet. ProvenanceManager provenancemanager = airavataapi.getprovenancemanager(); // Get all workflow experiments for admin user List<ExperimentData> experimentdatalist = provenancemanager.getworkflowexperimentdatalist("admin"); for (ExperimentData experimentdata: experimentdatalist){ System.out.println("****************************************************"); System.out.println("exp name : "+ experimentdata.getexperimentname()); System.out.println("topic name : "+ experimentdata.gettopic()); System.out.println("user name : " + experimentdata.getuser()); List<WorkflowInstanceData> workflowinstancedata = experimentdata.getworkflowinstancedata(); for (WorkflowInstanceData workflowinstance : workflowinstancedata){ System.out.println("Workflow Name : " + workflowinstance.getworkflowname()); System.out.println("Experiment ID : " + workflowinstance.getexperimentid()); System.out.println("Topic ID : " + workflowinstance.gettopicid()); Airavata Rest Services If you are using REST service instead of Airavata Registry, you will need to call the following method. airavataapi = AiravataClientUtils.getAPI(<REST service URI>, getregistryusername(), passwordcallback); passwordcallback class is the implementation of a Callback interface which will be used to retrieve the password for the current user.