[rdfweb-dev] some more on java webring

Dan Brickley daniel.brickley at b...
Sat Jul 1 17:47:32 UTC 2000

(+cc: Eric, for the XUL<->Algae reference)

Ah well there's Java for you ;-)

BTW Libby/Eric you might want to take a look at the way this sort of
thing works in the Mozilla RDF/XUL implementation, documented (mostly) at 
Their new extended XUL templates mechanism is basically the same thing
as the Algae query structures in Eric P's Perllib and your Java version.
(ie. RDF graphs with named question marks on the missing bits...)

So, talking of unstable demos, I just lashed up an unholy mix of Perl
and shell script to invoke the XSB system from CGI. Too ugly to post the
code, but I've linked it in from the Perl rdfwebring prototype. 
see http://rdfwebring.org/rdfweb/ for the rules it (currently) uses.
What it does: from any page eg. 


select the (rather obscure) '(?)' hyperlink next to the bit that says
webid: [genid:libby (?)]. This links to a lookup over the allfactoids.P
database using JanG's rules, and returns the (hyperlinked) mailboxes of
everyone you're directly or indirectly connected to via the specified
relation. It defaults to knowsWell but you can pass in the URI of other
relationships as an attribute called 'predicate'. This makes the entire
system rather fluid since neither the data format (rdf syntax/model),
robot, storage engine or query contraption care anything about the
vocab/relationships/schemata you're using... Of course having some
common shared vocab remains useful and valuable (see mess below where
we wobble between using 'knowsWell' and 'friend'), but this reduces the
need for central coordination (@@ref RSS futures debate ;-)

anyway couple of examples, nothing too exciting but it works (currently):

eg: http://rdfwebring.org/rweb/logic?who=genid:libby
(default query, ie knowsWell connections)

eg2: http://rdfwebring.org/rweb/logic?who=genid:libby&predicate=http://xmlns.com/foaf/0.1/livesWith
(user specified query, pick-your-predicate (though knowsWell is the main
one you'll use given current dataset, ie. nothing much else makes sense 
until we get family tree, org chart or whatever else relations in there)

Note that this last query is pretty nonsensical, since things that
live-with other things tend to come in clusters rather than webs (or
maybe we don't have enough people with multiple homes listed? ;-).

eg3: http://rdfwebring.org/rweb/logic?who=genid:emiller&predicate=http://xmlns.com/foaf/0.1/friend
-- this traverses foaf:friend arcs instead of foaf:knowsWell

Vocab bug: Currently we're using a mix of these two and haven't given
either clear semantics. I don't think they're quite synonymous nor does one
specialise the other: I can know someone well but stand in an
foo:archNemsis relationship to them rather than foaf:friend
relationship. Conversely I can be friends with someone without
(yet) knowing them that well. So this shows the need to figure out some
base vocab before the dataset sprawls much further. Suggestions anyone? 

Vocab questions:
Is 'knows' too weak? How about we take the stance that contentful
relationships are implied by other data, eg. coauthorship, cohabitation,
workplace, similar interests etc and we leave the basic relationship as
'knows'. I'd be inclined to use an event-based model (eg. ABC,
http://www.ilrt.bris.ac.uk/discovery/harmony/docs/abc/abc_draft.html )
to describe things like how/where people met, with dates, photos,
location etc rather than packing everything into a simple flat
relation. This also helps address the fact that the world changse over
time: states of affairs change but the events that bring them about can
be described statically and therefore don't need to come wrapped in
'true until' context. Ugh... I'm rambling... Need to think about this more.

Points of interest re the XSB-powered WWW demo I just hacked:

-It doesn't yet realise that libby-liveswith-libby is a dumb thing to say

- This is an Unstable Demo and liable to break, change, dissapoint...

- The inference engine can't access the persistent RDF store directly,
so slurps into memory each time. This isn't as bad as it sounds since it
will only compile the closure.P and allfactoids.P files first time it
meets them (or when they change). But still, I'm looking forward to the
day when SWI-Prolog (and XSB maybe?) can talk to a BerkeleyDB RDF store
(In an ideal world this would be format compatible with our DBM-based
stuff or Guha's RDF-DB project, http://www.guha.com/db.html)

- seems like a nice basis for experimenting with more interesting
relations (concrete or implied) from the rdfweb dataset, eg. bringing up
a list of people you've co-authored papers with (and their
collaborators...). I'd have to finish the DC implementation first and
figure out what the rules / schema look like, but it feels feasible.

- not being a Prolog hacker this might take me a while...


ps. While I'm dumping brain and hyperlinks, here's a reference I keep 
coming across and failing to share: courteous logic programs. More on
that another time.


On Sat, 1 Jul 2000, Libby Miller wrote:

> Hi Ed,
> sorry about that - not entirely sure what was wrong, but that particular
> error won't happen again. The whole thing is somewhat unstable though -
> i'll have to have another look next week.
> cheers for having a look at it,
> Libby

More information about the foaf-dev mailing list