Archive for the ‘Architecture Series’ Category

Although HTML5 is not completed yet , there are lot of buzz around the spec and features it provides .Many thought that it may be the death nail for Flash and Silverlight  and there were lot of initiatives on HTML 5 already started.Although industry is still in its starting state , its worth looking at the media,mobile,Canvas,Offline Storage,Geolocation,Sockets and notification etc. are worth taking a look.

The Spec

Difference with HTML 4.1

Good Online book to deep dive into HTML5

Also see the HTML5 Contest and win prizes.


Template or take Decision for Velocity:-

  • Cache Servers: – How Many Cache Servers needed.See Capacity Plan Section in MSDN.
  • Security:-Check Security Permission, Firewall rules and Domain setting.For details see the Security section on MSDN.
  • What we are moving to Distributed Cache: – Plan what you are moving to Cache Static Data, Catalog data .Consider moving less frequently changes data.
  • CacheConfig and Provider: – Consider SqlServer for Cache Cluster Configuration store.
  • Cache Client: – .NET 3.5 SP1 or .NET 4.0
  • Cache Pre-Loading:- Do we need Preloading the cache 
  • Cache loading: – Can it be Parallel?
  • Local Cache Mode and Notification: – Considered Local Cache and Notification.
  • Named Cache:-
  • Region and Tag :- If needed in same physical location.Can be managed as a single operation and tag can be used to query specific tag items.
  • Bulk Operation: – None
  • Versioning and Concurrency: – What type of versioning and Concurrency needed?
  • ChannelOpenTimeOut :- ?
  • RequestTimeOut :-?
  • MaxConnectiontoServer :-?
  • BufferSize:- ?


The communication between the cache servers and cache clients uses the WCF channel model and net.Tcp binding. Cache Servers use the 22233 (default) TCP port for communicating with the cache client

  • Tracing: – default (I think its not enabled by default)
  • Protection Level:-Check Access and Permission
  • Running Account: – Network Service or Service Account?
  • Test for a preload
  • Analyze and Decide Future Steps.






Best Practice Recommendation

  • Even though having just 1 cache server in the client config would suffice, it is recommended to maintain as many cache server hostnames in the config file. *When a cache client connects to one of the cache servers, it gets the routing table which has the partitioning logic to access other cache servers. Including more cache servers helps with more resiliency for the initial connection. If the logic is implemented in code, building a host lookup service will work better.
  • Instantiating a DataCacheFactory object creates several internal data structures (DRM, ThickClient), minimizing the number of DataCacheFactories and creating them in advance (on a separate thread) is recommended. A singleton pattern should work for most scenarios; do not create one DataCacheFactory object per cache operation. When you need to have different policy settings, for example, if local cache is required only for a set of named caches, then having different DataCacheFactory objects will be appropriate.
  • Default setting for ChannelOpenTimeout is 15 seconds, you can set it to much lower values if you want the application to fail fast while opening the channel.
  • Default setting for RequestTimeout is 10 seconds, do not set it to 0. If you do, your application will see a timeout on every cache call. Changes to the default value need to take into account the workload and physical resources (client machine configuration, cache server configuration, network bandwidth, object size, ratio of GETs Vs PUTs, number of concurrent operations, usage of Regions, etc).
  • Setting maxConnectionsToServer=1 (default) will work in most situations. In scenarios, when there is a single shared DataCacheFactory and a lot of threads are posting on that connection, there may be a need to increase it. So if you are looking at a high throughput scenario, then increasing this value beyond 1 is recommended. Also, be aware that if you had 5 cache servers in the cluster, if the application uses 3 DataCacheFactories and if maxConnectionsToServer=3, from each client machine there would be 9 outbound TCP connections to each cacheserver, 45 in total across all cache servers.
  • Local Cache :- For best performance, only enable local cache for objects that change infrequently. Using local cache for frequently changing data may increase the chance that the client will be working with stale objects. Although you could lower the ttlValue and make a process refresh the local cache more frequently, the increased load on the cluster may outweigh the benefits of having the local cache. In such cases of frequently changing data, it is best to disable local cache and pull data directly from the cluster

· Expiration time on Velocity should not be set to very small values, which lead to increasing memory consumption, not decreasing. This occurs because of delays of garbage collection calls―old data expires, but remains in memory, and a new copy of data is added to memory.

· Velocity may scale better than linearly when scaling up from a small number of memory-poor nodes to store most-used data. Increasing the number of Velocity nodes increases the amount of memory available for most-used data and eliminates the database bottleneck.

