[foaf-dev] Re: Prototyping a decentralized graph

Story Henry henry.story at bblfish.net
Tue Aug 21 13:46:24 BST 2007


A interesting project.  It does seem to have found a lot of my accounts.

Now it does this just by searching on the nickname, which as it  
happens is usually very consistent in my case.
But I don't think you should necessarily merge on that (not sure you  
are, just guessing) since foaf:nick is not an inverse functional  
property.

What you could have for each account a relation such as ( in N3,  
which is really easier to read! )

@prefix foaf: <http://xmlns.com/foaf/0.1/> .

_:m1 a foaf:Person;
    foaf:holdsAccount
         [ a foaf:OnlineAccount;
           foaf:accountServiceHomePage <http://digg.com/>;
           foaf:accountName "bblfish" ] .

_:m2 a foaf:Person;
    foaf:nick "bblfish"; #not foaf:name
    foaf:holdsAccount
         [ a foaf:OnlineAccount;
           foaf:accountServiceHomePage <http://flickr.com/>;
           foaf:accountName "bblfish" ];
    foaf:knows
          [ a foaf:Person;
            foaf:nick "goodlux"; #again not foaf:name!
            foaf:holdsAccount
                [ a foaf:OnlineAccount;
                  foaf:accountServiceHomePage <http://flickr.com/>;
                  foaf:accountName "goodlux" ]
          ],
          [ a foaf:Person;
            foaf:nick "leobard"; #again not foaf:name!
            foaf:holdsAccount
                [ a foaf:OnlineAccount;
                  foaf:accountServiceHomePage <http://flickr.com/>;
                  foaf:accountName "leobard" ]
          ] .


Here you have found two people _:m1 and _:m2 with online accounts  
that have
nicknames "bblfish". But I don't think you can really tell they are  
both my accounts,
ie that _:m1 = _:m2 = <http://bblfish.net/people/henry/card#me>
unless you assume that that nickname is my given right to use. I  
happen to have been
lucky in getting that nick most places I went to, but there is no  
guarantee that it is going
to be so everywhere.

If those services gave you information such as my home page  
(foaf:homepage) or my email (foaf:mbox) or
my foaf:openid, then you would be able to merge them, since they are  
all inverse functional properties.
With foaf:openid or foaf:mbox you will most likely be correct on each  
of these services, because it is unlikely that someone could have  
opened an account there without my knowing it (foaf:mbox) or without  
verification (foaf:openid). In the home page case on the other hand,  
anyone could claim that my page is theirs...

Your rdf has a lot of statements such as

<http://digg.com/users/bblfish/profile> a <http://purl.org/rss/1.0/ 
channel> .

rss:chanels are very similar to atom feeds, and I don't think that my  
profile document on digg, or most
other such services is a channel.

You could add a relation to those profile pages. If those services  
were enlightened, they would of course publish a minimal foaf file at  
that location...

Another ontology you can use later, as you feel more comfortable is  
sioc, for Semantically Interlinked Online Communities, which is  
clearly what you are doing. It should work nicely with foaf. (http:// 
sioc-project.org/)

Another more advanced thing to do would be to create a DB of such  
relations and make it available via a SPARQL endpoint. Your result  
above would be something that might have resulted from a query such as

DESCRIBE ?p
WHERE {
   ?p foaf:holdsAccount [ foaf:accountName "bblfish" ] .
}

This would then massively increase the number of ways of querying  
that database...

What you are doing is a very good exercise, and depending on how you  
evolve it, could be very useful.

Thanks already for reminding me of a few accounts I had forgotten about.


I came across a bug searching for bblfish info:

hjs at bblfish:0$ cwm 'http://openfriendformat.com/foaf/gen.php? 
account=bblfish&avatars=true&network=all'
#Processed by Id: cwm.py,v 1.194 2007-08-06 16:13:56 syosi Exp
         #    using base http://openfriendformat.com/foaf/gen.php? 
account=bblfish&avatars=true&network=all
    http://openfriendformat.com/foaf/gen.php? 
account=bblfish&avatars=true&network=all
         Traceback (most recent call last):
   File "/Users/hjs/Programming/w3c/2000/10/swap/cwm.py", line 746,  
in <module>
     doCommand()
   File "/Users/hjs/Programming/w3c/2000/10/swap/cwm.py", line 454,  
in doCommand
     why=myReason)
   File "/Users/hjs/Programming/w3c/2000/10/swap/webAccess.py", line  
210, in load
     p.feed(buffer)
   File "/Users/hjs/Programming/w3c/2000/10/swap/sax2rdf.py", line  
