Top Banner
virtual techdays INDIA 22-24 November 2010 AppFabric Cache Jatin Kakkar Sr. Program Manager, AppFabric
19

Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

Jan 05, 2016

Download

Documents

Reynard Ray
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 22-24 November 2010

AppFabric Cache

Jatin Kakkar │ Sr. Program Manager, AppFabric

Page 2: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

Overview of AppFabric Cache The Problem To the rescue -- App Fabric Cache Cache Overview Cache availability and Roadmap

Programming Cache API Sample Demo –

Provisioning on Azure Cache API Sample on Azure Cache in Session state:: On-prem and Azure

virtual techdaysINDIA │ 18-20 august 2010

S E S S I O N A G E N D A

Page 5: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Cache to the rescue

Cache described

Unified Cache View

• An explicit, distributed, in-memory application cache for all kinds of data – (CLR objects, rows, XML, Binary data etc.)– Fuse "memory" across machines into a unified cache Caching clients can be

across machines or processes

Clients Access the Cache as if it was a large single

cache

Cache Layer distributes data across the various

cache nodes

Page 7: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Why use AppFabric Caching?

1. Share Data Across ApplicationsNo more sticky routing2. Performance Oper Throughput Latency Bulk Fetch

Read 28, 000/ sec (2k) 1-2ms 200k/sec (512 bytes)

Write 20,000 / sec (2k) 3 ms -

Operation Servers Throughput

Read 2k 1 28,000 ops/ sec

Read 2k 2 52, 500 ops/ sec

Read 2k 3 78, 000 ops/ sec

3. Scale out by adding more boxes

4. High Availability Protect from Web & Cache Server Failure

Page 8: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Cache Overview

Key features High Availability Expiry/Cache Invalidation Notifications Local Cache Named Regions/Tag based search Locks

Optimistic/Pessimistic Concurrency Model

Bulk Fetch

Cache Features

Page 9: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

• Host– Physical processes hosting AppFabric Caching

instance.• Named Caches

– Can span across machines

• Cache Item– Key, Payload (Object ), Tags, TTL, Timestamps, Version

• Regions– Physically co-located Container of Cache Items– May be implicit or explicitly created

Regions Region A

Key Payload Tags Key Payload Tags 121 xxxx “Toy” “Child”

123 yyyy “Toy” “Chair”..

Machine -> Cache Host -> Named Caches -> Regions -> Cache Items -> Objects

Named Cache : Product Catalog

Named Cache : Electronics Inventory

AppFabric Caching Service

AppFabric Caching Service

AppFabric Caching Service

Cache Overview

Cache Logical Hierarchy

Page 11: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Cache availability and Roadmap

Cache is available both On-premise and on Cloud Windows AppFabric Cache

Availability on Windows Server platform V1.0 RTM’ed in mid 2010

Windows Azure AppFabric Cache CTP October 2010 Commercial launch in the first half of 2011

Based off the proven Windows Server AppFabric Caching capabilities Customers can simply request for cache on demand No overhead of cluster provisioning or management Ability to add/remove capacity as per prevailing conditions Comes with ASP.NET session state and page output caching provider

Page 12: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

Overview of AppFabric Cache The Problem To the rescue App Fabric Cache Cache Overview Cache availability and Roadmap

Programming Cache API Sample Demo –

Provisioning on Azure Cache API Sample on Azure Cache in Session state:: On-prem and Azure

virtual techdaysINDIA │ 18-20 august 2010

S E S S I O N A G E N D A

Page 13: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Cache API

// Create instance of cachefactory (reads appconfig)DataCacheFactory fac = new DataCacheFactory();

// Get a named cache from the factoryDataCache catalog = fac.GetCache(“default");

// Simple Get/Putcatalog.Put("toy-101", new Toy("Puzzle", .,.));

// From the same or a different clientToy toyObj = (Toy)catalog.Get("toy-101");

<hosts> <host name="BL1CDB8083714“ cachePort="22233" cacheHostName="DistributedCacheService"/> ….. </hosts> <localCache isEnabled=“true" ../><security … />

Typical flow

Page 14: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

Cache API

Cache Aside (Explicit Caching)// Read from CacheToy toyObj = (Toy) catalog.Get("toy-101");

Application

Cach

ing

Serv

ice

Database

// If Not present in the cacheif (toyObj == null){ // Read from backend.. toyObj = ReadFromDatabase(); // Populate Cache catalog.Put("toy-101", toyObj);

return toyObj;}

Caching Access Layer

Page 15: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

DEMO: Provisioning a cache on Azure

Jatin Kakkar │ Sr. Program Manager, AppFabric

Page 16: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

DEMO: Cache API Sample on Azure

Jatin Kakkar │ Sr. Program Manager, AppFabric

Page 17: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

DEMO: Cache as a session state provider:- On-prem and AzureJatin Kakkar │ Sr. Program Manager, AppFabric

Page 18: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysINDIA │ 18-20 august 2010

RESOURCES

Windows AppFabric Cache Download link -- Benefit/Details

Windows Azure AppFabric Cache CTP link -- https://portal.appfabriclabs.com/ Survey on Cache Service in Azure --

Feedback and Discussion AppFabric Forum link --

Page 19: Virtual techdays INDIA │ 22-24 November 2010 AppFabric Cache Jatin Kakkar │ Sr. Program Manager, AppFabric.

virtual techdaysTHANKS│18-20 august 2010

[email protected]