webflow: web interface for computational modules presented by tomasz haupt northeast parallel...

111
WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project is sponsored by the U.S. Army Corps of Engineers Waterways Experimental Station MSRC (Vicksburg, MS) er the DoD Modernization Program, Programming Environment and Train

Upload: kelley-osborne

Post on 12-Jan-2016

217 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow:Web Interface

for Computational Modules

presented by

Tomasz HauptNortheast Parallel Architectures Center

at Syracuse University

This project is sponsored by the U.S. Army Corps of Engineers Waterways Experimental Station MSRC (Vicksburg, MS)

under the DoD Modernization Program, Programming Environment and Training

Page 2: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Authors

• Erol Akarsu (*)• Geoffrey Fox• Tomasz Haupt• Alexey Kalinichenko (*)• Kang-Seok Kim (*)• Praveen Sheethalnath (*)• Choon-Han Youn

(*) student

Synergistic projects(led by W. Furmanski)

at NPAC: FMS

Object WebHLAJWORB

http://bombay.npac.syr.edu/fms

alsoTango

Page 3: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Agenda

• Part I: Introduction (25 min)• Part II: WebFlow Design (45 min)• Part III: WebFlow Security (20 min)• 10:30 -10:45 break• Part IV: WebFlow Applications (75 min)• 12:00-1:30 lunch• Part V: How to Write WebFlow modules (15 min)• Part VI: LMS details, Demos, Discussion

Page 4: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Part I

Introduction

Page 5: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow Mission

• seamless access to remote resources– through a Web based user interface

– customized application GUI

• high-level user friendly visual programming and runtime environment for HPDC

• portable system based on industry standards and commodity software components

Page 6: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Remote Resources

Front-End

FRONT-END:high-level user friendly - visual programming and authoring tools - application GUI

RESOURCES:all hardware and software components needed to complete the user task, including, but not limited to, compute engines from workstations to supercomputers, storage, databases, instruments, codes, libraries, and licenses.

Desktop/Laptop

Seamless Access

Page 7: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Seamless Access

• Create an illusion that all resources needed to complete the user tasks are available locally.

• In particular, an authorized user can allocate the resources she needs without explicit login to the host controlling the resources.

• An analogy: NSF mounted disk or a network printer.

Page 8: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Examples:

• WebSubmit (NIST)

• TeraWeb (NCS, Inc.)

• CCM PSE (OSC)

• many others

WebBrowser

SP-2 O2K

CGI CGI

SSL

Disadvantage: - client/server based on custom protocol over CGI

Page 9: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Example: Globus

Advantages:- platform independent mini-language (RSL) for specification of resources- can be layered on top of different schedulers- enables interoperability between resources (can allocate many resources at a time, file transfer, monitoring, etc.)

Disadvantage: - a bag of low level tools

GRAMClient

Gatekeeper Gatekeeper Gatekeeper

Contact addressResource Language Specification

MDSDirectoryService

GSS-API

Page 10: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Towards a complete solution ...PSE: problem description (physics, chemistry, ...)

Task description: I need 64 nodes of SP-2 at Argonne to run my MPI-based executable “a.out” you can find in “/tmp/users/haupt” on

marylin.npac.syr.edu. In addition, I need any idle workstationwith jdk1.1 installed. Make sure that the output of my a.out is

transferred to that workstation

Middle-Tier: map the user’s task description onto the resource specification; this may include resource discovery, and other services

Resource Specification

Resource Allocation: run, transfer data, run

Page 11: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Remote Resources

Front-End Front-End

Middle-Tier

Resource Specification

Abstract Task Specification

We need a third tier!

Page 12: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Target Architecture

Middle-Tier

Resource Specification

Abstract Task Specification

ProblemSolving

Environments

OO VisualAuthoring

Tools

Data-FlowVisual

Authoring

CustomApplication

GUIOther

WebFlow

Back-End Resources

Page 13: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Middle-Tier

Resource Spec.

A. Task Spec.

PSE OODataFlow

CustomGUI Other

WebFlow

DATORR, Alliance

DATORR, Alliance

HPCC: Globus

Other as needed

DBMS: JDBC

Small tasks: Javauser codes

https, IIOP/SECIOP

Example: IPSE

Under development

