Scale Cheaply - Memcached

 

You’re probably already familiar with Memcached - it’s a highly efficient distributed caching system. It’s used generously by all the big web 2.0 players (In may 2007 it was revealed that Facebook relies on 200 16GB quad-core dedicated Memcached servers). Interest in Memcached from the .NET community has been relatively low (although over the last year more and more people are talking about it).

Fundamentally, there are two problems with the ASP.NET built-in cache. First, it’s limited to the memory of a single system which happens to be shared with the rest of your application domain. Secondly, if you have two servers, each with their own in-memory cache, users are likely to see very weird synching issues. Memcached isn’t as fast as in-memory caching, but will scale to virtually unlimited amount of memory. There isn’t any redundancy of failover, simply memory spread across multiple servers.

The best part is that it literally takes seconds to get it up and running.

image

Via Scale Cheaply - Memcached - Karl Seguin

Top 5 things to know about Hyper-V

    5) Understand the hypervisor model and performance consequences.

    4) Understand the use of snapshots

    3) How to use Quick Migration

    2) Consider System Center Virtual Machine Manager

    1) Hyper-V can run on Server Core Installation

    Windows Virtualization Team Blog : Top 5 things to know about Hyper-V

    Scalable Load-Balanced Cloud-Server Hosting Platform : GoGrid

    image

    Another cloud computing host that supports Windows Server and .NET

    Scalable Load-Balanced Cloud-Server Hosting Platform : GoGrid

    Digg Recommendation Engine Explained

     

    To understand more about how it works, you should check the interview with Digg’s Lead Scientist Anton Kast:

    Anton Talks About The Digg Recommendation Engine from Kevin Rose on Vimeo.

    You can also read more about the Recommendation Engine in Anton’s Whitepaper (pdf).

    Finding Diggers Like You Explained (excerpt)

    The Digg Recommendation Engine uses your Digg history over the last thirty days to
    make Recommendations.  (You can see the number of items you have Dugg over the
    last month on the right-hand side of the Recommended view.)  Every time you Digg a
    story, the Engine matches you with other Diggers who Dugg the same story, and keeps
    track of all your Diggs in common with them.
    When it’s time to calculate your Recommendations, the Engine draws from this pool of
    matched Diggers.  For each matched Digger, it computes a correlation coefficient
    between you and them.  It then picks a cutoff for this correlation coefficient, and the
    Diggers who make the cut are called “Diggers Like You.”
    It’s easy to understand how the correlations are calculated.  For each user with whom
    you Dugg something in common, the Engine determines how many stories the two of
    you Dugg in common, and divides that number by the total number of stories you or they
    Dugg.  The ratio is a correlation coefficient, a number between zero and one (zero if you
    and the other user never agreed; one if you always did).  Such a ratio is sometimes
    called a “Jaccard coefficient.” More here .

    Digg the Blog » Blog Archive » Recommendation Engine rolling out this week!

    Scale Cheaply - Sharding

     

    There are a lot of expensive ways to scale your database – all of which are highly touted by the big three database vendors because, well, they want to sell you all types of really expensive stuff. Despite what an “engagement consultant” might tell you though, most of the high-traffic websites on the web (google, digg, facebook) rely on far cheaper and better strategies: the core of which is called sharding.

    Sharding is the separation of your data across multiple servers. How you separate your data is up to you, but generally it’s done on some fundamental identifier.

    Our first 500 clients can all go on our first server, at which point we can introduce a second database server and place our next 500 clients. Servers need only be added when actually needed, and there’s no need for management servers, load balancers or anything else – just straight database connections.

    Via Scale Cheaply - Sharding - Karl Seguin

    MOSSO Cloud Computing for .NET, IIS7

    image 

    Shared Hosting, VPS, Dedicated Server

    MOSSO :: The Hosting Cloud - Home

    SCRUM In 5 Mins

    Excellent 1 Page Introduction to REST

     

    Building Web Services the REST Way

    Roger L. Costello

     

    REST Web Services Characteristics

    Here are the characteristics of REST:

    • Client-Server: a pull-based interaction style: consuming components pull representations.
    • Stateless: each request from client to server must contain all the information necessary to understand the request, and cannot take advantage of any stored context on the server.
    • Cache: to improve network efficiency responses must be capable of being labeled as cacheable or non-cacheable.
    • Uniform interface: all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE).
    • Named resources - the system is comprised of resources which are named using a URL.
    • Interconnected resource representations - the representations of the resources are interconnected using URLs, thereby enabling a client to progress from one state to another.
    • Layered components - intermediaries, such as proxy servers, cache servers, gateways, etc, can be inserted between clients and resources to support performance, security, etc.

    Principles of REST Web Service Design

    1. The key to creating Web Services in a REST network (i.e., the Web) is to identify all of the conceptual entities that you wish to expose as services. Above we saw some examples of resources: parts list, detailed part data, purchase order.

    2. Create a URL to each resource. The resources should be nouns, not verbs. For example, do not use this:

    http://www.parts-depot.com/parts/getPart?id=00345
    

    Note the verb, getPart. Instead, use a noun:

    http://www.parts-depot.com/parts/00345
    

    3. Categorize your resources according to whether clients can just receive a representation of the resource, or whether clients can modify (add to) the resource. For the former, make those resources accessible using an HTTP GET. For the later, make those resources accessible using HTTP POST, PUT, and/or DELETE.

    4. All resources accessible via HTTP GET should be side-effect free. That is, the resource should just return a representation of the resource. Invoking the resource should not result in modifying the resource.

    5. No man/woman is an island. Likewise, no representation should be an island. In other words, put hyperlinks within resource representations to enable clients to drill down for more information, and/or to obtain related information.

    6. Design to reveal data gradually. Don’t reveal everything in a single response document. Provide hyperlinks to obtain more details.

    7. Specify the format of response data using a schema (DTD, W3C Schema, RelaxNG, or Schematron). For those services that require a POST or PUT to it, also provide a schema to specify the format of the response.

    8. Describe how your services are to be invoked using either a WSDL document, or simply an HTML document.

    Via http://www.xfront.com/REST-Web-Services.html

    List of .NET Dependency Injection Containers (IOC)

     

      Inversion of Control Containers and the Dependency Injection pattern

    Vai Scott Hanselman’s Computer Zen - List of .NET Dependency Injection Containers (IOC)

    Distributed state management for ASP.NET

     

    The more I delve into distributed architectures, the more I’m feeling like Microsoft just isn’t providing much of a path forward to scalable distributed systems. Case in point: state management.
    By default, session state in ASP.NET is stored in the web server’s memory. To share state across servers - which you would want to do in a server farm - you need to store it in SQL Server or in the .NET state service. This is fine for small solutions, but once you bump up against the need to partition state across many servers or multiple hosting locations, things start to get complex and expensive.

    Solutions:

    ASP.NET SessionStateStoreProviderBase

    Using JavaSpaces from .NET

    3rd Parties: ScaleOut, NCache, GigaSpaces

     

    Via using Enterprise.Architecture;: Distributed state management for ASP.NET