This is from my Tech-Ed Africa 2010 talk. For more information see: http://www.sadev.co.za/content/teched-africa-2010-slides-scripts-and-demos-my-talks
This session looks at what AppFabric Caching is from start to deep dive.
WordPress Websites for Engineers: Elevate Your Brand
Windows Server AppFabric Caching - What it is & when you should use it?
1.
2. Robert MacLean Technology Specialist BB&D Windows Server AppFabric Caching: What it is & When you should use it?
3. Who am I? Robert MacLean Microsoft ALM MVP Microsoft ALM Ranger Proud Community Lead Information Worker S.A. Architect www.sadev.co.za @rmaclean
4. Overture Level 300 State of play Briefly what is AppFabric? What do we get from AppFabric Caching and how to use it!
5. Advert Time AppFabric: Wed, 11:15pm - WCF Made Easy with .NET 4 and Windows Server AppFabric Other: Wed, 8:30pm - Tales From the field – Best practices and guidance on implementing TFS2010
6. State of play .NET prior to 4 ASP.NET Caching Enterprise Library Caching .NET 4 brings us .NET 4 Caching All are local in-memory caches!
8. What is the issue with these? Limited to memory of current machine Limited to current process Imagine if I need 50Gb of cache? What about load balancing?
9. A rose by any other name… Windows Server AppFabric contains two key components Hosting EndPoint, Windows App Server Extensions, Dublin Caching Velocity Not to be confused with Azure AppFabric
10. N.B. AppFabric Requires .NET 4 on Server Not all applications need .NET 4, depends on features used Standalone download or Web Platform Installer High Availability is only in Windows Server 2008 Enterprise & Data Centre
11. What is AppFabric Cache? An in-memory distributed cache which you can call from any .NET application Optimised for the cache-aside pattern Programming against the cache is explicit Changing the cache doesn’t update the original data store
12. AppFabric Cache Single View Cache Server Single view from code Services Cache Server Data 1 Data 2 Data 3 Data 4 Cache Server Cache Server
13. AppFabric Caching Info Common Configuration Store XML Database Runs as Windows Service Communication Between Nodes WCF net.tcp Self Adjusting
14. AppFabric Server Types Dedicated Cache Server All it does is AppFabric caching – good for lots of memory and great performation Hybrid Cache Server Runs AppFabric caching & other tools. SQL + AppFabric Web + AppFabric Local Cache Server Runs AppFabric per application locally Used in conjunction with hybrid and/or dedicated
15. What can I cache? Anything that can be serialised XML POCO Binary Data
16. Data Cache Planning Reference Data Cities, provinces, product info, etc… Activity Data Session, per user etc.. Resource Data Data with contention We will look at this more later… NB: Plan, plan and plan some more
17. Management All Configuration and Administration is done via PowerShell From the MVP’s: http://mdcadmintool.codeplex.com/
19. Cache Structure Review Server Server Server Named Cache: Default Named Cache: Products Named Cache: Users Region: Male Region: Female Items & Tags
20. Expiration of cache items Put & Add Timeout Notification Polling Default: 300 secs Expiration timeout defaults can be controlled on a cache level
21. Eviction @ Low watermark Expired items removed @ High watermark Items, expired or not, can be removed or allocated to another server Items picked by using LRU Can disable if needed
22. ORM’s Some ORM’s implement second level caching It is possible to change the second level to AppFabric Examples: NHibernate & Entity Framework
23. A Problem with Caching AppFabric Cache Name : Robert Balance: 1500 Write DB Name : Robert Balance: 15 ATM ATM ORM UI ORM UI Name : Robert Balance: 15
25. Data Cache Planning Reference Data Cities, provinces, product info, etc… Activity Data Session, per user etc.. Resource Data Data with contention NB: Plan, plan and plan some more Great with defaults Region per user Locking per item
26. Cluster Configuration First node initialises cluster Other nodes join During install you must configure projected size Small: 1 – 5 nodes Medium: 6 – 15 nodes Large: > 15 nodes Performance based on this setting – adding/removing nodes does not effect this
27. Security Domain: Authentication in AD, Authorisation in AppFabric Only authorised servers join clusters Only authorised clients connect to clusters Workgroup Authentication in network share, Authorisation in AppFabric Transport Level Security Signing and Encryption
29. ASP.NET Out of the box caching InProc (Default) StateServer SQLServer All can be enabled by via config change Now AppFabric support also just a config change
35. Summary Windows Server AppFabric Cache is a distributed application cache Caching is important to application scalability Explicit caching API available to .NET 3.5 SP1 and .NET 4.0 ASP.NET Session provider an implicit way to take advantage of the Cache’s capabilities Plan, plan and plan some more
37. Resources Required Slide Learning Sessions On-Demand & Community Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning Resources for IT Professionals Resources for Developers http://microsoft.com/msdn http://microsoft.com/technet Need more Information? SMS [ Your Name ] and the word “AppServer” to 41491
43. PowerPoint TemplateSubtitle color Example of a slide with a subhead Set the slide header to “Title Case” Set subheads in “sentence case” Generally set subhead to 36pt or smaller so it will fit on asingle line The subhead color is defined for this template but mustbe selected
44. Sample Fill Sample Fill PowerPoint Guidelines Font, size, and color for text have been formatted for you in the Slide Master Use the color palette shown below Hyperlink color: www.microsoft.com Sample Fill Sample Fill Sample Fill Sample Fill
45. Slide for Showing Software Code Use this layout to show software code The font is Consolas, a monospace font The slide doesn’t use bullets but levels can be indented using the “Increase List Level” icon on the Home menu To use straight quotes " instead of smart quotes ”, do this: Click on the Office Button in the upper left corner At the bottom of the menu, choose PowerPoint Options From the left pane, select Proofing Click on the AutoCorrect Options button Select the AutoFormat As You Type tab, and deselect “Straight quotes” with “smart quotes”. Then Click OK.