SlideShare a Scribd company logo
Scale Your Data Tier with Windows Server AppFabricChris Dufour, ASP MVPSoftware Architect, Compuwarechris.dufour@wigets.net
Agenda
SimpleDo the simplest thing that will possibly work
ScalabilityAble to support the required quality of service as the system load increases-Wiktionary
Typical Web Architecture
Web ExplosionWeb Site’s too slow!!Where did my shopping cart go?IIS/ASP.NETIIS/ASP.NETIIS/ASP.NET Application Application ApplicationServers are crashingDatabaseDatabase is hot!!Services are slow
Agenda
Data Near ProcessingCacheCacheBrowserSmart ClientCacheWeb ServiceCacheASP.NETCacheDatabase
Good but…Cache is scoped to machine  / processMachines dieProcesses recycleCache memory is limited
What if?You could have as much cache as you wanted?You could share a giant cache across servers, services and even clients?What if this was something you could simply add to the platform for 1free?1Some features may require certain editions of Windows Server
Windows Server AppFabricAppFabricCACHINGWORKFLOW HOSTINGSERVICE HOSTINGMONITORINGSCALE OUTHIGH AVAILABILITY MANAGEMENT
Unified Cache ViewWhat is AppFabric Caching?An explicit, distributed, in-memory application cache for all kinds of data Caching clients can be across machines or processesClients Access the Cache as if it was a large single cacheCache Layer distributes data across the various cache nodes
AppFabric Cache
Data Distribution - Partitioned Cache…Web TierASP.Net AppASP.Net AppASP.Net AppCaching ClientCaching ClientCaching ClientGHIDEFABCCache  ServiceCache  ServiceCache TierCache  ServiceEGBDHAICFScale on Data SizeMore machines => More memory to cacheScale on Cache ThroughputMore machines => keys distributed across more machines => better throughput
Scale Test OutputLoad1 Cache ServerAs load increases, throughput fails to scale latency increasesCaching TierThroughputLatency
Add a Second Cache ServerLoadLoad MaxThroughput increasesLatency decreasesCaching TierThroughputLatency
Add a Second Cache ServerLoadCaching TierThroughputLatency
Associated PressCaches metadata and newsServes 16 million hits per dayIncreased the amount of cached data 6 times.
System.Web.Cache
AppFabricDataCache
Copy Client DLLsUpdate Web.config….NET 3.5 SP1 OR .NET 4<hosts>      <host name="BL1CDB8083714“cachePort="22233" cacheHostName="DistributedCacheService"/>     …..   </hosts> <localCacheisEnabled=“true"  ../><security … /> Application Application ApplicationCaching Access LayerCaching Access LayerCaching Access Layer.NET 4Install AppFabricConfigure AppFabricCaching ServiceCaching  ServiceCaching  ServiceConfiguration Store Deployment
Usage Pattern – Cache Aside  (Explicit Caching)//  Read from CacheToy toyObj = (Toy)catalog.Get("toy-101"); ApplicationCaching Access Layer// If Not present in the cacheif (toyObj == null){   // Read from backend..   toyObj = ReadFromDatabase();   // Populate Cachecatalog.Put("toy-101", toyObj);    return toyObj;}Caching ServiceDatabase
AdministrationPowerShell cmdlets are used to administer the cache cluster	Rich set of cmdlets for Cache cluster managementCache creation and monitoring
Hello AppFabric Cache
Using PowerShellRemember – PowerShell can also be called from .NET Code!
SecurityDomain Based Security OptionDomain Account / Local Account based AuthenticationOnly authorized servers can join the clusterOnly authorized clients can connect to the clusterTransport Level SecurityTurn on/off Signing or EncryptionCan turn off Cache SecurityUse Firewalls, IPSec,  VLANs to protect cachegrant-cacheallowedclientaccount  RedDomain\Machine1$  grant-cacheallowedclientaccount  RedDomain\John
Logical HierarchyAppFabric Caching ServiceAppFabric Caching ServiceAppFabric Caching ServiceAppFabric Caching ServiceNamed Cache :                    Product CatalogNamed Cache :                    Electronics InventoryRegions Key   Payload     Tags     Region A121  xxxx    “Toy” “Child”123 yyyy   “Toy” “Chair”.. MachineHostPhysical processes hosting AppFabric Caching instance.Named CachesCan span across machinesDefined in the configuration fileRegionsPhysically co-located Container of Cache ItemsMay be implicit or explicitly createdCache ItemKey, Payload (Object ), Tags,  TTL, Timestamps, Version
AppFabric Caching API// Create instance of cachefactory (reads appconfig)DataCacheFactory fac = new DataCacheFactory();// Get a named cache from the factoryDataCache catalog = fac.GetCache("catalogcache");// Simple Get/Putcatalog.Put("toy-101", new Toy("Puzzle", .,.));// From the same or a different clientToy toyObj = (Toy)catalog.Get("toy-101");// Region based Get/Putcatalog.CreateRegion("toyRegion");// Both toy and toyparts are put in the same region catalog.Put("toy-101", new Toy( .,.), “toyRegion”);Catalog.Put("toypart-100", new ToyParts(…), “toyRegion”);Toy toyObj = (Toy)catalog.Get("toy-101“,"toyRegion");
Access APIs – Tagging ItemsTag hotItem  = new Tag("hotItem");catalog.Put("toy-101", new Toy("Puzzle"),new Tag[]{hotItem}, “toyRegion”);catalog.Put("toy-102", new Toy("Bridge"), “toyRegion”);// From the same or a different clientList<KeyValuePair<string, object>> toys = catalog.GetAnyMatchingTag("toyRegion", hotItem);
Types of DataGrocery Shop Web TierShopping CartGrocery InventoryDistributed Cache        Grocery  Catalog
Reference Data – PerformanceCatalog data doesn’t change oftenUnnecessary network cost to access from different machinesSolution – Local CacheApplicationApplicationGet(K2)Get(K2)Put(K2, v3)AppFabric Caching ClientAppFabric Caching ClientLocal CacheRoutingTableRouting TableCache2Cache3Cache1K2, V2K2, V2Primary for K1,V1Primary for K3,V3Primary for K2,V2K1, V1K2, V3K3, V3
Reference Data – Bulk GetBulk Fetch from region200-300k ops per secondFewer network callsCatalog.BulkGet( 	new List<string>(){“toy-101”, “toy-102”} ,      “toyRegion”);
Activity Data – Session IntegrationLoad Balance RequestsNo more sticky routing<sessionState  mode="Custom“ customProvider="SessionStoreProvider"><providers>    <add name="SessionStoreProvider"          type=“Microsoft.Data.Caching.DataCacheSessionStoreProvider,  ClientLibrary“ cacheName="<YourNamedCache>"/></providers></sessionState>Drop in AppFabric Caching SessionStoreProvider…Caching Access LayerCaching Access LayerSession State stored  in AppFabric CachingAllows session state to be shared amongst multiple applicationsScale your Session StoreDynamicallyCache  ServiceCaching  ServiceCaching  ServiceHighly Available Application Application ApplicationCaching Access Layer
ApplicationApplicationActivity Data - AvailabilityPUTGet(K2)AppFabric Caching ClientAppFabric Caching ClientRouting TableRouting TableCache1Cache2Cache3Primary forPrimary forPrimary for Replication AgentK3, V3K1, V1K2, V2(K2, V2)K2, V2Secondary forSecondary for Secondary forK2, V2K2, V2K3, V3K1, V1
Resource Data - Optimistic LockingGetCacheItem returns a version objectEvery update to an object internally increments it's versionSupply the version obtained along with the Put/RemovePut/Remove will succeed only if the passed in version matches the version in the cache Two clients access the same item Both update the itemSecond Client gets in first; put succeeds because item version matches; atomically increments the versionFirst client tries put;Fails because the versions don’t match
Resource Data - Pessimistic LockingClient1: GetAndLock ("k1")Client3: Get ("k1")Client2: GetAndLock ("k1")GetAndLock gets lock handleRegular Get succeeds Other GetAndLock on same item failsTake locks on non-existent keysAllows you to co-ordinate calls for dataK1
Data RaceGETGETGET
Lock Non-Existent KeyGET/LOCKGET/LOCKGET/LOCKCache  ServiceCache  ServiceCaching  Service
Composite RaceCALLWAITWAITCache  ServiceCache  ServiceCaching  Service
Composite RacePUTUNLOCKGETGETCache  ServiceCache  ServiceCaching  Service
Resource/Activity Data – Tracking ChangesCache Event notificationsRegister on any client to notify changesBatched NotificationsDataCache.RegisterCacheLevelCallback(int filter, DataCacheChangeCallback delegate); DataCache.RegisterRegionLevelCallback(      String region, int filter, DataCacheChangeCallback delegate); DataCache.RegisterKeyLevelCallback(      String region, String key, int filter, DataCacheChangeCallback delegate);
Register Notification for Key “K3"Call DelegateStore Last LSN ApplicationMap Keys to PartitionAppFabric Caching ClientPartition: P2Last LSN: 19Routing TablePoll Required NodesNodes Return List of Changes LSN OrderCache2Cache3Cache1K2, V2Primary forPrimary forPrimary forChange Log (Partition P2)Del  K32Del  K43Change LogPartition P1Add K2Del  K32Change Log33 Add K134 Del  K22K1, V1K3, V3Scalable Notifications
Agenda
Pre-FetchHospitalData Center
Pre-FetchRemote ClinicHospitalSlow!!Data CenterWAN
Pre-FetchHospitalRemote ClinicData CenterCache  ServiceWAN
Agenda
Web Platform Installer
Select Enterprise
Install AppFabric
Install AppFabric
endpoint.tv
AppFabric on MSDNhttp://msdn.microsoft.com/AppFabric

