Showing posts with label eScience. Show all posts
Showing posts with label eScience. Show all posts

Sunday, June 20, 2010

Mooshabaya - The Story..

Dr. Malinga is a scientist interested in e-Science researches. He predicts the weather by analyzing the data collected over the grid. Dr. Malinga uses workflow domain to analyze the scenario, and comes up with workflows that describe the rapidly changing atmospheric conditions. He executes the workflows in his workflow system and monitors them at run time. In this process, he also wants to secure some of the services from unauthorized access.

He is looking for a much light weight model to prototype the scenario rapidly. So he can avoid learning the XML technologies or the workflow languages such as BPEL, which takes a lot of time. He is interested in using yahoo geocode and similar web based APIs. He also prefers to integrate real time data collected via satellite feeds and feeds from the other sources into his system of workflows.

Mashup creates new services by aggregating two or more sources. We can develop them rapidly using the APIs, without investing much on learning them. They are light weight and can be extended easily.

As a solution for the scientist, Mooshabaya comes as a system that can utilize the best of both the domains, by a potential merge. By exporting workflows as mashups Mooshabaya invests on the synergy of the domains.

In the process of developing the workflow system, we have used the known existing tools as the base. XBaya Graphical Workflow Composer from Indiana University is used as the core of the system. We have extended XBaya to export the workflows as mashups, and the mashups are deployed into WSO2 Mashup Server. The service metadata are fetched from WSO2 Governance Registry. The composed mashups are executed in the Mashup server and monitored in the run time.

Here we come back to Dr.Malinga with Mooshabaya. Mooshabaya discovers the service metadata from Governance Registry and fetches them. Created workflows can be saved and fetched later. Workflows are exported as Mashups. Respective service metadata is added to the Registry, while the mashups are deployed into Mashup Server. Mooshabaya also supports composing with secure services found in WSO2 Identity Server. Mooshabaya executes the workflows that are deployed into Mashup Server as mashups. WS-Messenger is used to publish the notifications from the executed workflows, and Mooshabaya monitors the execution by subscribing to the notifications. Hence Mooshabaya provides a better workflow solution for the scientist.

Tuesday, March 24, 2009

Event Notifier Service for LEAD System

EventNotifierServce is a notification system developed for LEAD [Linked Environments for Atmospheric Discovery] System developed at the extreme labs of Indiana University.
When a scientist runs a workflow, he can provide his interested events to the EventNotifierService with a notificationAddress. The service will listen to the workflows invoked by the scientists and notify them when an interested event occurs. Hence the Scientist can leave the system as he adds a request to listen to a particular workflow in the LEAD System, and hence his time will be saved.


Requirements
The program is tested to be run in Windows XP and Linux environments.


Setting up the event Notifier Service [More updated information can be found here.]

1. Download the Event Notifier Service from the SVN Tree:
https://svn.wso2.com/projects/lead/repo/event-notifier/
You will need the authentication password to access this SVN tree.
Alternately, you can download the files as archives from here.
This includes the messagebox code as well.

2. Download and set up the WS-MESSENGER, a messenger service built at Extreme! Labs using XSUL.

3. Configure the parameters included:
You will need to configure these files, which are inside the resources folder.
db.config : This config files contains the details needed to connect to the relevant database
epr.config : This config file mentions the end point reference
MailSender.properties : This properties file mentions the properties of the mail server. Currently the properties file has gmail as the mail server. When chosing the other mail servers or when you create your own mail server, you have to replace this properties file with that specific to your server.

4. Include puretls.jar and notification-types.jar included inside the lib directory into the axis2/lib.

5. Create a database 'EventNotify' and create tables using the db-creation.sql file included inside the resources folder.

6. Manually install the jars included inside the lib directory, and build using mvn. Alternatively you may prefer to use ant to build the project.
wsmg-1.76.1_a5.jar can also be downloaded from the original location:
notification-types.jar is an XMLBeans generated jar file for the given events schema.


You also need to manually download and install three jar files from the sun java web site due to the licensing requirements.


7. Deploy the generated zip file into the axis2 server.



Running Event Notifier Service
1. Starting the Messenger Service
Start Tomcat
Start Messenger

2. Starting the EventNotifierService
Start Simple Axis2 Server

Now the EventNotifierService is ready to be used.


Architecture

EventGenerator
This program includes a simple LEAD simulator which generates LEAD event notifications by reading the log file, leadevents.log included inside the resources directory.
In case of unavailability of the real LEAD system, you may use this program to simulate the system.

For this you have to run the EventGenerator.java included inside the edu.indiana.extreme.www.xgws.eventGenerator package.


Client
Client program included inside the syncClient package can be used to test the service. It will get the WorkflowID, eventsInterested, notificationMedium, and notificationAddress as String input. Here you may give multiple addresses and the eventsInterested as a String with the elements separated by a comma.


Limitation
The default notification medium is assumed to be email, and in case of email, the notifications will be sent as the events are received. In case of the other media, the events will be saved into an events table. If the notification medium is set to email, our program will handle the notification part, that is, it will notify the users as well. But as we haven't implemented the code for the other media, like SMS and IM, the program will save the relevant notification to the events table, and the notification part should be handled separately.

It should also be noted, in case of unavailability of the database the program will run in inMemory mode, where concurrentHashmaps are used to represent the tables, clients, events, and interests.