Project

General

Profile

Deploying » History » Version 5

Alex Hall -, 11/28/2011 08:28 PM

1 4 Paula Gearon
h1. Deployment
2
3 1 Paula Gearon
When building Mulgara for deployment you have to select one or more build targets. This page describes the various targets, and what the resulting artifacts are used for.
4
5 4 Paula Gearon
The standard target is simply _dist_ which builds all the major deployment targets.
6 1 Paula Gearon
7 4 Paula Gearon
8
h2. Targets
9
10 1 Paula Gearon
The artifacts created by each of the deployment targets are:
11 4 Paula Gearon
 *dist::
12 1 Paula Gearon
   All other distribution targets.
13 4 Paula Gearon
 *embedded-dist*::
14
   Creates mulgara-_version_.jar
15
 *querylang-dist*::
16
   Creates querylang-_version_.jar
17
 *driver-dist*::
18
   Creates driver-_version_.jar
19
 *descriptor-dist*::
20
   Creates descriptor-_version_.jar
21
 *mulgara-war*::
22
   Creates mulgara-_version_.war
23
 *lite-dist*::
24
   Creates mulgara-lite-_version_.jar
25
 *raw-dist*::
26
   Creates mulgara-raw-_version_.jar
27
 *core-dist*::
28
   Creates mulgara-core-_version_.jar
29 1 Paula Gearon
30 4 Paula Gearon
31
h2. JARs
32
33 1 Paula Gearon
The selection of which Jar to use is dependent on the deployment environment. The following is a description of each Jar.
34
35 4 Paula Gearon
36
h3. mulgara-_version_.jar
37
38 1 Paula Gearon
This is the general server jar. This contains the complete Mulgara system, and includes all the 3rd party libraries that Mulgara relies on. The Jar is executable, so it can be started easily with:
39 4 Paula Gearon
<pre>
40
<code class="sh">
41 1 Paula Gearon
 java -jar mulgara-x.y.z.jar