More Related Content

What's hot (18)

PDF
DataFX 8 (JavaOne 2014)
Hendrik Ebbers
 
PDF
$.get, a Prime on Data Fetching
Josh Black
 
PDF
JEE Programming - 07 EJB Programming
Danairat Thanabodithammachari
 
PDF
JEE Programming - 04 Java Servlets
Danairat Thanabodithammachari
 
PDF
WebSockets wiith Scala and Play! Framework
Fabio Tiriticco
 
PDF
Oracle OSB Tutorial 3
Rakesh Gujjarlapudi
 
PDF
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
PDF
Glassfish JEE Server Administration - Module 4 Load Balancer
Danairat Thanabodithammachari
 
PPTX
Connection Pooling
Wings Interactive
 
PPT
2310 b 15
Krazy Koder
 
PPT
Java Servlets
BG Java EE Course
 
PPTX
ASP.NET MVC 4 Request Pipeline Internals
Lukasz Lysik
 
PPTX
Weblogic12 c installation guide
Chinni Rajavardhan Reddy
 
PPTX
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
PPTX
Play framework : A Walkthrough
mitesh_sharma
 
PDF
Felix HTTP - Paving the road to the future
Marcel Offermans
 
PPT
Java 6 [Mustang] - Features and Enchantments
Pavel Kaminsky
 
