The Need for Speed - EpiCenter 2010
-
Upload
phil-pursglove -
Category
Technology
-
view
627 -
download
3
description
Transcript of The Need for Speed - EpiCenter 2010
![Page 1: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/1.jpg)
![Page 2: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/2.jpg)
The Need For Speed
A Developer’s Guide toDistributed Caching with
Velocity Windows Server AppFabric
Phil Pursglove@philpursglovehttp://philpursglove.blogspot.com
![Page 3: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/3.jpg)
Agenda• What is AppFabric?
• Why a Distributed Cache?
• Configuring a client
• Configuring a server
• Managing a cache
• Concurrency
• High availability / load balancing
![Page 4: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/4.jpg)
Caching Review• .NET 1.1
– ASP.NET Cache
• .NET 2.0
– SqlCacheDependency
– Enterprise Library Caching Application Block
• .NET 4.0
– System.Runtime.Caching assembly
– AppFabric
![Page 5: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/5.jpg)
What is AppFabric?
• A combination of two projects:– A distributed cache
• One logical cache shared across a number of physical servers
• Already being used by:
– MSDN Forums. Xbox Live, MSN
• An ASP.NET session state provider
• In .NET 4.0, a cache provider– A workflow host
• V1 released to web 4th June– Servers must be .NET 4.0, clients can be .NET 3.5/4.0
![Page 6: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/6.jpg)
Why a Distributed Cache?
• Bigger cache
– Many physical servers contribute to one logical cache
• Increased throughput
– Many servers available to fulfil requests
• High availability
– Multiple servers = fault tolerance
![Page 7: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/7.jpg)
What Data Can I Cache In AppFabric?
• Any serializable .NET object
– Reference Data (Shared Read)
• e.g. Product categories
– Activity Data (Exclusive Write)
• e.g. Shopping Basket
– Resource Data (Read and Write)
• e.g. product stock data
![Page 8: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/8.jpg)
Configuring the AppFabric Client
• Two assembly references to add:
– Microsoft.ApplicationServer.Caching.Client.dll
– Microsoft.ApplicationServer.Caching.Core.dll
• Cache hosts can be hard-coded or in web.config/app.config
• Clients
– Routing vs Simple
– Local caches
![Page 9: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/9.jpg)
Using AppFabric
• Add/Remove
• Concurrency– Optimistic
• Version-based– Pessimistic
• Lock-based
• Tags
• Regions– Live inside a cache– Use for a set of logically related cached items e.g. Products– Tie a group of cached objects to a specific node
![Page 10: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/10.jpg)
Configuring an AppFabric Server
• Cluster configuration can be held:
– On a network share (XML Provider)
– In a SQL Server DB (SQL Provider)
• Integrated Security only
– AppFabric servers must be inside a domain
![Page 11: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/11.jpg)
Managing An AppFabricCluster
• Powershell integration
– Can start/stop a whole cluster or individual servers
– Create new named caches
• But not regions
– Get cache statistics
• MDCAdmin tool
– WPF app sitting on top of Powershell
![Page 12: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/12.jpg)
Summary
• AppFabric brings the cloud inside your organisation!
• Distributed caching is a powerful way to bring scalability to your applications
– Throughput
– High availability
![Page 13: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/13.jpg)
Questions?
@philpursglove
http://philpursglove.blogspot.com
http://www.philippursglove.com/Velocity
![Page 14: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/14.jpg)
References• V1 Download
– http://tinyurl.com/appfabricdownload • Documentation on MSDN
– http://tinyurl.com/msdnappfabric• Velocity team blog
– http://blogs.msdn.com/velocity– http://blogs.msdn.com/endpoint
• AppFabric blog for IT Pros– http://blogs.technet.com/appfabric/
• TechEd videos– http://tinyurl.com/velocityteched
• Mix 09 video– http://tinyurl.com/velocitymixvideo
• Mix 10 video– http://tinyurl.com/velocitymix10video
• ARCCast Video– http://tinyurl.com/velocityscotthavideo
• ScottHa on Velocity– http://tinyurl.com/velocityhanselminutes
• Deep Fried Bytes on AppFabric– http://tinyurl.com/deepfriedappfabric
![Page 15: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/15.jpg)
References• AppFabric coverage on StackOverflow
– http://tinyurl.com/stackoverflowvelocity– http://tinyurl.com/stackoverflowappfabric
• DotNetRocks– http://tinyurl.com/dotnetrocksappfabric
• Other .NET distributed caches– NCache - http://tinyurl.com/ncache– Memcached - http://tinyurl.com/smoe– Oracle Coherence – http://tinyurl.com/oraclecoherence– SharedCache – http://codeplex.com/sharedcache
• Extensions Project– http://tinyurl.com/mscacheext
• Admin Tool– http://mdcadmintool.codeplex.com/
![Page 16: The Need for Speed - EpiCenter 2010](https://reader033.fdocuments.net/reader033/viewer/2022042813/54922bbfb47959962d8b5430/html5/thumbnails/16.jpg)