NCSA Alliance

Example: LMS

Page 14: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Example of a custom GUI:LMS Front-End

Navigate and choose an existing application

to solve the problem at hand.Import all necessary data.

Retrieve data

Pre/post-processing

Run simulations

Select host

Select model

Set parameters

Run

Page 15: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

PSE Example: CCM IPSE

Ken Flurchick, http://www.osc.edu/~kenf/Gateway

1 .Define your problem2. Identify resources (software and hardware)3. Create input file4. Run your application5. Analyze results

Page 16: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

QS Front End

Compose interactivelyyour applicationfrom pre-existing

modules

Data-Flow Front-End

Page 17: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Part II

WebFlow Design

Page 18: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Implementation Strategy

• Follow industry standards– distributed objects: CORBA, Java, JavaBeans...– security: https, PKI, GSSAPI, SSL, Keberos5

• Participate in creation of standards– DATORR, Alliance PKI

• Use commodity components– Commercial: Web servers and browsers, ORB– Academic: Globus, Akenti,...

Page 19: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Java Grande: DATORRDesktop Access to Remote Resources

• Development of WebFlow coincides with DATORR standardization initiative

• Could lead to definition of CORBA facilities or Java framework for computing services

• Defines:– Abstract Task Specification (“user view”)– Metacomputing Services API (“system view”)– Security Standards

http://www-fp.mcs.anl.gov/~gregor/datorr/soon to become http://www.datorr.org

Page 20: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow design

• Object Oriented, follows JavaBeans model– everything is an object– objects interact through events

Object A(event source)

Object B(event target)

Fire event EMethod M(){…}

Firing event E by object A causes invocation of method M of object B.The association of event E and method M is achieved by an eventregistration mechanism. An event is also an object and it carries data.

Page 21: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

A few words about CORBA

(a digression)

more information on Java, Corba, Distributed Object:

http://www.npac.syr.edu/projects/cps616spring96/index.html

Page 22: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Distributed objects

• Typically WebFlow objects live in different address spaces. We use CORBA to invoke methods of the remote objects.

Object A(event source)

Object B(event target)

Fire event EMethod M(){…}

ORB

Page 23: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

How is this possible?

ORB2

Object A(event source)

Object B(event target)

Fire event EMethod M(){…}

ORB1IIOP

- Objects A and B are CORBA objects (thus not Java objects)- Objects are defined in IDL (Interface Definition Language)- IDL definitions are compiled using (Java)IDL compiler- The IDL compiler generates new classes to be used by the Java compiler (javac) instead of the original ones, on both the client and server side- The IDL compiler generates either classes to be extended, or interfaces to be implemented

Object Adapterserves also as a daemon

Page 24: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Example of IDL definition#include “..\BC.idl”module WebFlow { module lms{ interface runEdys:BeanContextChild { void run(); void receiveData(); void setParameter(in string p); }; interface runCasc2d:BeanContextChild{ void run(); void runAgain(); }; interface DoneEvent{ Object getSource(); }; };};

We will create 3 CORBA objects

* two modules: - runEdys - runCasc2d * one event - DoneEvent

They will be added to packageWebFlow.lms

Page 25: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

We need more flexibility...

• WebFlow objects are developed independently of each other(reusable modules): we cannot assume that the event source knows anything about the event target and vice versa

Page 26: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Event binding

addEventListenerrmEventListenerfireEvent(E,M)

method M

Event Source Event TargetAdapter

Event

ORB

binding table

DII DSI

Page 27: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Controlling a moduleApplet

ModuleControls

Proxy Module

ModuleActionButton1ActionButton2

….

IIOP

Another complication:Java sandbox!

Page 28: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Adding a remote moduleLocal Host

Add module

Module Factory

Proxy Module

Remote Host

FE

requestAdd module

Module Factory

Module

Page 29: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Back to WebFlow design

Page 30: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow Server

• The WebFlow server is a container object, a.k.a. context - in fact it implements JavaBeanContext class (Java1.2)

• The BeanContext acts as a logical container for JavaBeans (“WebFlow modules and services”) and BeanContexts.

Page 31: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

User 1 User 2

Application 1

Application 2

App 2App 1

WebFlow Server

WebFlow server is given by a hierarchy of containers

