source: trunk/README.lsid

Last change on this file was 1452, checked in by Jari Häkkinen, 17 years ago

Updated text.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 7.0 KB
Line 
1$Id: README.lsid 1452 2006-02-28 07:52:57Z jari $
2
3Date: February 21, 2006
4Authors: Jari Hakkinen and Olle Mansson
5   Department of Theoretical Physics, Lund University
6
7
8
9Introduction
10
11The discussion in this document relates to the Java version of the
12LSID server and client available from http://lsid.sf.net.
13
14We have implemented an LSID client in Proteios. The idea is that
15information stored elsewhere should not be copied into Proteios but
16rather retrieved from external sources when needed. For testing
17purposes a local LSID server containing partial information from
18uniprot (accession numbers and sequences) was set up.
19
20To access an entry in the LSID server (installed in ensembl.thep.lu.se
21listening at port 8080) you use a normal LSID string like
22urn:lsid:thep.lu.se:uniprot:Q549G5
23
24There are some problems using the LSID client in Microsoft windows (XP
25Professional SP2). We have resolved this by changing packages used by
26the LSID toolkit (most importantly dnsjava was changed to version
272.0.1). The change forced us to modify the official LSID toolkit. The
28changed toolkit is made available for download, <a
29href=http://lev.thep.lu.se/trac/proteios1/chrome/site/packages/lsid-client-1.1.2_modified_for_proteios.tgz>lsid-client-1.1.2_modified_for_proteios.tgz</a>.
30
31
32
33Problem 1 (LSID server related)
34
35The above LSID request do not work with the current LSID server
36implementation available at http://lsid.sf.net. The reason for this is
37that the accession number Q549G5 (object identification string in LSID
38language) is written in capital letters and the LSID server refuses to
39accept it. The problem is simply avoided by changing the accession
40number to non-capital letters. However, the LSID specification has not
41the non-capital letter requirement on the object identification
42string. The requirement in the specification is rather that the object
43identification string should be an case-sensitive alphanumeric string.
44
45The LSID server software must be fixed to accept capital and
46non-capital letters in the accession number. As it is now, the LSID
47server is not compliant with the LSID white paper, and more
48importantly gives a very confusing error print out (i.e. complaining
49on non-capital letters in the accession number).
50
51The bug/feature appears in SimpleResolutionService.java directory
52lsid/com.ibm.lsid.server/src/com/ibm/lsid/server/impl/ in method
53checkLowerCase(LSID lsid) (specifically line 130). The logic should be
54negated to follow the comments in the LSID server code ie. not accept
55lower case strings. However, should this check be done at all? LSID
56specs says NO!
57
58Proteios fix:
59
60Force LSID queries to be lower case. This will probably come back and
61haunt us in the future.
62
63
64
65Some details on an LSID requests
66
67There is a need to a disclaimer here; the technical details may be
68inaccurate in this section, but the general idea is correct).
69
70As you may have noted above there is a need to map thep.lu.se to
71ensembl.thep.lu.se and port 8080. A standard (A record) DNS lookup
72cannot provide this information since a standard DNS lookup only maps
73name with ip number (and the other way around). Something else is
74needed - SRV records. An SRV entry in a DNS server connects a service
75to a server (ip number, ip port, and more). Here are examples with an
76A record (standard lookup) and an SRV record:
77
78# host -t A ensembl.thep.lu.se
79ensemble.thep.lu.se has address 130.235.95.213
80# host -t srv _lsid._tcp.thep.lu.se
81_lsid._tcp.thep.lu.se SRV record 1 0 8080 ensembl.thep.lu.se.
82
83In the first example we could omit '-t A' since this is the default
84behaviour (remember standard lookup). A lookup for thep.lu.se is not
85tried since this machine does not exist in the DNS as an A record. In
86the second example we note that thep.lu.se do exist as an LSID service
87(the _lsid._tcp part in the lookup). The resulting output shows that
88thep.lu.se LSID service is redirected to ensembl.thep.lu.se port 8080.
89
90
91
92Problem 2
93
94The LSID clients available at SourceForge works well on tested version
95of MacOSX and linux but fails with Windows XP (XP Professional
96SP2). This failure was finally traced back to the LSID dependency on
97dnsjava-1.3.2.
98
99In lsid/com.ibm.lsid.client/com/ibm/lsid/client/LSIDResolver.java
100method resolveAuthority(LSIDAuthority authority) there is a call
101
102Record[] records = dns.getRecords("_lsid._tcp." + authority, Type.SRV);
103
104returns different result in Windows XP as compared to linux (null vs
105!null) and the the succeeding execution goes in different
106trajectories. Basically linux will make an SRV record request whereas
107Windows falls back to an A record request ending up in failure.
108
109The problem can be fixed with using a later dnsjava package
110(eg. version 2.0.1, the currently version 1.3.2 used in LSID toolkit
111is deprecated by dnsjava).
112
113
114
115LSID fix
116
117For LSID Java Toolkit 1.1.2 (released February 9, 2006) we made these
118changes (all in LSIDResolver.java)
119
1201) Change
121  import org.xbill.DNS.dns;
122to
123  import org.xbill.DNS.Lookup;
124
1252) The new Lookup class does not implement dns.getRecords(name,type)
126but the getRecords method can be replace with
127Lookup.Lookup(name,type). Unfortunately the Lookup method throws
128another exception (org.xbill.DNS.TextParseException) than getRecords,
129so a small wrapper has to be implemented in LSIDResolver.java
130converting a TextParseException to a LSIDException).
131
132  /**
133   * Lookup the given host by DNS.
134   * @param String the name of the host.
135   * @param int the type of the host.
136   * @return Record[} the record found by DNS.
137   */
138  private static Record[] lookupHost(String name, int type)
139   throws LSIDException {
140    try {
141      Record [] records = new Lookup(name, type).run();
142      return records;
143    } catch (org.xbill.DNS.TextParseException e) {
144      throw new LSIDException(e, "Invalid name");
145    }
146  }
147
1483) In method LSIDAuthority(...) change
149  Record[] records = dns.getRecords("_lsid._tcp." + authority, Type.SRV);
150to
151  Record[] records = lookupHost("_lsid._tcp." + authority, Type.SRV);
152
153
154
155Create a new LSID client jar
156
157New modified LSID package. In the below text ~ refers to root level of
158the checked out CVS hierarchy).
159
1601) Check out a pristine CVS structure from lsid.sf.net
161
1622) Perform above changes.
163
1643) Create directories needed to build the LSID client jar
165
166   # mkdirhier ~/com.ibm.lsid.build/build/client
167   # mkdirhier ~/com.ibm.lsid.build/lib
168   # mkdirhier ~/LSIDJars
169
1704) Download below package and copy indicated files into ~/LSIDJars
171
172   - axis.jar, jaxrpc.jar, saaj.jar and wsdl4j-1.5.1.jar from
173     http://ws.apache.org/axis/
174   - castor-0.9.5.jar from http://www.castor.org/
175   - dnsjava-2.0.1.jar from http://www.dnsjava.org/
176   - jastor-1.0.3.jar from http://jastor.sourceforge.net/
177   - jena.jar from jena-2.3.zip from http://jena.sourceforge.net/
178
1795) Modify 'build.xml' to show that this is a modified version of the
180   LSID package, i.e. change 1.1.2 to 1.1.2_modified_for_proteios in
181   file ~/com.ibm.lsid.build/ant.properties
182
1836) Do 'ant build-lsid-client' in directory ~/com.ibm.lsid.build
184
185
186
187Proteios fix
188
189LSID client induced Packages needed to run Proteios:
190
191lsid-client-1.1.2_modified_for_proteios.jar
192axis.jari, jaxrpc.jar, saaj.jar and wsdl4j-1.5.1.jar
193castor-0.9.5.jar
194dnsjava-2.0.1.jar
195jastor-1.0.3.jar
Note: See TracBrowser for help on using the repository browser.