Velocity - NxtGen Oxford

481 views

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
481
On SlideShare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
3
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Velocity - NxtGen Oxford

  1. 1. The Need For Speed A Developer’s Guide to Velocity Phil Pursglove phil@philippursglove.com http://diaryofadotnetdeveloper.blogspot.com http://www.philippursglove.com/Velocity http://twitter.com/philpursglove
  2. 2. About Me • Senior .NET Developer • MBCS • MCSD • VBUG East Anglia Co-ordinator • Written for VB Developer and SQL Server Pro
  3. 3. Agenda • What is Velocity? • Why a Distributed Cache? • Configuring a client • Configuring a server • Managing a cache • Concurrency • High availability / load balancing
  4. 4. What is Velocity? • A distributed cache – One logical cache shared across a number of servers – Already being used by MSDN Forums – A session state provider – In .NET 4.0, a cache provider • CTP3 released April 2009 – CTP4 coming September 2009 – V1 coming who knows when? Q1 2010?
  5. 5. Why a Distributed Cache? • ASP.NET already has a cache – In .NET 4.0 it’s moving to System.Data.Cache • Enterprise Library has a Caching block • Caching is per-server
  6. 6. What Data Can I Cache In Velocity • Any .NET object – Reference Data • e.g. Product categories – Activity Data • e.g. Shopping Cart – Resource Data • e.g. Stock data
  7. 7. Configuring the Velocity Server
  8. 8. Configuring the Velocity Client • Four(!) assembly references to add: – CacheBaseLibrary.dll – CASBase.dll – ClientLibrary.dll – FabricCommon.dll • Cache hosts can be hard-coded or in web.config/app.config
  9. 9. Using Velocity • Add/Remove • Concurrency – Optimistic – Pessimistic • Regions – Tie a group of cached objects to a specific node – But adds extra options (Tags) for retrieving the object
  10. 10. Managing A Velocity Cluster • Powershell integration – Can start/stop cache hosts in a cluster – Create new caches • But not regions
  11. 11. What Should I Use It For Now? • Session state only – Lack of support for dependencies means it is not ready for other uses
  12. 12. Velocity vNext • Read-from/write-through • Dependencies • Support for output caching
  13. 13. Summary • Velocity is going to be great … in v2 • v1 is worth looking at as a session state provider – The end of sticky load-balancing
  14. 14. Questions? phil@philippursglove.com http://diaryofadotnetdeveloper.blogspot.com http://www.philippursglove.com/Velocity http://twitter.com/philpursglove
  15. 15. References • Velocity team blog – http://blogs.msdn.com/velocity • TechEd videos – http://tinyurl.com/velocityteched • Mix 09 video – http://tinyurl.com/velocitymixvideo • ARCCast Video – http://tinyurl.com/velocityscotthavideo • ScottHa on Velocity – http://tinyurl.com/velocityhanselminutes • Velocity coverage on StackOverflow (beware, here be Java!) – http://tinyurl.com/velocitystackoverflow • Other .NET distributed caches – NCache - http://tinyurl.com/ncache – Memcached - http://tinyurl.com/smoe

×