and components

WebFlow server hosts users and services

Each user maintainsa number of applications

composed of custom modules

and common services

WebFlow Services

Page 32: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

CORBA Based Middle-Tier

Mesh of WebFlow Serversimplemented as CORBA objects

that manage and coordinate

distributed computation.

Front End

GatekeeperAuthenticationAuthorization

Page 33: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow Context HierarchyMaster Server (Gatekeeper)

Slave Server

Slave Server

User Context

Application Context

Module

Slave Server Proxy

Page 34: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Gatekeeper

Page 35: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Services User Modules

Data FlowFront-End

Middle-Tier modulesserve as proxies ofBack-End Services OO

Front-End

User Space Definition and Task Specification

Metacomputing Services

Back-End Resources

Page 36: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Modules

• Similar to JavaBeans– full power of Java (or C++) to implement

functionality– can encapsulate legacy applications

• May serve as Proxies– JDBC– metacomputing services (such as Globus)– schedulers (such as PBS, CONDOR, etc)

Page 37: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Services

• Services are modules provided by the system and offers a generic functionality– job services (submit,monitor,kill,... a job)– file services (edit,copy,move,… a file)– XML parser– database access– mass storage access– ...

Page 38: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Example of a proxy module

&(rsl_substitution = (MYDIR “/tmp/haupt”))(DATADIR $(MYDIR)/data)(EXECDIR) $MYDIR)/bin))(executable = $(EXECDIR)/a.out)(arguments=$(DATADIR)/file1)(stdout=(MYDIR)/result.dat))(count=1)

GRAM resource descriptionGenerate Data

Run Job

Analyze

The Run Job module is a proxy module. It generates the RSL on-the-fly and submits the job for execution using globusrun function.

The module knows only exec name, location and its arguments/parameters.

Page 39: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WebFlow over Globus

• In order to run WebFlow over Globus there must be at least one WebFlow node capable of executing Globus commands, such as globusrun

• Jobs that require computational power of massively parallel computers are directed to the Globus domain, while other jobs can be launched on much more modest platforms, such as the user’s desktop or even a

laptop running Windows NT.

Bridge between WebFlow and Globus

Page 40: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Part III

WebFlow Security

(design)

Page 41: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Secure Access: terminology• Access Control (or Authorization)

– Assurance that the person or computer at the other end of the session is permitted to do what he asks for.

• Authentication– Assurance that the resource (human or machine) at the other end of the

session is what it claims to be

• Integrity– Assurance that the information that arrives is the same as when it was sent

• Accountability (or non-repudiation)– Assurance that any transaction that takes place can subsequently proved to

have taken place

• Privacy– Assurance that sensitive information is not visible to an eavesdropper

(usually achieved using encryption)

Page 42: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Secure Access

• Mutual authentication of servers and users– Certificates, Keberos/SecurID

• Access control– Full autonomy of the resources owner(s)– Akenti

• Privacy

• Integrity

Page 43: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

SECIOP

Security Model

Front End Applet

https

authentication& authorization

Gatekeeper

delegation

Stakeholders

HPCC resources

GSSAPIGSSAPI

Layer 1: secure Web

Layer 2: secure CORBA

Layer 3: Secure access to resources

Policies defined by resource owners

https (SSL)AKENTI

CORBA security service

GSSAPI (Globus)

Page 44: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Distributed Objects are less secure

• can play both client and server– in client/server you trust the server, but not the clients

• evolve continually– objects delegate parts of their implementation to the other objects (also dynamically composed at

runtime). Because of subclassing, the implementation of an object may change over time

• interactions are not well defined– because of encapsulation, you cannot understand all the interactions between objects

• are polymorphic (ideal for Trojan horses!)

• can scale without limit – how do you manage the access right to millions of servers?

• are very dynamic

Page 45: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

CORBA security is built into ORB

Secure Communications

Authentication

ClientUser

Encryption Audit Authorization

Server

Encryption

Credentials

ObjectAdapterORB

Page 46: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Authentication

• A principal is authenticated once by ORB and given a set of credentials, including one or more roles, privileges, and an authenticated ID.

• An authenticated ID is automatically propagated by a secure ORB; it is part of the caller context

Principal Credentials

Current

Client Server

