Friday, April 27, 2012

SharePoint Performance Optimization - 1: Cache Configuration

Reference:
SharePoint Server 2010 performance and capacity test results and recommendations 

Types of Caches:
SharePoint Server 2010 provides three types of caches (stored at front-end web server) to optimize Web page loading:
  • BLOB cache 
  • Page Output cache, 
  • Object cache. 
Web.config
Site Collection Settings


Blob Cache:
  • Disk based cache for storing files referenced by Web Pages.
  • Cache is stored on disk drive of front-end web server.
  • Enabled and configured in Web.config (every web app need individual config)
  • Config scope is all site collections within one Web App
Web.config:



Page Output Cache:
To use this cache, Publishing feature need to be turned on.
  • Page Output Cache stores rendered output of a page.
  • Cache stores different rendition of the page (based on audience targeting and permission)
  • Can be configured at Web App level, Site Collection level, site level or at page layout level.
  • Configuration at Web App (via web.config) superseded other configuration.
  • This cache is configured using cache profiles 
  • Multiple profiles can be created but only 2 can be applied based on authenticated user v/s anonymous users.
Web.config:


Site Collection setting

Profiles

Object Cache: 
To use this cache, Publishing feature need to be turned on.
  • Cache storing SharePoint objects (like list and libraries, site setting, page layouts, etc.)
  • Configured at Site Collection and Web App
  • Object Cache is turn on by default at site collection.
  • Object cache size is configured at web app (web.config) but at the cost of memory (RAM) of the web server.
Web.config:

Site Collection setting:

Office Upload Center

What the heck is Microsoft Office Upload Center?
With Office 2010, Microsoft have changed the way Office 2010 application upload documents to web servers  using office's web integration options. So instead of saving the documents directly to SharePoint (or Skydrive), it create a local copy of the document in the Office Upload Center (in the Office Document Cache*) and then try to upload it to the appropriate web server.


*Office Document Cache (ODC) uses file Synchronization via SOAP over HTTP (FSSHTTP) to help in efficient synchronize of local content with remote web server 

Why go through all this trouble?
With upload center, Microsoft have deployed what they call EFT (Efficient File Transfer), which is not only expected to be next logical step in extended desktop experience but also one of the fundamental steps (quite important) in executing their strategy of capturing "cloud" and "mobile" based computing market. The idea behind EFT is to help users by optimizing the usage of the network bandwidth under various network conditions (think desktop/mobile devices as well as hardwirede/wireless/mobile networks).  
There are multiple aspects of EFT:
  • Incremental Upload: While saving documents in Office Document Cache (ODC), the documents are broken into smaller chunk of data pieces. Everytime the document needs to be uploaded, only the data chunks which have changed need to be exchanged helping previous bandwidth in certain situations. 
  • Adaptive Upload: Any documents opened through the web server can be changed by users and saved back without worrying about the network status. If for any reason the document can not be saved to web server right away (working offline/off-network, web server issues), Office Upload center will keep track of the connection and upload queue and as soon as appropriate connection to the web server can be established, it'll commence exchange of data.
Application of Office Upload Center:
Office Upload center is behind most of the online/offline collaboration functionality which is the among the most exciting features of Office 2010 (plus a web server - SharePoint/SkyLive/GoogleDocs,etc.).  
The advantages and importance of Office Upload Center is best highlighted by SharePoint Workspace 2010:
  • Document incremental sync – Once a document is download to a SharePoint Workspace, any further changes in the document are only incremental (delta data packets) and not the whole document.
  • Documents are identified by their HTTP URL directly on your local PC. This prevents users from getting multiple copies of the same document, with conflicts.
  • Auto-merge – If two users edit a Microsoft Word or Microsoft PowerPoint document offline, edits can be merged once they’re back online.
  • Co-authoring – Similar to Auto-merge in preventing conflicts, co-authoring allows two users to edit a Microsoft Word or Microsoft PowerPoint document online, in an active, coauthoring session.
  • Adaptive sync – If you are online, edits that you save are synched immediately. If you are working offline, you changes are synched once you are back online.
How to access Office Upload Center:

Snapshots:
1. Task Bar

2. Upload Center

3. Upload Center Setting:
 
4. My Recent Upload

5. Trying to save the document when offline:

6. Notification on Task Bar

7. As soon as I'm on network, Office Upload center does the work for me.








Tuesday, April 3, 2012

SharePoint Workspace 2010 – Quick Comparison of various workspaces

Overview
}  SharePoint Workspace 2010 Availability:
·         Part of Office Professional 2010
}  Stated Purpose:
·         Anytime,  Anywhere collaboration
}  3 Types of Workspaces within Product
·         SharePoint Workspace
·         Groove Workspace
·         Shared Folder Workspace
}  Mobile device support (using Office Mobile)
·         SharePoint Workspace