PPT
Knowledge Sharing : Java Servlet
Fahmi Jafar
 
DataFX 8 (JavaOne 2014)
Hendrik Ebbers
 
$.get, a Prime on Data Fetching
Josh Black
 
JEE Programming - 07 EJB Programming
Danairat Thanabodithammachari
 
JEE Programming - 04 Java Servlets
Danairat Thanabodithammachari
 
WebSockets wiith Scala and Play! Framework
Fabio Tiriticco
 
Oracle OSB Tutorial 3
Rakesh Gujjarlapudi
 
Tips and Tricks For Faster Asp.NET and MVC Applications
Sarvesh Kushwaha
 
Glassfish JEE Server Administration - Module 4 Load Balancer
Danairat Thanabodithammachari
 
Connection Pooling
Wings Interactive
 
2310 b 15
Krazy Koder
 
Java Servlets
BG Java EE Course
 
ASP.NET MVC 4 Request Pipeline Internals
Lukasz Lysik
 
Weblogic12 c installation guide
Chinni Rajavardhan Reddy
 
Servletarchitecture,lifecycle,get,post
vamsi krishna
 
Play framework : A Walkthrough
mitesh_sharma
 
Felix HTTP - Paving the road to the future
Marcel Offermans
 
Java 6 [Mustang] - Features and Enchantments
Pavel Kaminsky
 
