Archive for October, 2008

Finally Microsoft released CTP of Project velocity a distributed caching framework.This is inmemory cache like memcache and exhibit following features
 
Distributed in-memory cache
ASP.NET session synchronization
cluster of cache hosts provides fault tolerance
Supports optimistic as well pessimistic locking of cached objects
Client side cache using cache-aside pattern
Uses TCP/IP between the cache client and the cache cluster
The cache host is a Windows service running on a physical server. The host service can run on the same server as the cache client (e.g. web farm) or on a separate physical server with which the cache client can communicate.
 
Also see  Analysis of Caching Architecture Hierachical and distributed http://www.research.microsoft.com/~pablo/papers/caching_arch_ton.pdf
 
Other products:-
Tangosol Coherence which now brought over by oracle http://www.oracle.com/technology/products/coherence/index.html
 
As an Architect you need to deal with this at certain point of time ,When you need to choose either a scaleout or a scale-in to provide a robust application.Clustering,Failover  and  Load Balancing often becomes a critical decision process,when you found the number of users of your site grows and you need high availability in your application with good performance and scalability .
 

 Coming to Load balancing decision you need to consider if a hardware load balancing is more suited you or a software load balancing is more suited you[scaleout vs scale-in].When you choose Load balancing,although many products provides the features ,the 3 commonly used were BIG IP,NLB and CIsco.

 
Althouugh NLB is cost affective although I found it is not so good in term of performance and traffic.The good point is that all servers in a cluster monitor each other with a heartbeat signal, so there is no single point of failure. To achieve similar functionality using external hardware load balancing appliances, such as the BIG-IP series from F5 Networks, two or more hardware appliances must be used.In win2k3 NLBS does not support automatic removal of a failed server from a cluster unless the server is completely offline.I also saw NLB configuration is tedious.[Although i ll provide few links:)].
 
Coming to the BIG-IP   Its purpose built just to do load balancing, and the physical boxes (which come in pairs) are highly redundant and easy to configure.  Some of the biggest production sites in the world run on Big-IP, so if you have a high volume site, use Big-IP.  you will need to think about your https sticky session strategy regardless of whether you use NLB or Big-IP).
Another advantage of BIG-IP is that it does the failover on the application level.
What I mean is if the IIS go down but OS is Ok,then BIG-IP will notice that the WebServer is not responding to Http Request and hence take it out from farm pool automatically.
 
The NLB support of sticky session is limited and it works based on Client IPs.So if need Https or sticky sessions:-The NLB needed to push all data from same Ip to same Server since the server cannot look at the contents (the session ID) before it decrypted the data.This can be problematic if a lot of traffic comes through a few HTTP proxies or VPN gateways to your site.In SSL scenario the IIS servers  have to do the decryption themselves.
 
BIG-IPs can decrypt the data on the loadbalancer and then look at session IDs when they are decrypted and distribute the load accordingly .It can also do true load balancing based on session IDs (even when SSL is not required), not just IP-based.Also BIG-IPs can do load-dependant balancing with appropriate plugins if for some reason you want more than a simple round-robin load distribution

Although I mentioned the demerits of NLB,its still a viable option for medium scale application and there are quite a few performance improvement happne in win2k8 which needed to be watch out.I am now posting few of the links which will be helpful further for you while taking a decision.

 
Other Links which you might found useful:-
 
This one is indeed a much needed and most waited project from the P&P .Architects working with on Microsoft technology will be benefited the most from this.
App Arch Guide project http://www.codeplex.com/AppArch  Covers the guidance on
  • Authentication and Authorization
  • Caching and State
  • Communication
  • Composition
  • Concurrency and Transactions
  • Configuration Management
  • Coupling and Cohesion
  • Data Access
  • Exception Management
  • Logging and Instrumentation
  • User Experience
  • Validation
  • Workflow
  • Download the PDf today from release tab here http://www.codeplex.com/AppArch/Release/ProjectReleases.aspx?ReleaseId=17700 .There are few introductory videos in home page .

    On similar note See the WCF securuty guidance project with videos and howtos.Again this is a must one for any MS architect.Here is the Link http://www.codeplex.com/WCFSecurity

    Knowledge Base

    Videos

    List of JavaScript Framework and Comparision :- http://en.wikipedia.org/wiki/Comparison_of_JavaScript_frameworks [Pretty details].
     
     
    ClientSide JS Frx:-
    Prototype 
    jQuery 
      Yahoo UI 
    Adobe Spry 
      Moo Tools
    Dojo
    ExtJs
    To decide right choice of framework, it all depends on the requirement. If in a  project it is required to follow component based
    development and a fully  extensible approach, I would suggest jQuery.
    The main reason for this  is as follows:-
    *Microsoft announced that VS will provide Jquery Support see http://jquery.com/blog/2008/09/28/jquery-microsoft-nokia/
    *The  framework is plug-in based and there are many plug-in available at the  main site and is extensible. New plug-ins
    can be created very easily and  quickly.
    *It  provides modular Java Script coding and also minimize the amount of javascript you write with clean code and small footprint.
    *Loose Coupling
     
    * It  never conflicts with any other framework as it run in its own  namespace.
    http://docs.jquery.com/Using_jQuery_with_Other_Libraries
    * Has  got very good documentation and active community .
    * The  plug-in created are generally tested on all the major web browsers and thus  cross browser compatibility is less of an issue.
    Interesting  read:-
    Point  your browser URL to http://www.noupe.com/ajax/45-fresh-out-of-the-oven-jquery-plugins.html,  to see what cool things are
    achievable with jQuery.
    jQuery  Main Site:
    http://jQuery.com
     
    Prototype file size is around 123kb , though prototype is relatively fast in Firefox  as compare to
    jQuery.Prototype can’t even handle basics on its own without  having to piggy back off of script.aculo.us and it’s effects  library.
    Few points observed during using prototype vsjQuery
    * Prototype encourages a class-based structure
    *jQuery has got powerful Dom query engine
    If anyone still want to go class-based design then  consider “moo”.

     
    Pros and Cons of YUI
    Pros:
    –  well documented compared to other frameworks.  Javadoc style.
    — Good examples for almost every component.
    – the core libraries contain most of the features needed for DOM Manipulation, AJAX transactions ,DHTML overlays, Event handling
    without the need for extensions or plugins.
    – supports plugins and extensions
    Cons:
    – can add pageweight
    – verbose code…
    YUI sticks to the core JS patterns while the above 2 follow shorthand syntax for Java script