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.

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:
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.


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 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.

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.

No comments:

Post a Comment

You are welcome to provide your opinions in the comments. Spam comments and comments with random links will be deleted.