set_credentials get_attributes

authenticate

Page 47: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Privilege Delegation

• No delegation– The intermediary uses its own credentials

• Simple delegation– The intermediary impersonates the client

• Composite delegation– The intermediary uses both

ClientT

arge

t

Clie

nt

Tar

get

Clie

nt

Tar

get

Clie

nt TargetObject

IIOP

Page 48: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

CORBA access model

• Based on a trusted ORB model:you must trust that your ORB will enforce the access policy on the server resource

• The ORB determines:if this client on behalf of this principal can do this operation on this object

• Server uses Access Control Lists (ACL) to control user access

Principal Role Rights Operation

Page 49: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Mary Thompson, http://www-itg.lbl.gov/security/Akenti/DOE2000/sld014.htm

Page 50: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Part IV

WebFlow Applications

Page 51: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

• Applications vary by the functionality of their Front-Ends– Front-End Applications

• must be pre-installed

• run fast, no restrictions

– Front-End Applets• no installation, but may take time to download

• sandbox restrictions apply, unless signed

Page 52: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

• Applications vary by how they are composed from modules– statically

• can by prepared in the Middle-Tier

– dynamically• the user composes them from reusable components

Page 53: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

• The modules can interact with each other in different ways:– through events (object oriented approach)– through ports (data flow model)– through message passing

Page 54: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

• Applications vary on how the Front-End interacts with the Middle-Tier– A complete task description is sent to the

middle-tier• composed of reusable modules

• predefined

– Objects are added to the user context one at a time, and Front-End keeps their references

Page 55: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Landscape Management System

Page 56: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

LMS Objectives To develop a web based system that implements a

“navigate-and-choose” paradigm and allows the end user to: – Select (a set of) computational modules that provide

answers to the problem at hand

– Retrieve input data sets from remote sources

– Use adequate (remote) computational resources

– Visualize and analyze output data on the local host

Anytime, anywhere, using any platform

(e.g., a connected to the Internet laptop PC)

Page 57: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

LMS: Changes in Vegetation A decision maker (the end user of the system) wants to

evaluate changes in vegetation in a geographical region over a long time period caused by short term disturbances such as a fire or human activity.

One of the critical parameters of the vegetation model (EDYS) is soil condition at the time of the disturbance.

This in turn is dominated by rainfall that possibly occurs at that time (CASC2D simulation)

Input data for the simulations are available from the Internet, such as Data Elevation Models (DEM) from USGS web site or from custom databases (spices characteristics)

Page 58: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

LMS: Changes in Vegetation

Data retrieval Data preprocessing Simulation: two

interacting codes EDYS CASC2D

Visualization

WMS

EDYS CASC2D

DEM Land UseSoil

TextureVegetation

EDYS: vegetation model CASC2D: watershed modelWMS: Watershed Modeling System

Page 59: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

LMS Front End

Data retrieval Data pre- and post-processing Simulations

Page 60: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Data RetrievalThe data wizard allows the user to

interactivelyselect the data anddownload them tothe local machine.The raw data arethen fed to the WMS system

launched from the browser to

generate input filesfor simulations.

Page 61: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Launching coupled simulations on different Back-End computational resources

Select host

Select model

Set parameters

Run

Page 62: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

WMS based Visualizations

The results of the simulations are send

back to the Front-End, and can be visualized using tools included

in WMS package

Page 63: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Implementation of LMS

• Front-End (client) is a Java application– Data wizard, EDYS and WMS are run locally

• “navigate and choose” - no interactive composition of applications– EDYS, CASC2D, EDYS and CASC2D

• modules exchange data through message passing mediated by WebFlow

• client keeps the module references

Page 64: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

Running LMS

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

WebFlow ServersClient

- WebFlow modules

Page 65: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

To run LMS

• Start web servers on both machines

• Start master on WinNT

• Start slave on WinNT

• Start slave on UNIX

• Start client (Java lms) on WinNT

Page 66: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Client code