42 4 Paula Gearon
</code></pre>
43 1 Paula Gearon
No classpath is necessary to execute this jar, since everything is included.
44
45
If the built-in configuration is used, then Mulgara will create a database on disk, start an HTTP server with various web services, and an RMI server for Java connections. The default database will support all of the default resolvers and content handlers.
46
47 4 Paula Gearon
A different configuration can be set up at compile time (by editing the "conf/mulgara-config.xml":http://mulgara.org/svn/mulgara/trunk/conf/mulgara-config.xml file), or at runtime by using the *-c* command-line option. Note that the *-c* option is used to point to a URL, and not a file. So an example of using this might be:
48
<pre>
49
<code class="sh">
50 1 Paula Gearon
 java -jar mulgara-x.y.z.jar -c "file:/home/user/mulgara-config.xml"
51 4 Paula Gearon
</code></pre>
52
Use the *-h* option for a full set of command line options for the server program.
53 1 Paula Gearon
54
While useful, this jar is not suitable for use in an existing environment like Tomcat, due to the potential conflict between the environment path and the 3rd party jars that have been built in.
55
56
57 4 Paula Gearon
h3. querylang-_version_.jar
58
59
The is the general client jar. This contains everything needed to connect to a server, including a console application for issuing commands. Like _mulgara-version.jar_ this jar includes all the 3rd party libraries it needs, though this is significantly less.
60
61 1 Paula Gearon
The console application can be started in one of two modes. The default is a GUI console:
62 4 Paula Gearon
<pre>
63
<code class="sh">
64 2 Paula Gearon
 java -jar querylang-x.y.z.jar
65 4 Paula Gearon
</code></pre>
66
This brings up a Swing window containing a "command shell", useful for typing TQL commands, complete with command line editing and shell history. Java does not provide terminal controls by default, which made it impossible to develop this for use on the command line. However, the "Jline":http://jline.sourceforge.net/ library now makes this feasible, and consequently we expect to deprecate the Swing version soon.
67 2 Paula Gearon
68 4 Paula Gearon
It is also possible to run the client without a window, on a batch script. This uses the *-s* switch, and must specify a URL for the script. An example of running a script in a local file is:
69
<pre>
70
<code class="sh">
71 2 Paula Gearon
 java -jar querylang-x.y.z.jar -s "file:/home/user/data/myscript.tql"
72 4 Paula Gearon
</code></pre>
73
Use the *-h* option for a full set of command line options for this client. Also consider using the tools found in the "*tools*" directory of the sources. While these were built to demonstrate the use of the various APIs, they are often more useful than the complete client application. There are two applications here: *org.mulgara.tools.Tql* and *org.mulgara.tools.Sparql*. See the associated "README.txt":http://mulgara.org/svn/mulgara/trunk/tools/README.txt file for building and using these.
74 2 Paula Gearon
75 4 Paula Gearon
Like _mulgara-version.jar_, this jar contains more than is desirable for some environments.
76 2 Paula Gearon
77
78 4 Paula Gearon
h3. driver-_version_.jar
79 2 Paula Gearon
80 4 Paula Gearon
This jar contains the client API library. This is very similar to *querylang-_version_.jar*, but it does not include a command line interface, or the shell GUI.
81
82
This Jar provides the Connection API. This starts with a Connection, along with the SPARQL and TQL parsers for creating Commands to send over the Connection. For an example of using this API, see the "Tql":http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Tql.java and "Sparql":http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Sparql.java example tools.
83
84
85
h3. descriptor-_version_.jar
86
87 2 Paula Gearon
This provides a servlet for deploying Descriptors on a Java web server. Descriptors allow queries to be attached to a URL, with the results rendered through XSLT.
88
89 4 Paula Gearon
90
h3. mulgara-_version_.war
91
92 2 Paula Gearon
This is a WAR file (Web ARchive). It makes Mulgara available to services in a Java web server, and provides a web interface to the database.
93
94 4 Paula Gearon
95
h3. lite-_version_.jar
96
97 2 Paula Gearon
This version of Mulgara has fewer features than the main distribution, but not by much. This may be dropped soon.
98 3 Paula Gearon
99 2 Paula Gearon
100 4 Paula Gearon
h3. raw-_version_.jar
101 2 Paula Gearon
102 4 Paula Gearon
The full Mulgara distribution, but without embedded 3rd party libraries. You will want to use this version instead of *mulgara-_version_.jar* if need to avoid conflicts in the class path, such as deploying into Tomcat.
103
104
105
h3. core-_version_.jar
106
107
This contains the classes required to instantiate a *Database* object.
108
109 3 Paula Gearon
It contains no HTTP services, and avoids some of the optional resolvers. The remaining resolvers are:
110 4 Paula Gearon
* Store resolver: _the main database._
111
* File resolver: _select from RDF files._
112
* Lucene resolver: _full text searching._
113
* HTTP resolver: _select from URLs starting with !http://._
114
* URL resolver: _select from static RDF documents._
115
* Memory resolver: _store and select from temporary graphs stored in RAM._
116
* View resolver: _Select from graphs defined by other queries._
117
* Remote resolver: _Select from graphs on other Mulgara servers._
118
* Relational resolver: _Select from a "D2RQ":http://semanticweb.org/wiki/D2RQ transformation on a relational database._
119
* XSD resolver: _Provides virtual statements on literals, based on their "XSD datatypes":http://www.w3.org/TR/xmlschema-2/#built-in-datatypes._
120
* Prefix resolver: _Provides selection based on the start of a URI, or string literals._
121
* Node type resolver: _Provides selection of RDF nodes based on the 3 types: URIs/Literals/Blank._
122
* Null resolver: _provides the "empty" graph._
123 1 Paula Gearon
124 4 Paula Gearon
A cut down configuration file representing the reduced services is provided in this jar (_/conf/mulgara-x-config.xml_). Also, the *org.mulgara.server.!EmbeddedMulgaraServer* class is still present in this jar, meaning that it _is_ possible to start up a minimal server from the command line.
125 1 Paula Gearon
126
To use this jar, the following jars must be available in the classpath:
127 4 Paula Gearon
* activation-1.1.1.jar
128
* antlr.jar
129
* carol-2.0.5.jar
130
* castor-1.2-xml.jar
131
* commons-codec-1.3.jar
132
* commons-discovery-1.2.jar
133
* commons-httpclient-3.1.jar
134
* commons-logging-1.1.1.jar
135
* connector-1_5.jar
136
* emory-util-2.1-remote.jar
137
* howl-logger-0.1.11.jar
138
* icu4j_3_4.jar
139
* interruptiblermi-1.1.jar
140
* jargs-0.2.jar
141
* jena-2.5.6.jar
142
* joda-time-1.5.2.jar
143
* jotm-2.0.10.jar
144
* jotm_jrmp_stubs-2.0.10.jar
145
* jta-spec1_0_1.jar
146
* log4j-1.2.15.jar
147
* lucene-core-2.4.0.jar
148
* saaj-1.4.jar
149
* serializer-2.7.0.jar
150
* sesame-model-2.2.1.jar
151
* trove-2.0.4.jar
152
* xercesImpl-2.9.1.jar
153 1 Paula Gearon
154 4 Paula Gearon
This list may be reduced in future versions. It should also be clear that the _lucene_ jar is only needed by the Lucene resolver, and the _commons-httpclient_ jar is only used by the HTTP resolver. If a configuration without these resolvers is provided, then these jars can be skipped.
155 1 Paula Gearon
156 4 Paula Gearon
Despite not providing HTTP services, running the EmbeddedMulgaraServer application also requires:
157
* jetty-6.1.11.jar
158
* jetty-util-6.1.11.jar
159 1 Paula Gearon
160
We expect to remove the requirement for these jars in an upcoming version.
161 5 Alex Hall -
162
h3. mulgara-server-lite-_version_.jar
163
164
This distribution was created in response to a customer with special security requirements to deploy a hardened server with no non-essential components. It contains no third-party libraries, and the minimal classes required to launch an *EmbeddedMulgaraServer* instance which can load data from an input stream and answer queries using the Connection API.
165
166
It contains no HTTP services, and no optional resolvers or content handlers.
167
168
The remaining resolvers are:
169
* Store resolver: _the main database._
170
* Memory resolver: _store and select from temporary graphs stored in RAM._
171
* View resolver: _Select from graphs defined by other queries._
172
* XSD resolver: _Provides virtual statements on literals, based on their "XSD datatypes":http://www.w3.org/TR/xmlschema-2/#built-in-datatypes._
173
* Prefix resolver: _Provides selection based on the start of a URI, or string literals._
174
* Node type resolver: _Provides selection of RDF nodes based on the 3 types: URIs/Literals/Blank._
175
* Null resolver: _provides the "empty" graph._
176
177
The remaining content handlers are:
178
* RDF/XML content handler _(default)_
179
* N3 content handler
180
181
A cut down configuration file representing the reduced services is provided in this jar (_/conf/mulgara-x-config.xml_).
182
183
To use this jar, the following jars must be available in the classpath:
184
* activation-1.1.1.jar
185
* antlr.jar
186
* carol-2.0.5.jar
187
* castor-1.2-xml.jar
188
* commons-logging-1.1.1.jar
189
* connector-1_5.jar
190
* emory-util-2.1-remote.jar
191
* howl-logger-0.1.11.jar
192
* icu4j_3_4.jar
193
* interruptiblermi-1.1.jar
194
* iri-0.5.jar
195
* jargs-0.2.jar
196
* jena-2.5.6.jar
197
* joda-time-1.5.2.jar
198
* jotm-2.0.10.jar
199
* jotm_jrmp_stubs-2.0.10.jar
200
* jta-spec1_0_1.jar
201
* log4j-1.2.15.jar
202
* sesame-model-2.2.1.jar
203
* trove-2.0.4.jar
204
* xercesImpl-2.9.1.jar