Creating Distributed Social Networks with
Linked Open Data and FOAF+SSL

[or “What’s your favourite cheese?”]

Toby Inkster BSc ARCS
(Unaffiliated, see tobyinkster.co.uk)

Abstract. The Semantic Web provides a convenient source of seed data for social networks and offers the opportunity to reduce the amount of work new users need to perform when signing up to a new website. This is a demonstration of a semantic social network built with a few hundred lines of Perl.


The #swig Cheese Lovers' Club has decided to set up its own web site [1], allowing people to join the club and to share information about their favourite cheeses.

Despite all sharing a passion for cheeses, the cheese lovers are all very busy people, so don't have time to type in descriptions of their favourite cheeses. Therefore they want to hook into the growing collection of linked open data, and simply select cheeses from DBpedia, the semantic web version of Wikipedia.

Also, despite all being very clever, the cheese lovers are forgetful people, and don't like having to set up new user names and passwords for every service they use. Therefore, they want to use an emerging technology, FOAF+SSL[2] for identification.

The Database

Rather than use a traditional, relational database management system, the club opt to use a triple store for their information. As only a few people will be expected to visit the web site each day, it is decided that a flat N-Triples file will be adequate storage. If site traffic exceeds expectations there is a clear route to scale up to a bigger system, such as OpenLink Virtuoso. As well as powering the web site, the club can directly expose the N-Triples file to the web[3], allowing it to act as the web site's (read-only) API.

The club itself can be represented in the database as a foaf:Group resource with foaf:member links to foaf:Person resources for each club member.

The person's contact details, initially gleaned from their own FOAF (RDF) files, and cached in the database. (Future versions of the web site software will occasionally refresh the web site's cache of their details.) A person's cheese preferences will be represented by a foaf:topic_interest link to a cheese.

The database is populated with an initial list of cheeses by performing a SPARQL query on DBpedia[4].

Authentication using FOAF+SSL

FOAF+SSL is a simple semantic-web-based authentication system. There are no user names and passwords to remember. You obtain a FOAF+SSL client certificate, install it into your browser, and then any FOAF+SSL-enabled site can identify you using the information you provide in your public FOAF file.

As soon as someone visits the club's home page, the site knows their identity and can check its database to see if the visitor is a member. Members get to explore the site; non-members are given the opportunity to join.

When someone opts to join, there are no forms to fill out: the sign-up process is as simple as clicking "Join". Using FOAF+SSL and a little SPARQL, the site can determine their name, homepage, photograph and so forth from their FOAF file. Because there is no long sign-up process acting as a barrier to becoming a member, potential members can start using the site straight away. Easy sign-up processes tend to encourage more members to join than arduous ones do.

Demonstration

The site is currently operational and several adventurous souls have already signed up and expressed their favourite cheeses.

FOAF+SSL certificates can be easily obtained using the foafssl.org test certificate service[5], and for help adding the correct triples to your FOAF file, I recommend joining the foaf-protocols mailing list[6] or asking on the #swig channel on Freenode.

Ideas for Further Development


  1. #swig Cheese Lovers' Club <https://ophelia.g5n.co.uk:10443/cheese/>
  2. FOAF+SSL, ESW Wiki <http://esw.w3.org/topic/foaf+ssl>
  3. URL: <http://buzzword.org.uk/2009/cheese/data.nt>
  4. DBpedia SPARQL Interface <http://dbpedia.org/sparql>
  5. Test certificate service <http://test.foafssl.org/cert/>
  6. foaf-protocols <http://lists.foaf-project.org/mailman/listinfo/foaf-protocols>