Knowledge Sharing : Java Servlet
Fahmi Jafar
 

Similar to Scale Your Data Tier With Windows Server App Fabric (20)

PPTX
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
Nuno Godinho
 
PPTX
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
 
PPTX
Windows Server AppFabric Caching - What it is & when you should use it?
Robert MacLean
 
PPTX
Scalable Resilient Web Services In .Net
Bala Subra
 
PPTX
Windows Server AppFabric Cache
Pradeep S
 
PDF
Introducing windows server_app_fabric
Marco Titta
 
PDF
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Impetus Technologies
 
PDF
The Need For Speed - NxtGen Cambridge
Phil Pursglove
 
PDF
Azure appfabric caching intro and tips
Sachin Sancheti - Microsoft Azure Architect
 
PDF
Velocity - Edge UG
Phil Pursglove
 
PPTX
Distributed Cache with dot microservices
Knoldus Inc.
 
PPT
Aspnet Caching
rainynovember12
 
PDF
The Need for Speed - EpiCenter 2010
Phil Pursglove
 
PDF
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
IrishDev.com
 
PPT
NCache 3.8 SP3
wesnoor
 
PDF
Distributed Caching Using Windows Azure AppFabric
YASH Technologies
 
PPTX
[Hanoi-August 13] Tech Talk on Caching Solutions
ITviec
 
PDF
The Need For Speed - NEBytes
Phil Pursglove
 
PPTX
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Matthew Groves
 
PPT
salkdjfhdjkghdfkjh
elodiaevie
 
TechDays 2010 Portugal - Scaling your data tier with app fabric 16x9
Nuno Godinho
 
Scale Your Data Tier with Windows Server AppFabric
Wim Van den Broeck
 
Windows Server AppFabric Caching - What it is & when you should use it?
Robert MacLean
 
Scalable Resilient Web Services In .Net
Bala Subra
 
Windows Server AppFabric Cache
Pradeep S
 
Introducing windows server_app_fabric
Marco Titta
 
Building High Performance and Scalable Applications Using AppFabric Cache- Im...
Impetus Technologies
 
The Need For Speed - NxtGen Cambridge
Phil Pursglove
 
Azure appfabric caching intro and tips
Sachin Sancheti - Microsoft Azure Architect
 
Velocity - Edge UG
Phil Pursglove
 
Distributed Cache with dot microservices
Knoldus Inc.
 
Aspnet Caching
rainynovember12
 
The Need for Speed - EpiCenter 2010
Phil Pursglove
 
Phil Pursglove: Velocity, the Need for Speed - epicenter 2010
IrishDev.com
 
NCache 3.8 SP3
wesnoor
 
Distributed Caching Using Windows Azure AppFabric
YASH Technologies
 
[Hanoi-August 13] Tech Talk on Caching Solutions
ITviec
 
The Need For Speed - NEBytes
Phil Pursglove
 
Cache Rules Everything Around Me - Momentum - October 2022.pptx
Matthew Groves
 