try { //add modules p1 = slaveNT.addNewModule("runEdys"); //as defined in conf.file runEdys re = runEdysHelper.narrow(p1); p2 = slaveUNIX.addNewModule("runCasc2d"); //as defined in conf.file runCasc2d rc = runCasc2dHelper.narrow(p2); //bind events master.attachEvent(p2,"Casc2dDone","Casc2dDone",p1,"run"); master.attachEvent(p1,"EdysStarted","EdysStarted",p2,"run"); master.attachEvent(p1,"EdysDone","EdysDone",p2,"runAgain"); //invoke methods of runCasc2dImp rc.run(); } catch(COMM_FAILURE ex) {System.err.println(ex.getMessage()); System.exit(1);}

Page 67: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

1.start runCasc2d;

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

Page 68: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

2. casc2 starts in a new thread, uploads datato its web server and sends “done” event to Edys;

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 69: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

3. casc2 waits for new data from Edys; Edys downloads data and runs ‘till the first rain event

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 70: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

4. casc2 waits for data;Edys uploads data, sends event “done” and quits

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 71: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

5. runcasc2 fetches data from remote web server

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 72: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

6. Casc2d detects new data and resumes execution

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 73: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

7. Casc2d completes the rain event and writes new data; runCasc2d detects new data and sends event to Edys

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 74: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

8. Edys fetches data from the remote web server and starts;casc2d waits for new data

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2d

Page 75: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Write

slave

9. This cycle is repeated ‘till all rain events are processed

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

casc2dIIOP

http

Write

http

Page 76: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

10. Casc2d quits, final run of Edys begins

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

Page 77: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

slave

11. Edys terminates. All data are on the WinNT side and can be visualized using WMS tools.

runCasc2d

master

UNIXWinNT

slave

runEdys

lms.class

Data wizardWMS

exeCasc2d

WebServer

WebServer

Page 78: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Quantum Simulations

Page 79: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Quantum Simulations

Page 80: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

QS: WebFlow implementation

Page 81: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project
Page 82: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Implementation of QS

• Front-End (client) is a Java applet

• applications are created dynamically from pre-existing modules

• modules exchange data through ports (data flow model)

• server keeps the module references;the references are published on a web site

Page 83: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

QS: Front-End

Page 84: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Building an application

XMLA visual representation

is converted into a XMLdocument

XMLservice

WebServer

save

parse

ApplContext

Generates Java code to add modules to ApplContextPublishes IOR

Front-End Applet

Middle-Tier

Page 85: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Document Type Definition <!DOCTYPE taskspec [ <!ELEMENT taskspec (task)+> <!ATTLIST taskspec UserContextRef CDATA #REQUIRED AppName CDATA #REQUIRED><!ELEMENT task ((task | module)*,connection*) > <!ELEMENT module (#PCDATA) > <!ATTLIST module modulename CDATA #REQUIRED host CDATA #REQUIRED > <!ELEMENT connection (out,in)> <!ELEMENT in EMPTY> <!ELEMENT out EMPTY> <!ATTLIST out modulename CDATA #REQUIRED eventname CDATA #REQUIRED<!ATTLIST in modulename CDATA #REQUIRED method CDATA #REQUIRED > ]>

Page 86: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Example XML document

<taskspec UserContextRef="123as321" AppName="TestApplication"><task> <module modulename="FileBrowser" host="localhost"> </module> <module modulename="FileEditor" host="localhost"> </module> <module modulename="Gaussian" host="localhost"> </module> <connection> <out modulename="FileBrowser" eventname="FileEvent" event="File"/> <in modulename="FileEditor" method="run"/> </connection> <connection> <out modulename="FileEditor" eventname="FileEvent" event="File"/> <in modulename="Gaussian" method="run"/> </connection></task></taskspec>

Page 87: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Object Oriented Applications

Page 88: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Mobility System’s Applications

Coordinatestransformations

databases

Remote HPCC resources

- object oriented approach - implementation:- CORBA based Middle-Tier - bean-box type API - JDBC proxy modules

- Web interface to store data in DB in variable format- Data transfer from DB to a visualization engine- Coordinates transformations on a remote server- Launching simulations on remote hosts with interactive input

Page 89: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Building an application

Applet ApplicationContext

Netscape ORB ORBacus ORBIIOP

List of servers

List of modules

List of events

List of methods

E M

Add module

Attach Event

local remote

Adapter LLM

Page 90: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

IPSE/Gateway Project

Page 91: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Services User Modules

Back-End Resources

Front-End

Back-End services comprise Tier 3.

Tier 1 is a high-level Front-End for visual programming

Distributed object-based, scalable, and reusable Web server and Object broker

Middleware forms Tier 2

Page 92: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Multi-tier Architecture of Gateway

Page 93: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

• Master Server is started by administrator•command line•administrator page

• Slave Server is started by administrator•command line•administrator page

•User Context is created by Servlet• Slave server method • Security

• Application Context is created by User• User Context method

• Module are added by User• Application Context method

Starting Gateway

Slave Server

User Context

Slave Server

Page 94: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Initialization of a session

PortalPage

SecureWeb Server

Mutual

authentication

start

AKENTI

CredentialsGlobus Cert.

Front EndApplet

WebFlowServer User

ContextNetscape’s ORB ORBacus ORB

IIOP

Page 95: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Middle-Tier is given by a mesh of WebFlow Servers that manage

and coordinate distributed computation

.

• WebFlow applications are composed of independent reusable modules• Modules are written by module developers who have only limited knowledge of the system on which the modules will run.• The WebFlow system hides module management and coordination functions

Page 96: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Summary of features

• Single Web-based access via Gateway portal• Security based on standards: https, PKI,

secure ORB, GSSAPI (SSL/Keberos5)• Access policies controlled by stakeholders• WebFlow API allows implementation of many

different front-ends• Modern three-tier architecture (distributed objects)• Access to HPCC through metacomputing services

Page 97: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

How to use WebFlow

• A production version is being developed within Gateway project (ASC/OSC)– first release: Jun’99

(with security features, and a subset of services)

– Beta release: Sept’99

– release 1.0: Nov-Dec’99 (SC’99)

• A preliminary version is available now• I am looking for WebFlow applications

and I am ready for a collaboration

Page 98: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

How to install• Middle-Tier

– Java1.2 (a.k.a. Java2)– ORBacus (http://www.ooc.com)– WebFlow classes ([email protected])

• Web Server (optional)– for LMS, any will work: it must serve documents (Apache, Jigsaw)– Applets as Front-End: more convenient to use servlets

(Jigsaw is the easiest to install both UNIX and WinNT)– for secure Web transactions: SSL based server

(ApacheSSL, JigsawSSL)

• Secure Middle-Tier: ORBacusSSL, Akenti• Recommended HPCC backend: Globus or Globus GSS-API• Front-Ends (from simple to sophisticated)

Page 99: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Updates

• Contact person: Tomasz Haupt

[email protected]

• voice (315) 443-2087

• http://www.npac.syr.edu/users/haupt/WebFlow/demo.html

Page 100: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

How to write a WebFlow module

Page 101: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Write IDL definition

#include “..\BC.idl”module WebFlow { module lms{ interface runEdys:BeanContextChild { void run(); }; interface runCasc2d:BeanContextChild{ void run(); }; interface DoneEvent{ Object getSource(); }; };};

We will create 3 CORBA objects

* two modules: - runEdys - runCasc2d * one event - DoneEvent

They will be added to packageWebFlow.lms

Page 102: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Compile usig jidl --tie

#include “..\BC.idl”module WebFlow { module lms{ interface runEdys:BeanContextChild { void run(); } interface runCasc2d:BeanContextChild{ void run(); } interface DoneEvent{ Object getSource(); }; };};

The compiler will create 3 Java interfaces:

- runEdysOperations.java - runCasc2dOperations.java - DoneEventOperations.java

You have to implement theseinterfaces. Without --tie option the compilerwill generate classes to be extended. We already extend from BeanContextChild

Page 103: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Implement the interfacesmodule WebFlow { module lms{ interface runEdys:BeanContextChild { void run(); };

package WebFlow.lmsimport WebFlow.*;import WebFlow.event.*;import org.omg.CORBA.*;public class runEdysImpl extends WebFlow.BeanContextChildSupport implements runEdysOperations {String msg;public runEdysImpl(org.omg.CORBA.Object peer, String msg) { super(peer); this.msg=msg;}public void run() { …}}

Page 104: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Compile everything (javac)

• Everything means: (for runEdys):– runEdys.java– runEdysHelper.java– runEdysHolder.java– runEdysOperations.java– StubForrunEdys.java– _runEdysImplBase_tie.java

Page 105: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Add modules to config files

• master.conf

Server name = masterFile=D:\Jigsaw\Jigsaw\WWW\Gateway\IOR\master.refURL=noneModules:==================================runEdys lms.idl WebFlow.lms.runEdysImplrunCasc2d lms.idl WebFlow.lms.runCasc2dImplEvents:===================================EdysDone ..\BC.idl WebFlow.lms.EdysDoneImpl IDL:WebFlow/lms/EdysDone:1.0Casc2dDone ..\BC.idl WebFlow.lms.Casc2dDoneImpl IDL:WebFlow/lms/Casc2dDone:1.0

Page 106: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Add modules to config files

• slave.conf

Server name = masterFile=noneURL= http://kasia.npac.syr.edu:8001/Gateway/IOR/master.txtModules:==================================runEdys lms.idl WebFlow.lms.runEdysImplrunCasc2d lms.idl WebFlow.lms.runCasc2dImplEvents:===================================EdysDone ..\BC.idl WebFlow.lms.EdysDoneImpl IDL:WebFlow/lms/EdysDone:1.0Casc2dDone ..\BC.idl WebFlow.lms.Casc2dDoneImpl IDL:WebFlow/lms/Casc2dDone:1.0

Page 107: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Simple ClientPublic class Client {

public static void main(String args[]) {

configReader config;ORB orb = ORB.init(args, new java.util.Properties());String masterURL = args[0];String ref=getIORFromURL(masterURL);org.omg.CORBA.Object obj=orb.string_to_object(ref);WebFlowContext master=WebFlowContextHelper.narrow(obj);WebFlowContext slave;try { org.omg.CORBA.Object p1,p2; slave=WebFlowContextHelper.narrow(master.getWFServer(“ntserver”)); --------> make sure that the name match slave.conf p1 = slave.addNewModule(“runEdys”); p2 = slave.addNewModule(“runCasc2d”);

Page 108: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

runCasc2dImp

waitForData(){waitForUpdate=true;while (waitForUpdate) { idle for 1 sec newMod = (new File(testFile)).lastModified; if(newMod>lastMod) waitForUpdate=false;} sendData(); fireEvent(“Casc2dDone”,ev);}

sendData(){ createContents [OutContents] copy files from casc2Dir to OutFileBase}

Casc2dDoneevent

Class cas2dThread extends Thread{run(){Process p=Runtime.getRuntime().exec(Casc2dExec);p.waitFor();}}

run(){cT = new cas2c2Thread();cT.start();waitForData();}

runAgain(){ receiveData(); moreEvents =nextEvent(lmsStatusFile); lastMod=(new File(testFile)).lastModified(); if(moreEvents) { reactivateCasc2d(touchCommand); waitForData();} }

receiveData(){ getHTTPfile(ContentsFile,ContentsFileURL);for i=0;i<nfiles; i++){getHTTPfile(casc2dDir+fn, FileBaseURL+fn);}}}

EdysDoneevent

called fromFront-End

Page 109: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

runEdysImp

receiveData(){receiveStat(param3,param4,edysend);receiveEDY();run();}

receiveEDY(){getHTTPfile(ContentsFile,ContentsFileURL);if(ContentsFile.equals(“end”)) flag=false;else {for i=0;i<nfiles; i++){ … translate names *.edy -> edys expectationsgetHTTPfile(EdysInDir+fn, FileBaseURL+fn);}}

receiveStat(int, int, long){readHTTPfile(StatFileURL); … StartDay, DayDiff …optionswriteFile(OptionsFile,options); //options.txt

run(){Process p = Runtime.getRuntime().exec(EdysExec);p.waitFor();if(flag) { sendData(); fireEvent(“EdysDone”,ev);}}

sendData(){ createContents [OutContents] copy files from EdysOutDir to OutFileBase}

Casc2dDoneevent

EdysDoneevent

Page 110: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project

Updates

• Contact person: Tomasz Haupt

[email protected]

• voice (315) 443-2087

• http://www.npac.syr.edu/users/haupt/WebFlow/demo.html

Page 111: WebFlow: Web Interface for Computational Modules presented by Tomasz Haupt Northeast Parallel Architectures Center at Syracuse University This project