Functionality Comparison
Functionality
SharePoint Workspace
Groove Workspace
Shared Folder Workspace
Online and Offline Collaboration on
SP2010 Content
Content on Client Computers
Content on Client Computers
Offline access to content
Yes
Yes
Yes
Auto-sync when online
Yes
Yes
Yes
Local Search
Yes
Yes
Yes
Library Functions (check-in/out, etc.)
Yes
No
No
Co-Authoring
Yes
Yes
No
Collaboration Team definition/control
Follows SP2010 Site Definition/Control
End User defined/controlled1
End User defined/controlled1
Facilitated by
SharePoint Server
Groove Server2
Groove Server2
1 Microsoft’s Public Groove server can enable collaboration with anybody (inside or outside organization) & anywhere (inside or outside corporate firewalls) with access to email and internet and with SharePoint Workspace 2010. However Group policies can be implemented to manage/restrict this functionality.
2 Organization can use hosted groove server inside the organization to facilitate (manage and govern) collaboration.

Use Case Scenario Comparison
Use Case Scenario
SharePoint Workspace
Groove Workspace
Shared Folder Workspace
Collaboration for Professionals on the move (desktop)
Yes
Yes
Yes
Working on sub-optimal network conditions
Yes
Yes
Yes
Access via Mobile Devices
Yes1
No
No
Ad-hoc workspace
No
Yes
Yes
Collaboration with trusted partners
Yes
Require Hosted Groove Server2
Require Hosted Groove Server2
Content Synchronization on multiple devices
Yes3
Yes
Yes
1 Office Mobile required
2 Hosted Groove Server can facilitate (govern and manage) collaboration with trusted partners
3 Access to SP2010 required, making it device + network dependent.

Security Comparison
Security Scenario
SharePoint Workspace
Groove Workspace
Shared Folder Workspace
Security Definition
SP2010 Site security
End user defined1
End User defined1
Content Synchronization
Require access to SP2010
Require Access to Groove Server2
Require Access to Groove Server2
Content Sync Dependency
Device/Network dependent
Device/Network Independent3
Device/Network Indepedent3
Offline Content Security
Tied to Device + Device login Credentials
Tied to Device + Device login Credentials
Tied to Device + Device login Credentials
Remote Wipe/Erase
Not Supported
Not Supported
Not Supported
IRM
Sync of documents (with IRM) supported4  but not IRM on SP libraries5
IRM on documents supported4
IRM on documents supported4
1 End User acting as workspace “Manager” can control the level of access other users get. Also using Microsoft’s Online Groove server (live services) user can extend workspace invitation to anybody with access to email, internet and SharePoint workspace 2010.
2 Connection to Groove server is required. Microsoft’s Public Groove server is available for anybody with email, internet and SharePoint Workspace 2010.
3 Device need local installation of SharePoint workspace 2010 product
4 IRM implementation is client software dependent (may or may not work as intended). Not all types of content can be secured via IRM.
5 Synchronization of SharePoint libraries with IRM (implemented via IMP) is not supported by SharePoint Workspace.

Tuesday, March 27, 2012

Sandboxed solution: Error occurred in deployment step 'Activate Features'

Symptom(s)

While deploying a sandbox solution to SharePoint 2010 via visual studio 2010, user may receive following error:

Error occurred in deployment step 'Activate Features': Timeout occurred while running the SharePoint Sandboxed Code service. This service is required to run sandboxed solutions in SharePoint. Please ensure the service is configured correctly in SharePoint.


Assumption(s)
  1. Sandboxed solutions enabled on the SharePoint farm
  2. User have appropriate access rights(s)

Cause
Above mentioned error is generally caused when a deployed solution can't be activated (see the background section below for more info) because the host process, which execute sandboxed solutions, didn't respond in expected time frame.

The host process is:
  • Referred as  "Microsoft SharePoint Foundation Sandboxed Code Service" when seen in SharePoint UI (via Central Admin)
  • Referred as "SharePoint 2010 User Code Host" when seen in Windows "Services"  (under administration services)
Resolution
You can use either the SharePoint UI or Windows "Services" console (both refer to the same thing)
  • If the service is not running, start the service.
  • If the service is already running, re-start the service (i.e. stop and start)
Background
During deployment of solution via VS2010, visual studio may do following:
  1. Builds a solution:
    • Compile the code
    • Package (aka build) code into a wsp solution,
  2. Deploy the solution:
    • Retract existing version of the solution (optional - only if previous version exist)
    • Uploads the solution file (.wsp file)
      • if "farm solution" - uploaded to the farm visible via central admin
      • If "sandboxed solution" - uploaded to the solution gallery of the site collection where it will be activated in the next step.
    • "deploy" (make it available to web applications):
      • In case of sandbox solution, uploading the solution file constitute "deploying"
      • If farm solution, Visual studio specify the "web application" (web application hosting the targeted site collection) for deployment, and interacts with timer job for immediate deployment.
  3. IIS Reset: If solution is Farm solution, VS2010 try to do an IIS reset.
  4. "Activate Features": In order to make the functionality consumable at site collection level, the feature needs to be turned on. In this step visual studio try to activate the feature at appropriate site collection.