salkdjfhdjkghdfkjh
elodiaevie
 
Ad

More from Chris Dufour (11)

PPTX
Introduction to ASP.NET 5
Chris Dufour
 
PPTX
Developing Windows 10 Hosted Web Apps
Chris Dufour
 
PPTX
Developing windows 10 universal apps
Chris Dufour
 
PPTX
DevCamp - What can the cloud do for me
Chris Dufour
 
PPTX
Microsoft Azure Platform-as-a-Service (PaaS)
Chris Dufour
 
PPTX
Migrate an Existing Application to Microsoft Azure
Chris Dufour
 
PPTX
Whats new for developers in Visual Studio 2013
Chris Dufour
 
PPTX
Windows Azure Active Directory: Identity Management in the Cloud
Chris Dufour
 
PPTX
Asynchronous Programming in ASP.NET
Chris Dufour
 
PPT
Introduction to CSLA
Chris Dufour
 
PPTX
Implementing OData: Create a UG Event Feed
Chris Dufour
 
Introduction to ASP.NET 5
Chris Dufour
 
Developing Windows 10 Hosted Web Apps
Chris Dufour
 
Developing windows 10 universal apps
Chris Dufour
 
DevCamp - What can the cloud do for me
Chris Dufour
 
Microsoft Azure Platform-as-a-Service (PaaS)
Chris Dufour
 
Migrate an Existing Application to Microsoft Azure
Chris Dufour
 
Whats new for developers in Visual Studio 2013
Chris Dufour
 
Windows Azure Active Directory: Identity Management in the Cloud
Chris Dufour
 
Asynchronous Programming in ASP.NET
Chris Dufour
 
Introduction to CSLA
Chris Dufour
 
Implementing OData: Create a UG Event Feed
Chris Dufour
 
Ad

