Math Broker for Math Services (Prototype)

Ontario Research Centre for Computer Algebra,

University of Western Ontario

Date : September 2003
Version : 0.8
Status : research associated software, work in progress.
contact e-mail: alena@orcca.on.ca,   clare@orcca.on.ca

Index


What is that?

The MONET Mahematical broker is a web service for brokerage of distributed mathematical services. It is a part of MONET project

The present prototype release offers the following operations:

First three operations are used mostly by mathematical web services.
The rest operations are more useful for mathematical service users.


System and software requirements

Also following axis libraries should be included to CLASSPATH: axis.jar, jaxrpc.jar.

Directory tree


Launcher scripts

Distribution kit includes two scripts for installing and deinstalling MONET broker service: brokerstart.sh and brokerstop.sh.
And two subsidiary scripts broker_setenv.sh and reload_axis to set up environment and reload axis.

Broker library

Directory Broker contains source of java classes for the broker prototype & some auxiliary stuff.
The broker is a web service itself, so it should be
deployed as a web application.

Classes for broker web service are

External libraries, required by broker (both server and client sides)

Service descriptors are

Database for registered services

Broker needs a file to store the list of registered services.
This file will be created automatically the first time you start the broker.
By default this registration list will be saved in file brokerReglist.xml in subdirectory MONET of JVM temporary directory
(if you deploy broker as a web service on Tomcat, as usual this registration list will be placed into Tomcat temp/MONET directory)


Installation instructions


* If you prefere to be able to monitor Broker service response/request flow, specify the first argument to the script brokerstart.sh as "-SM" or "-SOAPMONITOR".
It will enable the Axis SOAP Monitor to handle incoming and outcomming SOAP messages.
Note:In this case deployBroker-SOAPMonitored.wsdd will be used as service deployment descriptor, instead of regular deployBroker.wsdd


Deploying the broker service at your web server, using Axis SOAP engine:

  1. copy broker.jar together with om-lib-136.jar and risc-openmath-util1.0.3.jar to AXIS_HOME/WEB-INF/lib directory
  2. restart Axis web application (for more information see "How to restart Axis" )
  3. deploy the provided broker web service descriptor deployBroker.wsdd:
    java org.apache.axis.client.AdminClient [-p <port number >] [fullpath]/deployBroker.wsdd


ClientCode library

Subdirectory "ClientCode" consists of two subdirectories

  1. local
  2. web
providing java classes for calling broker engine as local java class or as webservice


Web client library

Subdirectory "web" contains 2 java classes for calling the broker web service from math services and from mathservices users.

  1. BrokerCallFromService:
    In this case mathservices behave as clients for Broker web service.

    1. to register math service on a broker a service provides a link to its MSDL file
    2. to deregister math service provides its name only;
    3. for modification math service provides name & a new MSDL.

    The first argument of java call should be the URL of the broker service.

    Usage:

     java BrokerCallFromService <URL for broker service> [options] <arguments> 
    
    

    where
    options arguments description
    -register|-reg service MSDL register mathservice
    -modify|-mod service name, service MSDL modify mathservice
    -deregister|-dereg service name deregister mathservice

    Here is an example of calling broker web service for mathservice registration:

     java BrokerCallFromService http://ptibonum.scl.csd.uwo.ca:16661/axis/services/Broker 
    
    -register http://www.orcca.on.ca/MONET/samples/DiffService.msdl 

  2. BrokerCallFromClient:
    In this case mathservices behave as clients for Broker web service.

    1. to get list of mathservices available through the broker,
    2. to find a specific mathservice by name, problem description reference or by keyword
    3. to call a specific mathservice

    The first argument of java call should be the URL of the broker service.

    Usage:

     java BrokerCallFromClient <URL for broker service> [options] <arguments> 
    
    

    where
    options arguments description
    -findall - list all mathservices registered on a broker
    -findbyname service name find a specific mathservice by name
    -findbypref problem description reference find mathservices by problem description reference|
    -findbypref problem description reference find mathservices by problem description reference|
    -findbypkey keyword to find mathservices corresponding to the keyword |
    none <servicename> [Math arguments in OpenMath Format] call a specified mathservice with provided math arguments.
    call flow: client -> broker -> service -> broker -> client
    -directcall <servicename> [Math arguments in OpenMath Format] Gets URI of specified mathservice from Broker registration list,
    and then this service will be called directly from that URI with provided math arguments. As opposite to previous type the call flow is devided into 2 steps:
    1. client -> broker
    2. client -> service -> client

    1. Example of searching for all services corresponding to keyword "diff", registered on broker at http://ptibonum:16661/axis/services/Broker:
       java BrokerCallFromClient http://ptibonum:16661/axis/services/Broker -findbykey 
      
      diff 
    2. Example of calling mathservice for differentiation of function sin(2x+3y) with respect to x:
       java BrokerCallFromClient http://ptibonum:16661/axis/services/Broker DiffService  
      
      http://www.orcca.on.ca/MONET/samples/Test-sin_2x+3y.xml http://www.orcca.on.ca/MONET/samples/OM_x.xml
      
      


Local client library

Subdirectory "local" contains 4 java classes for calling the broker java class for registration/deregistration/modification of mathservices or calling specified mathservice.
Those java classes were created essentially for testing purposed of broker engine and perform the same tasks that broker provides as a web application.

Contents:

  1. RegisterOnBroker
  2. ModifyOnBroker
  3. DeregisterOnBroker
  4. CallMathService

  1. Example of calling a broker for service modification:
     java ModifyOnBroker IntService http://www.orcca.on.ca/MONET/samples/IntService.msdl 
    
    
  2. Example of calling a Numerical Integration service:
     java CallMathService NumIntService http://www.orcca.on.ca/MONET/samples/arg1.xml 
    
    http://www.orcca.on.ca/MONET/samples/arg2.xml http://www.orcca.on.ca/MONET/samples/arg3.xml 
    
    http://www.orcca.on.ca/MONET/samples/arg4.xml