So you have probably noticed it – SharePoint Server 2013 has brought us a whole new, revamped stack of social features. Personal feeds, site feeds, following people, documents, sites and tags, mentions and likes, and some more cool stuff can be found there. Using SharePoint social features is really simple – just by using standard, out of the box features, the user is intuitively guided through the rich set of possibilities, which should make fast adoption in enterprises possible.
But we, as SharePoint developers, always want understand the other side of the story as well. What is under the hood? Why some things are organized the way they are? That is the reason why I will start a series of articles on my blog, where I will do a deep dive in the architecture of SharePoint 2013 social computing features. To make it clear, I will not write or demo about Yammer here, since that is a completely different social story. These articles will be focused solely on SharePoint 2013 Enterprise Social features.
So, let’s start.
In SharePoint 2013, the whole social story is built around four major “Social actors”:
All of them play different roles in the social puzzle, and all of them interact with each other on different ways.
People (users) have a personal feed, which is public and readable by everyone. They can start threads into their personal feeds, and reply on their own threads in personal feed. They can reply on the posts in the feeds of the other people. They can mention other people in their posts or replies. They can follow other people, and get followed by the others.
Sites can also have site feeds, which are available to the site members. All site members (people) can post in the site feeds – start new threads and reply on the existing ones. People can be mentioned in the site feeds, in which case they are notified about it in their my site. On the other hands, people can follow sites, and on that way be notified through their personal feed when something new happens on that site.
People can also follow documents, the same way they follow sites, and be notified through their personal feed when the documents are changed.
People can follow tags, and on different types of SharePoint content can be tagged with hashtags. People are informed through their personal feeds each time when content is tagged with the hashtags they follow.
So, from the previous few sentences, few major components in the SharePoint 2013 social story can be identified:
- Personal feeds – these are newsfeeds on the personal site of each user. Prerequisite for personal feeds, is that user has personal site (My site) created. All the posts in the personal feeds are public, and can be read, and replied to, by everyone.
- Site feeds are very similar to the personal newsfeeds, but their owner is a site, and not a user. Audience is, accordingly, limited to the site users. Site Feeds are by default activated in the team site, but they can be activated as a feature in the other site types.
- Following – people can follow social actors: other people, tags, sites and documents. Information on the activities of the followed actors will appear in the personal feed of the user who is following the actors.
The architecture of social features in SharePoint 2013 has been designed from the scratch. The information about social activities is being persisted into different SharePoint databases.
Main player in the social story with SharePoint 2013 is still the User Profile Service. It even gained on the importance since SharePoint 2010, since a lot of social data is now stored in users’ MySites, which anyway heavily depend on the User Profile Service. It’s a cornerstone in the new SharePoint 2013 social experience.
As already mentioned, the social data itself is now dispersed through the content databases. Everything what ends up in the users’ personal newsfeed, is stored into the lists inside their MySites. It is similar for the site feeds as well: all posts and replies in the site feeds are store in the lists on that sites.
Fundamentally, it looks like this:
- Posts in the personal feeds are persisted into original poster’s My Site.
- Replies to the posts in the personal feeds are persisted in the My Site of the original poster, and in the MySite of the user who has replied to the post (as a reference post).
- Posts into the site feeds are persisted into the Content DB of that particular site.
- Replies onto site feeds are persisted into the ContentDB of the site, as well as into the MySite of the user who has originally posted it as a reference post.
- Likes of the single posts are persisted into the same location where original post has been persisted.
- People and tags being followed are stored in the Profile DB.
- Documents and sites being followed are stored inside the Content DB in the MySite.
- Hashtags as such are being stored as managed metadata, into the term store database.
In the following article, I will make a deep dive into the feeds architecture, where all the relations between Microfeeds and social actors will be explained.
One of the huge improvements with SharePoint 2013 enterprise social is that, instead of simply gathering the social data through the timer jobs, AppFabric cache (formerly known as Velocity) is used as a “buffer” between the social actors and the databases where the data is actually persisted.
This means, when a something is posted to a feed, it is stored both in the content databases and in the AppFabric cache. Other way round, when a feed rendered, it is – if anyhow possible – rendered from the cache. By default, social content lives in cache for 7 days, but that is a value which can be changed, and adapted as needed. That means, if a user opens, for example, the “Everyone” feed, she will see only the information from maximally the last 7 days (could be less under certain conditions – AppFabric performance issues, for example). The other content is still there, it is persisted, and it can be searched for, but it is not fetched into the feeds.
In the next few articles, I will do a deep dive, with lot of code samples, about SharePoint 2013 social features.