Products and Services
Graffiti CMS
Learn more about our simple content publishing platform.
Harvest Reporting Server
Get business intelligence tools for measuring online behavior.
Professional Services
Consulting, creative, and Web services from the people who know Community Server best.
Solutions
Telligent
Learn more about our team at Telligent.com.
 

Shared Membership Overview

Shared Membership is the codename for the work we did across membership, profile, and roles in Community Server. A primary goal of Shared Membership was to allow sites to leverage existing membership stores in their implementation of Community Server. It was important to make it easy for multiple communities running Community Server to share a single membership store without their content being physically located in the same database.

Common Myths
Before getting too deep into the internal of Shared Membership, we should dispel a few common myths:

Myth #1: Shared Mempbership is optional
While it is possible that your site is not accessing a remote membership store, you are running Shared Membership bits under the hood. As such, when the time comes you will be able to leverage the added capabilities without the need to download any add-ons.

Myth #2: Shared Mempbership is a single sign-on (SSO) solution
While Shared Membership allows for centralized membership, it does not encapsulate the flow of credentials across sites. For a long time, Community Server has supported single sign-on via a set of commercial components, also called Security Modules. Community Server offers Windows Active Directory, ASP.NET Forms, and Custom Cookie solutions.

How does it work?
Essentially, Community Server needs to treat membership as a black box. This means that we can no longer pull CS and Membership data at the same time. In fact, we can not even assume that the data is located in the same database. Instead, user data is pulled from each data store and then assembled on the server. Furthermore, content and user-related information is separate, requiring further assembly. Perhaps a couple of simple scenarios will better highlight what Shared Membership does:

Scenario #1: Logging In
When a user logs in, the user credentials are passed directly to the membership store for validation (via a MembershipProvider). If the username/password combination is found, the username is handed off to Community Server. Community Server then looks up the user in the local database. Once the user is found, it calls back out to the configured data stores to get membership and profile information. The CSUser object is then assembled with Community Server, membership, and profile information, and returned.

If the local user is not found in the Community Server data store, Community Server creates one and continues with the user assembly process. This is the mechanism by which a new community can leverage the membership of an existing community. That is, anyone with a username/password in Community A can successfully log in to Community B.

Scenario #2: Viewing a Forum Thread
When a user reads the contents of a forum thread, Community Server must query the database for all the posts in that thread. Again, since we are no longer guaranteed that our membership store is local, we cannot pull author information at the same time as we pull the content. Since the forums display rich author information (avatars, points, post count, role icons, and more) we cannot get away with just returning a simple username. Instead, Community Server pulls all the content in a single call and then determines the set of users, or authors, associated with the content. After checking in the cache, we query all non-cached users in a single bulk lookup. When it is time to render the list, we merge the post with the author (from cache) and achieve the same results as expected pre-Shared Membership.

It is important to note that since the ASP.NET Membership providers do not support bulk lookups, we extended them to do so. This means that what used to be a single call (content + users) is now two calls. This extension, supporting bulk lookups, is critical because not doing so could significantly impact the performance of larger forum sites.

Summary
Shared Membership is a key feature of Community Server. At its core, it is designed to support remote and/or shared membership. Integration of existing membership stores is a critical need of many communities and Shared Membership is the answer.