[Mulgara-general] system graph

Alex Hall alexhall at revelytix.com
Mon Aug 31 21:04:41 UTC 2009


Paul Gearon wrote:
> Please excuse the short message. I'm waiting (and waiting) for the cable
> guy to show up and give me Internet, so I'm slowly tapping away at an
> iPhone for this.
> 
> The default system graph URI is rmi://localhost:8080/server1#, not
> <http://...>http://...

Not exactly...  The port 8080 is the default for the HTTP server.  The
default system graph URI is relative to the RMI address for the server
(defaults to port 1089).  The default system graph URI is just
<rmi://localhost/server1#>.

> Also, you can access it with a relative URI at least in TQL, meaning you
> can refer to it as simply # 
> 
> Regards,
> Paul
> 
> On Aug 29, 2009, at 1:03 PM, Gregg Reynolds <dev at mobileink.com
> <mailto:dev at mobileink.com>> wrote:
> 
>> Still not having any luck with "system graph".
>>
>> First, I'm not sure what it means.  By analogy with an RDBMS, I would
>> think it corresponds to a system table.  But what is its URL?  On a
>> new server installation with no graphs, I tried querying
>> <http://localhost:8080/#>http://localhost:8080/# and variations, with
>> no luck.  So I created a graph using the webUI, giving it the URL 
>> <http://example.org/server1#sampledata>http://example.org/server1#sampledata;
>> no problem.  Then I make a simple query (using curl params in a file): 
>>
>> --url = " <http://localhost:8080/sparql/>http://localhost:8080/sparql/"
>> --include
>> --header "Accept: application/sparql-results+xml"
>> --get
>> --data-urlencode "query=select ?x ?y ?z where {?x ?y ?z}"
>> --data-urlencode "default-graph-uri=
>> <http://example.org/server1#sampledata>http://example.org/server1#sampledata"
>>
>> No problem; returns an empty graph:
>>
>> <?xml version="1.0"?>
>> <sparql xmlns="
>> <http://www.w3.org/2005/sparql-results#>http://www.w3.org/2005/sparql-results#">
>>   <head>
>>     <variable name="x"/>
>>     <variable name="y"/>
>>     <variable name="z"/>
>>   </head>
>>   <results>
>>   </results>
>> </sparql>
>>
>> From what I've seen the "system graph" is supposed to be at "
>> <http://example.org/server1#>http://example.org/server1#", but when I
>> query that it tries to connect to <http://example.org>example.org
>> <http://example.org> and reports Error 500 Unable to connect.
>>
>> I've obviously missed the boat on system graphs.  Help?  Could
>> somebody maybe post a page on the wiki about system graphs, with examples?

The system graph is, as you've mentioned, similar to a system table in
RDBMS terms.  It holds information about all internal graphs on the server.

The URI of the system graph is generated from the server URI.  The
server URI is meant to uniquely identify a server and, in the case of a
standalone RMI server, describe the location used for querying the
server from an RMI client.  It is constructed in the following manner:

rmi://<hostname>[:rmiport]/<servername>

where <hostname> is the canonical network name for the host (the result
from the 'hostname' command in Linux); [:rmiport] is the optional port
number for the RMI registry, specified only if it's running on a
different port from the default 1089; and <servername> is the name of
the server (you can have multiple servers deployed on the same host;
defaults to "server1").  All of these parameters may be changed in the
configuration.

The system graph URI is defined relative to the server URI, and is
constructed by simply appending an empty fragment to the server URI.
For a standalone Mulgara server running a default configuration, you can
use <rmi://localhost/server1#> to refer to the system graph because
Mulgara will resolve aliases to the local host when it evaluates RMI
graph URIs.

Regards,
Alex



More information about the Mulgara-general mailing list