3About Me Microsoft Certified Professional Phoenix Connected Systems User Group Leadership Team6+ years building mid-tier solutions using Microsoft technology including, but not limited to,BizTalk Server (2006, 2010)MSSQL Server (2000, 2005, 2008).NET Framework (1.1, 2.0, 3.5, 4.0)Windows Communication FoundationMicrosoft.Web.Services3.NET RemotingCurrently working for Cable One, Inc.
4Overview of AppFabric Provides hosting services Provides caching servicesProvides robust tools and services for managing applications on-premise and off-premiseTracingDashboardKey point: Difference between Server AppFabric and Azure AppFabricWindows Server AppFabric is on-premiseWindows Azure AppFabric is in the cloudAPIs attempt to be seemless
5The DilemmaEven though we’re light years beyond the traditional paper filing method of the past, users still find the application driven processes too slow. Users will be happy to learn that technology once again has provided a solution: Caching
6Common QuestionsHow do we increase the speed of data access and the application as a whole?How can we make our caching solutions more scalable?How do we ensure our application is not only fast and scalable, but also maintain it’s robustness?
7Cache Concepts Cache Distributed Caching Expiration and Eviction Storing a copy of data closer to application logic, and away from it’s sourceIncreases application speedDistributed CachingA set of nodes in a farm that coordinate to create a unified view of a cache to a caching clientAssists in creating a scalable caching solutionExpiration and EvictionWhen an object is removed from the cache because of stalenes or due to low memory conditionsAssists in maintaining a robust caching solution
9Server AppFabric Cache Architecture Runs on top of Windows Server and IIS via Windows Server AppFabric Caching ServicesCache Host exists on the server as a windows serviceMultiple cache servers can run in a clustered environmentAdministered through PowerShellConfiguration can be shared across multiple servers through the use of a database or XML file located on a UNC shareCache client communicates with the cluster rather than just an individual server
12Implementing AppFabric Cache “You've effectively got a big, partitionable distributed (and optionally highly available) hashtable across multiple machines.”—Scott HanselmanHashtable of objects that take the form of their System.Object base classRequires type conversion to restore them to their original typeCache clusters are logically segmented into named caches and regionsA named cache, also referred to as a cache, is a configurable unit of in-memory storage that all applications use to store data in the distributed cacheRegions are an additional data container that you can place in the cacheRegions can be used to segregate like data by allowing you to search all cached objects in the region using descriptive strings, also known as “tags”.
15Recap: Benefits of Server AppFabric Caching Scalable:Can restart the application without losing valuable cached dataApplications can spread session objects across the cache cluster, providing scalabilityCaches any serializable CLR object and provides access through simple cache APIs
17Azure: Off-Premise Caching Windows Azure provides a simple to maintain solution that allows the business to leverage Microsoft’s servers in order to save moneyImplemented in code almost identically to Server AppFabric, with the only exception that Azure AppFabric Caching does not support user-created regions or tag-based searchesUnlike Windows Server AppFabric, Windows PowerShell is not used to manage the provisioned caches or the cache clusterThe Windows Azure Administration Portal is extremely easy to use and allows businesses to get a cache up and running in as little as 60 secondsLibraries are nearly interchangeable which makes migrating from Windows Server AppFabric to Windows Azure AppFabric Caching a nearly seemless
18Demo 3:Migrating from Windows Server AppFabric Cache to Windows Azure Cache
19Other Cache Providers Off-Premise On-premise Amazon ElastiCache MemcachedProven in one blog online to be a bit fasterMore oftenly stated to be more difficult to set upSupports C#API converts objects to stringsObject size limit: 1MBNot as many features as Coherence and AppFabricCoherenceOn paper, appears to support more features that Server AppFabric cachingRedisNot as many features as other cache providersDoes not support as many languages
20RecapServer AppFabric caching helped make our stock web service ~7.5 times fasterAzure AppFabric caching, although a bit slower, still saw decrease in response time by a multiple of 4Azure cache host configured and started in around 60 seconds or often times lessCode can easily be migrated between off-premise and on-premise AppFabric caching solutions
22ReferencesIntroduction to Caching with Windows Server AppFabric (Beta):Module 1–Windows AppFabric Cache (AppFabric Demos)Windows Server AppFabric Caching Logical Architecture Diagram:Differences Between Caching On-Premises and in the Cloud:Wade Wegner works at Microsoft and is the Technical Evangelist Lead for Windows Azure:Distributed Caching Showdown – Memcached vs Velocity:Installing, Configuring and Using Windows Server AppFabric and the "Velocity" Memory Cache in 10 minutes:
23Aditional Information BlogPhoenix Connected Systems User Group