Tuesday, November 25, 2008

MOINC Agent



on my final year project i am working on a project call MOINC (Mora Open Infrastructure of network computing) and i am working on teh Agent client part so thought about putting some information about it in teh blog :) 

Introduction

The MOINC agent is the actual service runtime of the entire MOINC project. This is actually the client software that should be installed in all the computers that are volunteering to the grid. This piece of software works on Windows and Linux operating systems and is built using Java technologies. MOINC agent runs at operating system startup and functions as a background process to monitor user inactivity in order to start executions.

The MOINC agent uses Axis2 as its service runtime engine. In other words all web service requests are executed using the Axis 2 environment. The main goal of this client software is to execute web service requests when the computer is idling. The web service requests are handed down by the MOINC server.

The following steps outline how the MOINC agent functions once installed in a computer:

  • The software monitors keyboard and mouse hits and waits till no events occur for a specified time period.
  • As soon as this time period is elapsed, the MOINC agent informs the MOINC server that the client machine is idling.
  • The MOINC agent will then execute web service requests handed by the MOINC server.
  • During the period in which the MOINC agent functions a screen saver will be displayed on the screen which informs the user about the current activities.
  • If a keyboard hit or a mouse event occurs when MOINC agent is running, the software will automatically finish what it was doing and shutdown thus giving the full processing power of the computer to the user.    

MOINC agent is a collection of loosely coupled set of modules that carry out well defined tasks. The modules and their functionality are listed below.

State Detector Module

  • Determine when the computer is idling.
  • Inform MOINC server that the client is ready to receive web service requests.
  • Inform the module which launches the screen saver.
  • Inform the module which handles Axis2.
Service Deployer
  • Launch Axis2 runtime.
  • Execute service requests on top of Axis2.
  • Acquire points information.  

Screen Saver Invocator

  • Invoke the MOINC screen saver when MOINC agent runs.
  • Shutdown the screen saver when MOINC stops functioning.
Points Notifier
  • Inform the MOINC Server Management Module about the CPU usage of web service requests in order to give points to the particular client.


All communications between the MOINC Agent and the MOINC Server and the MOINC Server Management Module are carried out via the Thisara messaging protocol.

 

Design/Architecture

Object oriented design principles have been incorporated in building the MOINC Agent application. Design patterns are used where possible to make sure the application evolves with time and is easily extensible.

As mentioned earlier in this write-up, MOINC Agent is a collection of loosely coupled modules that perform well defined tasks. This in fact gives the ability to team members to easily enhance the functionality of the application as well as add new features without changing the existing system.

More details about the design and architecture aspects of MOINC Agent can be found in the software design document which is available in the resources section.


for more information refer http://www.moinc.org

Monday, November 24, 2008

How to deploy specified web services in a remote repository

While working in my project MOINC ( http://www.moinc.org ).  I had two specified requirements 
  • work in a remote repository
  • deploy only specified web services from that repository
in my project MOINC Agent the remote repository i used was a common repository which is used by many computers. Therefore my second requirement of deploying specified services cannot be handled by editing the services.list file since its a common file for all computers.
The selution i came up with is hacking axis2 source code where i changed the services.list file to a local directory.
To do this i had to change module kernel package deployment and class deployment engine
the method loadServicesFromUrl

old code
URL servicesDir = new URL(repoURL, path);
URL filelisturl = new URL(servicesDir ,"services.list");

new code
URL servicesDir = new URL(repoURL, path);
URL filelisturl = new URL("http://localhost:port/services.list");

so now i will keep the services.list file in the localhost root directory where i specify the services required to be deployed.

Sunday, November 23, 2008

how to work with a remote repository axis2

Hi,
if any one is has a requirement on how to work in a remote repository using axis2 this is one way to do it.
if your using this way you have to use axis2 on top of tomcat where you deploy the axis2 war file in to the webapp folder in axis2.
its a very simple thing what you have to do it after the first deployment tomcat will unpack axis2 in to a folder in webapp directory. find the web.xml file and do the above change.


by changing the axis2 xml tag you can work with a remote axis2.xml file also.
when your working with a remote repo you will have to give up hot deployment.
but you can change the web.xml file while tomcat is running it will automatically ditect it and will do the updating part.

if you wish to get this thing done without tomcat refer to this blog

http://blogs.deepal.org/2008/02/starting-axis2-using-wso2-registry.html
Google