Dave Johnson on open web technologies, social software and Java
We can't hard-code the names of different types of relationships because some sites might want to call friends "buddies" and some might call them "connections." Some sites might want multiple levels of relationships, with some relationships being considered stronger than others, like on Flickr where you have contacts, friends and family. Some sites might want to allow one-way relationships, as Twitter does with "followers," but some sites might want to require that relationships be two-way, as Facebook does.
We want SocialSite to have a Flexible Relationship model that a site operator can tweak to suit the unique requirements of her site's community. We've settled on a model based on relationship types and named levels. In this post, I'll review this new model that we have designed in hopes of getting some feedback, push-back and other good things that might help us refine our model.
SocialSite is designed to support the types of personal relationship shown below. This doesn't include group relationships, which are handled separately.
SocialSite can be configured to support multiple relationship levels like Flickr's contacts, friends and family levels. Users can use these levels when sharing information, e.g. share a photo only with relationships of family-level or higher. I'll explain how the configuration works, but first let's define what we mean by relationship level.
A Relationship Level is a named integer index that is assigned by one person to indicates the strength of a relationship with another person. People only know the levels that that they have assigned to relationships, so one person in a relationship won't feel slighted if the other party thinks less of the relationship than they do. For example, Fred might consider Bob to be a level 2 "Close Friend" but Bob considers Fred only a level 1 "Acquaintance" relationship. Fred won't learn about this (unless Bob tells him).
You can configure the relationships levels and names supported by SocialSite via the property 'socialsite.relationship.levels'. You simply provide a comma separatied list of the I18N keys of the relationship level names, in order from no-relationship to the strongest level. Here is the default setting, which establishes three relationship levels 0=none, 1=contact and 2=friend:
socialsite.relationship.levels=\ relationshipLevel.none,\ relationshipLevel.contact,\ relationshipLevel.friend
OpenSocial doesn't define differently named relationship levels like we do, so we need to do some mapping. OpenSocial has one type and one level of relationship called "friend." So, to map SocialSite relationships to OpenSocial, we have introduced the notion of a friendship level.
Friendship level is an integer configuration property which indicates the relationship level that is considered to be the friendship relationship across a SocialSite system. Relationships at or above this level are considered to be friends when returning data via OpenSocial APIs. Also, when you add a relationship at friendship-level or above, the other party will be notified and given the opportunity to add you as a friend too. You can configure the friendship level via the property below:
It's good to have the flexibility to support both one and two-way relationships, but we can't assume that all sites will want both. Some social network services, like Facebook, require that friendship-level relationships be two-way, i.e. both parties must agree that they are friends. To make such a setup possible with SocialSite, we've introduced the configuration property below:
If that property is true, then any relationship that is considered a friendship (relationship level >= friendship level) must be a two-way relationship. So, when you add a relationship at friend-level or above, the other party must reciprocate or the relationship will not be created.
To better explain how SocialSite Flexible Relationships work, here are some example configurations that configure SocialSite to behave like well-known social network services.
-like configuration. Flickr supports relationship levels of Contact, Friend and Family. It's possible for you to consider somebody to be Family, while they only consider you only to be a Contact. Any level relationship is considered to be a friendship relationship, for the purposes of OpenSocial.
socialsite.relationship.levels=\ relationshipLevel.none,\ relationshipLevel.contact,\ relationshipLevel.friend,\ relationshipLevel.family socialsite.relationship.friendshiplevel=1 socialsite.relationship.twowayRequiredForFriendship=false
socialsite.relationship.levels=\ relationshipLevel.none,\ relationshipLevel.follower socialsite.relationship.friendshiplevel=1 socialsite.relationship.twowayRequiredForFriendship=false
socialsite.relationship.levels=\ relationshipLevel.none,\ relationshipLevel.friend socialsite.relationship.friendshiplevel=1 socialsite.relationship.twowayRequiredForFriendship=true
The default SocialSite configuration. We're considering the below settings for our default configuration. This would allow you to have contacts, with which you can share information but who are not considered friends and would not show up in your friends list or be returned as friends via the OpenSocial APIs.
socialsite.relationship.levels=\ relationshipLevel.none,\ relationshipLevel.contact,\ relationshipLevel.friend socialsite.relationship.friendshiplevel=2 socialsite.relationship.twowayRequiredForFriendship=true
That just about covers it, so I'm going to wrap up now. Most of the above is now implemented in SocialSite, but none of this stuff is carved in stone. So your feedback is more than welcome, either here or on the SocialSite development or user mailing lists.
You're viewing a weblog entry titled SocialSite's Flexible Relationship model. If you like this entry you might want to:
This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog
Below are the most recent entries in the category Social Software, some may be related to this entry.