JeromeDL/ELPinJeromeDLv1

From Corrib Clan Wiki

Jump to: navigation, search

aloudelsitli monrot vidarboo

Contents

ELP support in JeromeDL v1

Integration of JeromeDL instances is a main feature of the second version. To provide such functionality 'elp' package was introduced. However, there are a few instances which still run the first version without support for performing distributed search. As the second version is still being developed it is not a good idea to switch to the new version, so here is the document which describes how one can put 'elp' into old version.

Two things have to be considered:

  • communications between libraries use HyperCuP which in turn uses WebService technology
  • internal format of messages which flow across network has changed


assume that:

$JEROMEDL - is a directory where JeromeDL web application is installed - i.e. /www/webapps/JeromeDL/


Lets start with the first thing

HyperCuP comes in a jar package which should be put into $JEROMEDL/WEB-INF/lib directory. You can find a link to a suitable hypercup.jar file at the bottom of this site. As I mentioned before HyperCuP uses WebService technology so there is a need to dive WebService server into existing JeromeDL application. To perform this task one should go to the Axis web page and consult documentation - here is the exact link: http://ws.apache.org/axis/java/install.html. Find the 'Advanced Installation: adding Axis to your own Webapp' section and proceed with instructions. After that one should copy 'server-config.wsdd' (you will find it at the bottom of this page) file to $JEROMEDL/WEB-INF/ directory. This file is used at startup by Axis Servlet to deploy adequate web-service used by HyperCuP.


The second thing - synchronization with sources on cvs

Implementation of 'elp' package required some changes in core api and functionality - i.e. xml/java representation of query and result. Therefore there is a need to get some sources from second version and put them in the source tree of existing application.

  • src/org/jeromedl/service/Resource.java
  • src/org/jeromedl/service/search/ResourceImpl.java
  • src/org/jeromedl/search/SearchEngine.java
  • src/org/jeromedl/service/search/ServiceFactory.java
  • src/org/jeromedl/service/elp/ELPServlet.java
  • src/org/jeromedl/service/elp/LocalQueryImpl.java


You can find these files at the bottom of this page. The first version (you are using it) didn't have an elp directory so you should create it in an appropriate location.

As you can see, one of above files is ELPServlet.java. This file is responsible for things related with HyperCuP which have to be done at startup time. Hence we have to tell jakarta-tomcat server to run our Servlet when it starts. To do that you have to add this servlet definition in JeromeDL web.xml file. It is located in $JEROMEDL/WEB-INF/ directory:


<servlet>
   <servlet-name>ELPServlet</servlet-name>
   <description>ELP Servlet</description>
   <servlet-class>org.jeromedl.service.elp.ELPServlet</servlet-class>
   <load-on-startup>105</load-on-startup>
 </servlet>


You will find other similar definitions in this file. The number (in this case 105) indicates an order in which servlets are being executed.

Ensure that you have an appropriate server address in $JEROMEDL/WEB-INF/web.xml. Find 'serverAddress' parameter and check if it's value is set correctly. It should contain valid and unique hostname (or ip address) which can be recognized from external sources.

Testing

Shutdown Jakarta-Tomcat server. You now have to recompile JeromeDL web application so go to $JEROMEDL/WEB-INF/ directory and type 'ant' in your shell. If command is not found precede it with appropriate path (use 'find' command to find 'ant' location). Now you can start Jakarta-Tomcat server again. After a minute try to run JeromeDL main page as you always did. Now add 'services/HyperCuP?method=showPath' to the end of the address in the browser. Your entire address could now look like: http://localhost/jeromedl/service/HyperCuP?method=showPath. If an xml message shows up, it means everything is fine and you can now go to the next section.


Connection

Now that you have done all these weird things you can connect to the existing JeromeDL network. Your library will take a part in a distributed search process and will answer incoming queries which flow in the HyperCuP network. You have to know that this elp support is only partial and contains only functionality to connect your existing JeromeDL v1 library to the network you will choose. There is no possibility to perform distributed search through your instance of the library. You can join an existing network by starting your JeromeDL application and then typing in browser address bar this address: http://localhost/jeromedl/services/HyperCuP?method=join&p=address_of_HyperCuPService_on_another_host_which_is_already_connected_to_a_network


Troubleshooting

Feel free to contact me if you encounter some problems. Bear in mind that I have constructed this document after an installation which was rather like experimenting. Remember to add some log information (especially those which come from 'catalina.out' file).

Need all features of 'elp' package? Need to perform distributed search through your instance? You want to create your own closed network of libraries without moving to second version? Just let me know.


Files

  • HyperCuP hypercup.jar
  • server-config.wsdd server-config.wsdd
  • src/org/jeromedl/service/Resource.java Resource.java
  • src/org/jeromedl/service/search/ResourceImpl.java ResourceImpl.java
  • src/org/jeromedl/search/SearchEngine.java SearchEngine.java
  • src/org/jeromedl/service/search/ServiceFactory.java ServiceFactory.java
  • src/org/jeromedl/service/elp/ELPServlet.java ELPServlet.java
  • src/org/jeromedl/service/elp/LocalQueryImpl.java LocalQueryImpl.java




krystian[dot]samp[funny-character-like-a-snail]deri[point]org.com.pl[choose-first-one]

krychu

thanks to David Ridge

Facts about JeromeDL/ELPinJeromeDLv1 — Click + to find similar pages.RDF feed
Personal tools

Corrib cluster project is supported by Enterprise Ireland under Grant No. ILP/05/203, Science Foundation Ireland under Grant No. SFI/02/CE1/I131.
Hosted at DERI, NUI Galway.