Scale Your Data Tier With Windows Server App Fabric

  • 1. Scale Your Data Tier with Windows Server AppFabricChris Dufour, ASP MVPSoftware Architect, [email protected]
  • 3. SimpleDo the simplest thing that will possibly work
  • 4. ScalabilityAble to support the required quality of service as the system load increases-Wiktionary
  • 6. Web ExplosionWeb Site’s too slow!!Where did my shopping cart go?IIS/ASP.NETIIS/ASP.NETIIS/ASP.NET Application Application ApplicationServers are crashingDatabaseDatabase is hot!!Services are slow
  • 8. Data Near ProcessingCacheCacheBrowserSmart ClientCacheWeb ServiceCacheASP.NETCacheDatabase
  • 9. Good but…Cache is scoped to machine / processMachines dieProcesses recycleCache memory is limited
  • 10. What if?You could have as much cache as you wanted?You could share a giant cache across servers, services and even clients?What if this was something you could simply add to the platform for 1free?1Some features may require certain editions of Windows Server
  • 11. Windows Server AppFabricAppFabricCACHINGWORKFLOW HOSTINGSERVICE HOSTINGMONITORINGSCALE OUTHIGH AVAILABILITY MANAGEMENT
  • 12. Unified Cache ViewWhat is AppFabric Caching?An explicit, distributed, in-memory application cache for all kinds of data Caching clients can be across machines or processesClients Access the Cache as if it was a large single cacheCache Layer distributes data across the various cache nodes
  • 14. Data Distribution - Partitioned Cache…Web TierASP.Net AppASP.Net AppASP.Net AppCaching ClientCaching ClientCaching ClientGHIDEFABCCache ServiceCache ServiceCache TierCache ServiceEGBDHAICFScale on Data SizeMore machines => More memory to cacheScale on Cache ThroughputMore machines => keys distributed across more machines => better throughput
  • 15. Scale Test OutputLoad1 Cache ServerAs load increases, throughput fails to scale latency increasesCaching TierThroughputLatency
  • 16. Add a Second Cache ServerLoadLoad MaxThroughput increasesLatency decreasesCaching TierThroughputLatency
  • 17. Add a Second Cache ServerLoadCaching TierThroughputLatency
  • 18. Associated PressCaches metadata and newsServes 16 million hits per dayIncreased the amount of cached data 6 times.
  • 21. Copy Client DLLsUpdate Web.config….NET 3.5 SP1 OR .NET 4<hosts> <host name="BL1CDB8083714“cachePort="22233" cacheHostName="DistributedCacheService"/> ….. </hosts> <localCacheisEnabled=“true" ../><security … /> Application Application ApplicationCaching Access LayerCaching Access LayerCaching Access Layer.NET 4Install AppFabricConfigure AppFabricCaching ServiceCaching ServiceCaching ServiceConfiguration Store Deployment
  • 22. Usage Pattern – Cache Aside (Explicit Caching)// Read from CacheToy toyObj = (Toy)catalog.Get("toy-101"); ApplicationCaching Access Layer// If Not present in the cacheif (toyObj == null){ // Read from backend.. toyObj = ReadFromDatabase(); // Populate Cachecatalog.Put("toy-101", toyObj); return toyObj;}Caching ServiceDatabase
  • 23. AdministrationPowerShell cmdlets are used to administer the cache cluster Rich set of cmdlets for Cache cluster managementCache creation and monitoring
  • 25. Using PowerShellRemember – PowerShell can also be called from .NET Code!
  • 26. SecurityDomain Based Security OptionDomain Account / Local Account based AuthenticationOnly authorized servers can join the clusterOnly authorized clients can connect to the clusterTransport Level SecurityTurn on/off Signing or EncryptionCan turn off Cache SecurityUse Firewalls, IPSec, VLANs to protect cachegrant-cacheallowedclientaccount  RedDomain\Machine1$ grant-cacheallowedclientaccount  RedDomain\John
  • 27. Logical HierarchyAppFabric Caching ServiceAppFabric Caching ServiceAppFabric Caching ServiceAppFabric Caching ServiceNamed Cache : Product CatalogNamed Cache : Electronics InventoryRegions Key Payload Tags Region A121 xxxx “Toy” “Child”123 yyyy “Toy” “Chair”.. MachineHostPhysical processes hosting AppFabric Caching instance.Named CachesCan span across machinesDefined in the configuration fileRegionsPhysically co-located Container of Cache ItemsMay be implicit or explicitly createdCache ItemKey, Payload (Object ), Tags, TTL, Timestamps, Version
  • 28. AppFabric Caching API// Create instance of cachefactory (reads appconfig)DataCacheFactory fac = new DataCacheFactory();// Get a named cache from the factoryDataCache catalog = fac.GetCache("catalogcache");// Simple Get/Putcatalog.Put("toy-101", new Toy("Puzzle", .,.));// From the same or a different clientToy toyObj = (Toy)catalog.Get("toy-101");// Region based Get/Putcatalog.CreateRegion("toyRegion");// Both toy and toyparts are put in the same region catalog.Put("toy-101", new Toy( .,.), “toyRegion”);Catalog.Put("toypart-100", new ToyParts(…), “toyRegion”);Toy toyObj = (Toy)catalog.Get("toy-101“,"toyRegion");
  • 29. Access APIs – Tagging ItemsTag hotItem = new Tag("hotItem");catalog.Put("toy-101", new Toy("Puzzle"),new Tag[]{hotItem}, “toyRegion”);catalog.Put("toy-102", new Toy("Bridge"), “toyRegion”);// From the same or a different clientList<KeyValuePair<string, object>> toys = catalog.GetAnyMatchingTag("toyRegion", hotItem);
  • 30. Types of DataGrocery Shop Web TierShopping CartGrocery InventoryDistributed Cache Grocery Catalog
  • 31. Reference Data – PerformanceCatalog data doesn’t change oftenUnnecessary network cost to access from different machinesSolution – Local CacheApplicationApplicationGet(K2)Get(K2)Put(K2, v3)AppFabric Caching ClientAppFabric Caching ClientLocal CacheRoutingTableRouting TableCache2Cache3Cache1K2, V2K2, V2Primary for K1,V1Primary for K3,V3Primary for K2,V2K1, V1K2, V3K3, V3
  • 32. Reference Data – Bulk GetBulk Fetch from region200-300k ops per secondFewer network callsCatalog.BulkGet( new List<string>(){“toy-101”, “toy-102”} , “toyRegion”);
  • 33. Activity Data – Session IntegrationLoad Balance RequestsNo more sticky routing<sessionState mode="Custom“ customProvider="SessionStoreProvider"><providers> <add name="SessionStoreProvider" type=“Microsoft.Data.Caching.DataCacheSessionStoreProvider, ClientLibrary“ cacheName="<YourNamedCache>"/></providers></sessionState>Drop in AppFabric Caching SessionStoreProvider…Caching Access LayerCaching Access LayerSession State stored in AppFabric CachingAllows session state to be shared amongst multiple applicationsScale your Session StoreDynamicallyCache ServiceCaching ServiceCaching ServiceHighly Available Application Application ApplicationCaching Access Layer
  • 34. ApplicationApplicationActivity Data - AvailabilityPUTGet(K2)AppFabric Caching ClientAppFabric Caching ClientRouting TableRouting TableCache1Cache2Cache3Primary forPrimary forPrimary for Replication AgentK3, V3K1, V1K2, V2(K2, V2)K2, V2Secondary forSecondary for Secondary forK2, V2K2, V2K3, V3K1, V1
  • 35. Resource Data - Optimistic LockingGetCacheItem returns a version objectEvery update to an object internally increments it's versionSupply the version obtained along with the Put/RemovePut/Remove will succeed only if the passed in version matches the version in the cache Two clients access the same item Both update the itemSecond Client gets in first; put succeeds because item version matches; atomically increments the versionFirst client tries put;Fails because the versions don’t match
  • 36. Resource Data - Pessimistic LockingClient1: GetAndLock ("k1")Client3: Get ("k1")Client2: GetAndLock ("k1")GetAndLock gets lock handleRegular Get succeeds Other GetAndLock on same item failsTake locks on non-existent keysAllows you to co-ordinate calls for dataK1
  • 38. Lock Non-Existent KeyGET/LOCKGET/LOCKGET/LOCKCache ServiceCache ServiceCaching Service
  • 39. Composite RaceCALLWAITWAITCache ServiceCache ServiceCaching Service
  • 40. Composite RacePUTUNLOCKGETGETCache ServiceCache ServiceCaching Service
  • 41. Resource/Activity Data – Tracking ChangesCache Event notificationsRegister on any client to notify changesBatched NotificationsDataCache.RegisterCacheLevelCallback(int filter, DataCacheChangeCallback delegate); DataCache.RegisterRegionLevelCallback( String region, int filter, DataCacheChangeCallback delegate); DataCache.RegisterKeyLevelCallback( String region, String key, int filter, DataCacheChangeCallback delegate);
  • 42. Register Notification for Key “K3"Call DelegateStore Last LSN ApplicationMap Keys to PartitionAppFabric Caching ClientPartition: P2Last LSN: 19Routing TablePoll Required NodesNodes Return List of Changes LSN OrderCache2Cache3Cache1K2, V2Primary forPrimary forPrimary forChange Log (Partition P2)Del K32Del K43Change LogPartition P1Add K2Del K32Change Log33 Add K134 Del K22K1, V1K3, V3Scalable Notifications
  • 54. Thanks to our contributors

Editor's Notes

  • #12: In the future we will be bringing these capabilities to the cloud and bringing some of the cloud capabilities such as service bus and access control to the on-premise server solution as well.