For CacheClient :- Preparing the Cache Client Development Environment

High-Availability Resources

The cluster configuration storage location can be a single point of failure for your distributed cache system. For this reason, we recommend that you use Windows Server 2008 Failover Clustering ( when you can, to optimize the availability of your cluster’s configuration data. Consider which “clustered” resources are available to your application (in your environment) and balance that with the degree of availability required for your distributed cache system to decide which storage option is best for you.

For example, your infrastructure may already have a “clustered” SQL Server database available to store your configuration settings. Alternatively, there may be a “clustered” folder available for you to deploy a shared folder-based cluster configuration.

· Employ a large number of cache hosts.

· Deploy your distributed cache system within the perimeter of a firewall, with all servers members of the same domain, including the cache clients, cache hosts, primary data source server, and the server hosting the cluster configuration storage location.

· Use SQL Server or a custom provider to store the cache cluster configuration settings.

· Use SQL Server or a custom provider to perform the cluster management role. For more information, see Lead Hosts and Cluster Management (Windows Server AppFabric Caching).

· When possible, use Microsoft Windows Server 2008 Failover Clustering ( to host a “clustered” database resource for the cache cluster configuration storage location.

· Minimize costly configuration changes that require stopping the cluster. When possible, re-create named caches instead of stopping the entire cache cluster to make cache configuration changes in the cluster configuration settings.

· Always use the Stop-CacheHost command to stop the cache service before rebooting a server. When lead hosts perform the cluster management role, the Stop-CacheHost cmdlet will not succeed if the act of stopping the cache service causes the entire cache cluster to shut itself down (because of no majority of running lead hosts).


Cache Preload :-


Preloading,ParallelLoading etc;


Cluster settings :-

Velocity benchmarking and

With MVC

AppFabric Cahing vs IBM Exterme Scale and Here is the benchmark With Code 

Dynamic Router with AppFabCaching

Vittrio has posted a Nice Blog Entry on how to test the Claims and Federation using test Token generated using SelfStS.In Short SelfSTS is a nice little tool which will helps you to test your Identity app without ADFS 2.0 or AD available,Since it ll issue a token via Ws-RED,an endpoint and metadata .You can also create temp Certificate etc. more details on Vittorio’s blog .


Posted: May 17, 2010 in Architecture Series

Of late the NO-SQL movement is gaining popularity and lot of people have started blogging about NO-SQL.Now the question is how much do you think it ll take time to see real-world NO-SQL applications in top level Enterprises.Ted Neward has written a Very Cool Article on NO-SQL on MSDNMAG May Edition. MongoDB,CoucheDB are already quite Popular now and of late getting lot of traction.If you wants to learn more See the Following posts and Links

I ve put together this plan in Codeplex.I want to build an Application framework and here is the Draft of the Items ,I am planning to build in next few days.



OOB Infrastructure services










SL media framework




Unit Testing





Rhino mocks/n-mocks


SL OOB (n/w detection),COM Support, Office Integration,TextToSpeech


SP 2010 Integration





WCF Data services


RIA Services


WCF services


Duplex, aspnet membership


REST /OData Services




Cloud services






External- Twitter, Facebook etc;


Other Framework



Server Cache




Caching Client






IRON Python








Sync Framework


WIF with WCF





Enterprise Services







Real time Stock updates



Configuration management






User management



Charting –Heat maps



Services management






Subscription management



Stocks subscriptions









Notifications (Offline storage)


XtCover is a Code Coverage Reporting tool created on top of VScodeCoverage Result to provide Flexible Reporting and Coverage Details.This is still beta but now released to Codeplex.Download the tool ,Play with it and provide your valuable feedback.For the next version we are accepting Invitation which ll use VS2010 and VS2010 Coverage Apis.

Today a Configuration Video was Uploaded which helps you understand the different Configuration you need to apply.Here is the  link

This Project is all about creating a re-usable asset libraries on SharePoint like re-usable web parts,solutions,workflows,Utilities targeting SharePoint applications .
Although this will contains re-usable assets ,the final deliverable will be an end-to-end solution which you can use for your enterprise.This is not going to be another CKS but we are going to target multiple aspects of an enterprise product.
We are going to use SP2010 as the primary platform (not MOSS-07)and going to add assets like Discussion-Forums,Silverlight Web parts ,calendars,Provisioning Solutions,Automated Solutions,Connectors,rollups and many more RIA and Web 2.0 features into this project.

Soon the Codeplex Project will be updated with many cool Web parts and utilities for SharePoint 2010 .

Here is the Link :-