899, in feed
     self._p.feed(data)
   File "/sw/lib/python2.5/site-packages/_xmlplus/sax/ 
expatreader.py", line 216, in feed
     self._parser.Parse(data, isFinal)
   File "/sw/lib/python2.5/site-packages/_xmlplus/sax/ 
expatreader.py", line 353, in start_element_ns
     AttributesNSImpl(newattrs, qnames))
   File "/Users/hjs/Programming/w3c/2000/10/swap/sax2rdf.py", line  
463, in startElementNS
     self._nodeElement(tagURI, attrs)
   File "/Users/hjs/Programming/w3c/2000/10/swap/sax2rdf.py", line  
335, in _nodeElement
     self.idAboutAttr(attrs)
   File "/Users/hjs/Programming/w3c/2000/10/swap/sax2rdf.py", line  
258, in idAboutAttr
     raise BadSyntax(sys.exc_info(), "Two elements cannot have the  
same ID, %s" % value)
swap.sax2rdf.BadSyntax: Two elements cannot have the same ID, me

Looks like there are multiple uses of the "me" ID.

On 21 Aug 2007, at 13:43, Danny Ayers wrote:

> Marvellous!
>
> [cc'ing foaf-dev]
>
> On 21/08/07, Anthony Romano <dominatus at gmail.com> wrote:
>>
>> I wanted to give an update on progress I made tonight.
>>
>> I've moved the code to openfriendformat.com, the generator now lives
>> there, off the Tabber servers. The generator now makes a FOAF  
>> document
>> instead of XFN. I decided it was a better format what what this is
>> trying to accomplish.
>>
>> Anyway, there may be a few problems with the FOAF, I'd appreciate it
>> if anyone pointed out errors...
>>
>> http://openfriendformat.com/foaf/gen.php? 
>> account=dominatus&network=digg
>>
>> What that says is, given user dominatus on digg, find me all related
>> accounts on the net and all his friends from those accounts. As you
>> can see by the FOAF it found matching accounts on Twitter and
>> Delicious. It does this with *no database* access or support what-so-
>> ever. It's doing this dynamically. It caches the results for 24 hours
>> to avoid heavy server load.
>>
>> You can play around with it here: http://openfriendformat.com/foaf/
>>
>> Again, any user name should work with this, the more networks and
>> friends you have on those networks the better this works.
>>
>>
>> On Aug 20, 3:10 pm, Anthony  Romano <domina... at gmail.com> wrote:
>>> Yeah, Tabber I feel like is a building block, though I do think
>>> OpenFriendFormat, when I flesh out the idea could be a solution  
>>> to the
>>> actual problem. At least, I think the problem that is.
>>>
>>> When finished OpenFriendFormat would be able to accept a digg  
>>> account,
>>> an openid, or just an online handle and return to you a list of
>>> connected friends. Now, it won't be able to do two way (that is,
>>> someone has you as a friend but you dont have them as one), because
>>> that would require indexing about 1000 million billion gigabytes of
>>> information, but instead will be generated on the fly. But the real
>>> question is, do we even want that data? SteveJobs would have  
>>> thousands
>>> and thousands of friends if we indexed his Twitter in this way, but
>>> SteveJobs does not actually have all of those friends.
>>>
>>> Unless of course I'm missing something and unaware of a glaring hole
>>> in my logic. Which is definitely possible, I haven't read every  
>>> single
>>> thing to do with this yet though I have read a good deal.
>>>
>>> On Aug 20, 3:03 pm, "David Recordon" <record... at gmail.com> wrote:
>>>
>>>> Hey Anthony,
>>>> Was really cool how simple it was to login with OpenID and then  
>>>> have
>>>> it suck in my Digg contacts when I told it to.  I think it is a
>>>> different part of the overall problem that we're all trying to  
>>>> solve,
>>>> but guessing will definitely be building on each other's work.
>>>
>>>> --David
>>>
>>>> On 8/20/07, Anthony Romano <domina... at gmail.com> wrote:
>>>
>>>>> Hello
>>>
>>>>> A little introduction. My name is Anthony Romano, I am the  
>>>>> founder and
>>>>> lead engineer of Tabber.org, a social network aggregator.
>>>
>>>>> So a lot of talk has been occurring recently on social network
>>>>> portability, and being a social network aggregator, I've  
>>>>> decided to
>>>>> through my hat in the ring.
>>>
>>>>> I began prototyping a decentralized (i.e. it follows links and  
>>>>> parses
>>>>> data on the fly) graph builder. You can find it  
>>>>> atwww.tabber.org/offtest.php
>>>
>>>>> I also bought the domainwww.openfriendformat.com. Originally I was
>>>>> going to publish the graph in a new microformat but I've since  
>>>>> decided
>>>>> it would be best to use hCard+XFN. Right now the results are just
>>>>> published as XFN links in an unordered list.
>>>
>>>>> The generator I made does not require you to belong to Tabber,  
>>>>> it is
>>>>> completely independent from it. It does not even touch the Tabber
>>>>> database. You are able to query on several networks or find  
>>>>> results
>>>>> from all supported networks. If the generator finds common friends
>>>>> between two supported networks it groups them in a single ul.  
>>>>> In other
>>>>> words, if I say "given user dominatus on network digg" it will  
>>>>> grab
>>>>> all my friends from digg, and then search for all dominatus' on  
>>>>> all
>>>>> other supported networks, and if it finds common friends, it will
>>>>> group them. If you said "given user dominatus on network all"  
>>>>> then it
>>>>> will search all networks and compare all friends and present  
>>>>> them in
>>>>> logical groups.
>>>
>>>>> The problem I think, is that the user needs the ability to  
>>>>> "claim" the
>>>>> results, preferably through the use of OpenID. In otherwords if  
>>>>> I say
>>>>> "given user dominatus.myopenid.com on network openid" I should  
>>>>> be able
>>>>> to generate results that the user specifies. That is, a site  
>>>>> needs to
>>>>> exist that uses OpenID as a login and allows the user to add  
>>>>> links to
>>>>> their various social networks. Now we can say with 100%  
>>>>> assurance that
>>>>> the user has these friends and these accounts. It also solves the
>>>>> problem of a user being joebob on Twitter but joebob22 on Digg.
>>>
>>>>> Tabber is one of these sites, but I think its important this  
>>>>> effort be
>>>>> left open and not owned by anyone in particular, as Tabber is a  
>>>>> player
>>>>> in the field and should not be the owner of all information. One
>>>>> solution I had was open sourcing and hosting the aggregator on
>>>>> openfriendformat.com. Then, maintaining not only a list of social
>>>>> networks it manually searches, but also a list of sites, like  
>>>>> Tabber,
>>>>> but open to anyone who conforms to the standard, who when fed an
>>>>> OpenID will return a list of friends. The aggregator on
>>>>> OpenFriendFormat would then search all the social networks, Digg,
>>>>> Twitter, etc, and also all of these "trusted" aggregators (if  
>>>>> there is
>>>>> an OpenID given). It will then aggregate these results and present
>>>>> them out.
>>>
>>>>> So if one were to have an OpenID, it would search a list of these
>>>>> aggregators, which would be maintained on the openfriendformat
>>>>> homepage. This is similar to stores in OpenID. There are many  
>>>>> stores
>>>>> to use and the user can pick any. In this way, So if the user  
>>>>> wants to
>>>>> "claim" his OpenID friends he merely signs up for one of these
>>>>> aggregators and starts building his graph.
>>>
>>>>> In the more common situation of not having an OpenID, the FOSS
>>>>> aggregator sitting on openfriendformat.com would search all of  
>>>>> the non-
>>>>> aggregation sites, similar to what it does now. We could also  
>>>>> support
>>>>> querying the aggregators since not everyone has an OpenID. So for
>>>>> example, if we know user dominatus on network digg, we can  
>>>>> start by
>>>>> hitting all the aggregators with a query saying, "do you have  
>>>>> any info
>>>>> on a user with a digg account". If they do, they could give us  
>>>>> back a
>>>>> list of friends, which could be included in the results. It's
>>>>> important to note though that the accounts should be verified  
>>>>> if they
>>>>> are to be returned, otherwise people will start to claim   
>>>>> "stevejobs"
>>>>> on twitter and start spamming it up.
>>>
>>>>> What are everyones thoughts on this. You can try out the OFF  
>>>>> Test site
>>>>> if you want, obviously its still in active development. The code I
>>>>> have is independent from Tabber's code base so I have no  
>>>>> problem open
>>>>> sourcing it and putting it on openfriendformat.com. If anyone  
>>>>> wants to
>>>>> make suggestions or help out, let me know.
>>
>>
>
>
> -- 
>
> http://dannyayers.com
> _______________________________________________
> foaf-dev mailing list
> foaf-dev at lists.foaf-project.org
> http://lists.foaf-project.org/mailman/listinfo/foaf-dev



More information about the foaf-dev mailing list