Project

General

Profile

FAQ » History » Version 5

Paula Gearon, 04/21/2009 08:11 PM
Fixed formatting

1 1 amit -
= Mulgara Developer FAQ =
2
3
This contains administrative information for developers who wish to contribute
4
to the Mulgara Project.
5
6
IMPORTANT: Due to the licensing requirements in moving from the MPL to the OSL
7
we need to carefully document all changes to existing source files. This is
8
very important for developers contributing to the project. More details are
9
provided below.
10
11
== FAQ ==
12
13 2 amit -
'''What does Mulgara mean?'''
14
15
Like the [http://www.australianfauna.com/kowari.php Kowari], the
16
[http://www.australianfauna.com/mulgara.php Mulgara] is an Australian marsupial, and
17
is listed as "vulnerable".
18
19 1 amit -
'''What License is the code under?'''
20
21
The OSL. This was chosen to be compatible with the original MPL license of
22
Kowari. The MPL specifies an organization must be an "initial contributor" for
23
the licensed code. Since Mulgara is entirely community driven, a more
24
appropriate license was needed.
25
26
'''How do I get the source code?'''
27
28
You need a version of Subversion which supports SSL (encryption). Subversion
29
is an open source tool, and is free to download. Not all versions of
30
Subversion feature SSL, so ensure you have one which supports this option.
31
32
The following command will get the latest version of Mulgara:
33
34
{{{
35
svn co https://mulgara.org/svn/mulgara/trunk
36
}}}
37
38
You can also browse the source code by pointing your browser directly at this
39
link.
40
41
'''How do I contribute code?'''
42
43
Please mail contributions to the developers' list in patch format with
44
comments and justification. One of the lead developers with add your code as
45
soon as it can be tested.
46
47
'''How can I get read/write access to the source repository?'''
48
49
Ask an administrator on the developers' mailing list. Once you have
50
established a good track record then we will consider giving you full
51
read/write access to the repository. We hope to have a more formal process in
52
place soon, so that the procedure will be open and accountable.
53
54
'''How do I learn the architecture of Mulgara?'''
55
56
Eventually this information will be posted in the Mulgara Wiki. In the
57
meantime, try the following:
58
59
 * Download the source and read it. If code is not clear and comments are lacking, then please report it.
60
 * Ask on the developers' mailing list.
61
 * Read Paul's blog. Many of the relevant entries may be quite old. Ask him to write about something if you need specific information. In recent months he hasn't been writing regularly, but he is still there and willing to answer most questions in detail.
62
63
If you learn something that is not adequately documented, then please consider
64
adding it to the Wiki.
65
66
'''Where is the documentation for Mulgara development?'''
67
68
On the Development page in the Wiki. If something is missing, then let us
69
know, and we will endeavor to add it.
70
71
'''How do I develop for Mulgara with Eclipse?'''
72
73
Install Subclipse for Subversion in Eclipse, and check out Mulgara using the
74
address found in the download page.
75
76
Mulgara makes heavy use of 3rd party libraries, some of which generate code.
77
Eclipse will report errors until it sees all of the libraries and code already
78
available. To accomplish this we have an Ant task called ideSupport. Build
79
this from the command line, and then refresh the Eclipse project.
80
81
For more details see the HOWTO.
82
83 4 Paula Gearon
'''What are the Interfaces for using Mulgara?'''
84 5 Paula Gearon
85 4 Paula Gearon
The are 5 ways to talk to Mulgara. 2 of them are User Interfaces, and 3 are APIs.
86 1 amit -
87 4 Paula Gearon
User Interfaces
88 1 amit -
 * ''Shell/CLI'': Running the ''querylang'' JAR file will bring up a terminal program. ie.[[BR]]
89 5 Paula Gearon
   {{{  java -jar querylang-x.y.z.jar }}}[[BR]]
90
   This program used to be in a graphical Swing Window. To get to this window, use the -g flag:[[BR]]
91 4 Paula Gearon
   {{{  java -jar querylang-x.y.z.jar -g }}}
92 1 amit -
 * ''Web UI'': Both the standalone server and the Web Application file (mulgara-x.y.z.war) provide a Web base user interface. Unless configured otherwise, these can be found on http://localhost:8080/webui
93
94 4 Paula Gearon
Programming Interfaces
95 5 Paula Gearon
 * ''RMI'': This is the original API for communicating with Mulgara. In the past it was necessary to create a "Session" to talk to a Mulgara instance, but this has now been simplified by using an object called "Connection". See the example programs called [http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Sparql.java Sparql] and [http://mulgara.org/svn/mulgara/trunk/tools/src/org/mulgara/tools/Tql.java Tql] for examples on how to use Connections.
96 1 amit -
 * ''Embedded'': This is the situation where a Database is instantiated in the user's own program. The interfaces for this are identical to the RMI interfaces. In fact, once the Connection (or Session) has been established, there is no difference at all.
97
 * ''REST'': This is the newest API. While all CRUD operations are available through this interface, transactions have not yet been exposed. Documentation for this API can be found [wiki:RESTInterface here].
98 4 Paula Gearon
 * ''JRDF'': This API has changed a little, and [wiki:JRDF the documentation] has not kept pace. Please ask the mailing lists if you encounter problems with the API.
99
100 5 Paula Gearon
'''What Happened to the [http://jena.sourceforge.net/ Jena] API?'''
101
102 4 Paula Gearon
This API required the use of too many internals from Jena. This was not really Jena's fault, but rather because a lot of programmers started talking to Jena using classes that do not form part of the official interface.
103 1 amit -
104 4 Paula Gearon
The end result was a system that had to store data both in a local Jena store, as well as running the overhead of storing data in the Mulgara database. There were no benefits to this approach, and so Jena support was dropped.
105
106
'''Where did the "Session" Interface go?'''
107 5 Paula Gearon
108 4 Paula Gearon
It's still there, but it is now wrapped in the "Connection" interface. This interface takes care of a lot of the work needed to set up sessions.
109
110
If you really need to, then Sessions can be used just like they always have been. However, we'd like you to consider moving to Connections.
111 1 amit -
112
'''Why is my question not answered here?'''
113
114
Because I didn't know about the issue and no one has asked me about it yet.
115
Let one of the developers know, and we will put something up. Feel free to
116
harrass us if we take too long.
117
118
'''Why do you sometimes mis-spell words?'''
119
120
The project was started in Australia. Mulgaras are Australian, Kowaris are
121
Australian, and I'm Australian. I live in the USA now, so I try to remember to
122 3 amit -
use American spelling, but sometimes I forget.
123
124
''' I am getting the following exception upon Mulgara startup running on my
125
Windows XP machine:'''
126
{{{
127
[java] INFO 11:59 MulgaraInternalTransaction> Committing Transaction: 4779445, state=ACTUNREF, inuse=1, using=0
128
[java] ERROR 12:00 XAStatementStoreImpl> I/O error while performing prepare.
129
[java] java.io.IOException
130
[java]     at java.nio.MappedByteBuffer .force0(Native Method)
131
[java]     at java.nio.MappedByteBuffer.force(MappedByteBuffer.java:144)
132
[java]     at org.mulgara.store.xa.MappedBlockFile.force(MappedBlockFile.java:218)
133
[java]     at org.mulgara.store.xa.ManagedBlockFile.force(ManagedBlockFile.java:147)
134
[java]     at org.mulgara.store.xa.AVLFile.force(AVLFile.java:170)
135
[java]     at org.mulgara.store.statement.xa.TripleAVLFile.force(TripleAVLFile.java:279)
136
[java]     at org.mulgara.store.statement.xa.XAStatementStoreImpl.prepare(XAStatementStoreImpl.java:817)
137
[java]     at org.mulgara.resolver.StringPoolSession.prepare(StringPoolSession.java:242)
138
 .
139
 .
140
 .
141
}}}
142
143
The error you are seeing is happening while an uncommitted transaction
144
is being committed. (Did the system shut down cleanly?)  Once you get
145
it up and running it might be fine to continue as normal. If that's
146
the case, then forcing the system to NOT use file mappings should get
147
you going again.  Do this by updating the command line to include the
148
following:
149
{{{
150
java -Dmulgara.xa.forceIOType=explicit -jar mulgara-1.x.x.jar
151
}}}
152
153
If this works, then you can either continue running like this, or else
154 1 amit -
shut down cleanly and start up again normally.