Client-server caching and object storesClient-server database designOverviewClient-server systemsNetworks of workstationsNaive client-server data accessClient-server cachingCaching principlesCaching in distributed file systemsDisadvantages of cachingClient-server caching revisitedDividing the workWhy cache data?Database client cachingThe downsideCaching in EXODUSAlternatives for cachingWhat to do on writeback?What to do on writeback?A taxonomy of strategiesOptimistic 2PLCallback lockingExperimentsHOTCOLD workload, slow networkFEED workload, slow networkHICON workload, fast networkSummaryQuickStore: a high-performance mapped object storeObject-oriented versus object-relational DBsThe programming interfaceDesign alternativesQuickStore structureFine points of pointer swizzlingPage faultsQuickStore page faultsThe mapping procedureThe ESM buffer managerOptimisationsHardware versus software swizzlingComparison: the OO7 benchmarkCold times, small databaseHot times, small databaseCold times, medium databaseQuickStore and E comparedClient-server caching and object storesBenjamin [email protected] cachingClient-server database designLow-level considerationsHow can database systems exploit powerful client machines?What implementation techniques are required?High-level considerationsWhat interface is provided to applications?How can we efficiently implement it?3Client-server cachingOverviewClient-server systemsAdvantages of caching Object-oriented databasesWisconsin's Exodus storage managerCache consistency and transactionsImplementation of programming interface: QuickStore4Client-server cachingClient-server systemsSimplify the client machinesShare services: filesystem, database, ...Run on powerful, dedicated hostsUser machines are "clients" of serversenables data sharingcentralised maintenancegreater securitye.g. Sun’s Network File System5Client-server cachingNetworks of workstationsc. 1990: more powerful clientsMove some processing to clientsfaster response timebetter utilisation of client machinesless load on servergreater scalabilityautonomy in the face of server failure6Client-server cachingNaive client-server data access..."read blue object""read blue object"7Client-server cachingClient-server caching..."read blue object""read blue object"8Client-server cachingCaching principlesAnalogous to hardware cachingServer stores the canonical copy of dataClient caches the results of each readSubsequent accesses served from cacheWhat if the data changes? Alternatives:"cheap to detect incorrect data", e.g. DNS"validate before use""notify on change"9Client-server cachingCaching in distributed file systemsCMU's Andrew File Systemclients cache all files on local disks50 client machines for each serverUC Berkeley's Sprite OSfile cache completes with virtual memoryCoda follow-up to AFS, UCLA's Ficusclient can completely disconnect from serverprediction algorithms to determine what to cache10Client-server cachingDisadvantages of cachingIncreases client workload, complexityWe may cache the wrong data!potentially wasted network trafficuses valuable space in the cacheData consistency problemstale cached datasimultaneous writebackClient-server caching revisitedMichael J. Franklin and Michael J. Carey12Client-server cachingDividing the workQuery shippingclients send queries to the serverData shippingclients request data from servertransactions run locallypotential for caching13Client-server cachingWhy cache data?A client may read a data object repeatedlyread and write an objectexecute multiple transactions on an objectCache an object and execute transactions locallyWrite back final value on commit14Client-server cachingDatabase client cachingclient serverbegin transactionread Awrite Aend transactioncache Astore Abegin transactionread A...read B15Client-server cachingThe downsideIntroduces a consistency problemIncreases work at client Slower under some conditionsPotentially higher abort rates ......16Client-server cachingCaching in EXODUSSmall objects are grouped in fixed-size disk pagesCaching and locking at the page levelClient has buffer manager, lock managerFranklin+Livny investigate the best strategy for caching with transactions17Client-server cachingAlternatives for cachingIntra-transaction versus inter-transaction cachingCaching locks as well as dataLocal versus global lockingOptimistic versus centralised lockingInvalidation versus propagation of updates18Client-server cachingWhat to do on writeback?begin transaction...fetch blue object19Client-server cachingWhat to do on writeback? commit transaction?propagate or invalidate?20Client-server cachingA taxonomy of strategiesPrimary-copy server 2PLCaching 2PLno lock caching, validate data before useOptimistic 2PL variantsO2PL-Dynamic, O2PL-New DynamicCallback locking21Client-server cachingOptimistic 2PLDuring transaction acquire local locksAt commit, validate with serverPropagation variant requires 2PCDynamic variant's propagation heuristicpage is resident at receiving siteaccessed since last propagation of pagepreviously invalidated this page incorrectly22Client-server cachingCallback lockingGlobal locks required during transactionOn lock conflict, server callback to revoke other locksNo validation required on commitCB-Read: cache only read locksCB-All: cache write locks as well, lock downgrade on conflict23Client-server cachingExperimentsVary data access patternsVary bottlenecks in the system24Client-server cachingHOTCOLD workload, slow network25Client-server cachingFEED workload,slow network26Client-server cachingHICON workload,fast network27Client-server cachingSummaryCB-Read, O2PL-ND come out bestCB-Read implemented in EXODUSlower abort rate than O2PL-NDscales better with data contentionNatural consequences of the optimistic approach?QuickStore: a high-performance mapped object storeSeth J. White and David J. DeWitt29Client-server cachingObject-oriented versus object-relational DBsDistributed application supportPersistent store for program dataAccess through programming language (C++), not SQLTransactions over objects30Client-server cachingThe programming interfaceApplication manipulates object identifiers
View Full Document