AnArchitectureforConsumer-OrientedOnlineDatabaseServices. chargesonaverage$0.08perdatamessagetoorfrom. thesizeofthemessage),anddatabroadcastingcorp.



Similar documents
n n n n Doctor Patient Nurse / Clerk

''Get to know the ECOWAS''

NSD ERP - Integrated Solutions NSD ERP SYSTEM. Flow chart. Copyright 2009 NSD, All rights reserved

Who needs an ERP system anyway? Nitin Kale Information Technology Program, VSoE Spring 2013

AirWatch Education Pricing. Effective January 1 st, 2012 Expires March 31 st, 2012

HOW TO... Use Lump Sum Billing Items

Springpath Data Platform with Cisco UCS Servers

SAP ONLINE COURSES ARGUMENTS

Orange County Convention Center Orlando, Florida June 3-5, Architecturing the cloud for your SAP landscape Florian Stilkerich

Enhanced Vessel Traffic Management System Booking Slots Available and Vessels Booked per Day From 12-JAN-2016 To 30-JUN-2017

Implementing and Maintaining Microsoft SQL Server 2005 Reporting Services COURSE OVERVIEW AUDIENCE OUTLINE OBJECTIVES PREREQUISITES

FIS InfoHub. K.S. Bhaskar Fidelity National Information Services, Inc. and its subsidiaries.

Networking Basics for Automation Engineers

Computers and Media: P2P and Business Models CSCI 1200 COMPUTERS & MEDIA, JAREK SZLICHTA

Cormant-CS System Requirements

2016 TRAINING CALENDAR

Preparing Your Business for Magento 2.0

Cisco SmartPlay Select. Cisco Global Data Center Promotional Program

The Path to the Cloud

Hadoop Optimizations for BigData Analytics

Enterprise-Wide Information Systems in the Modern Organization

On Demand SAP Support Services Overview

A Comparative Study of Load Balancing Algorithms in Cloud Computing

Vision & Mission PURPOSE VISION MISSION

Adjustment Manual Performance Test

Systems for Personal Data Storage Services

An IT executive with over 25 years in the field A few companies I have worked for:

E-Appointment Scheduling (EAS)

BDS / B. V. Sc & AH degree recognized by DCI / VCI with 5 years R&D / teaching experience in the relevant subject after BDS / B. V. Sc degree.

Business Administration Prof. Dr. J. Nonhoff. Content. Business Administration Prof. Dr. J. Nonhoff. Introduction ERP Vendors/ Architecture SAP

UCS Network Utilization Monitoring: Configuration and Best Practice

ISOM4740 Enterprise Resource Management Winter 2012

Proceedings of the 11th Annual Conference of Asia Pacific Decision Sciences Institute Hong Kong, June 14-18, 2006, pp

Americas' SAP Users' Group

SD Elements: A Tool for Secure Application Development Management

IoT Analytics for smart Health and Care

Oracle Linux Support and Oracle VM Support Global Price List

Section 1: Pre-requisites (This is a mandatory Section. Do not proceed without completing it)

Large-Scale IP Traceback in High-Speed Internet

Microsoft Implementing Microsoft Azure Infrastructure Solutions

NSD Business Controlling System NSD BCS 4.01

OpenNCP MRO Service Design and Engineering details

Handshake & endpoints

Computing Service Provision in P2P Clouds

IBM: Using Queue Replication

Troubleshooting for Yamaha router

Integrating ERP Project System into IS Project Management Curriculum

ERP Implementation failure at HP. Presented by: DINESH SHRISHRIMAL

CTERA Cloud Care. Support Services. Mar Version , CTERA Networks. All rights reserved.

CLOUD ARCHITECTURE DIAGRAMS AND DEFINITIONS

This course will also teach how to create various kinds of dashboards using Reporting Services.

CSE 544 Principles of Database Management Systems. Magdalena Balazinska (magda) Spring 2006 Lecture 1 - Class Introduction

HOW TO SETUP YOUR OWN CLOUD SERVER PDF

IBM Archiving Solutions for SAP

PROJECT Domeny.tv Domeny.tv

CA Data Center Infrastructure Management r4.3: Administration Bundle

MDM and SOA Timo Itälä T

M.P. Shah Government Medical College Jamnagar Walk - In Interview for I.C.M.R. Project On 10 / 04 / 2015

How To Deploy Office 2016 With Office 2016 Deployment Tool

ARM mbed IoT Device Platform. November 3 rd, 2014

Dynamic Thread Pool based Service Tracking Manager

ERP Systems. Generic ERP system. Categories of ERP systems. December 4, 2014

BUS319: Introduction to Enterprise Resource Planning

unified communications sourcing Making the right choice between on-premise, managed service, cloud and hybrid

Patient Satisfaction Survey Results 2011

Citrix XenApp-7.6 Administration Training. Course

8/25/2008. Chapter Objectives PART 3. Concepts in Enterprise Resource Planning 2 nd Edition

Tuition Reimbursement Program. Handbook

Index Terms Cloud Storage Services, data integrity, dependable distributed storage, data dynamics, Cloud Computing.

SOLVING LOAD REBALANCING FOR DISTRIBUTED FILE SYSTEM IN CLOUD

An Object Oriented Role-based Access Control Model for Secure Domain Environments

Deploying and Managing Windows 10 Using Enterprise Services

How to Setup SQL Server Replication

Scope. Cognescent SBI Semantic Business Intelligence

Cloud & Datacenter Monitoring with System Center Operations Manager

Do You See What I See (DYSWIS)

MSC Malaysia MyProCert SRI 2015 List of Certifications

Computer Visions Course Outline

ANDROID DEVELOPER RESUME USA

Automated Performance Testing and Analysis. Armin Pruessner GAMS Development Corporation

DBTech Pro Workshop. Knowledge Discovery from Databases (KDD) Including Data Warehousing and Data Mining. Georgios Evangelidis

Digital Mobile Radio Demystified. By Don Trynor, VA3XFT November 27, 2014

Transcription:

AnArchitectureforConsumer-OrientedOnlineDatabaseServices PrasadSistlay,OuriWolfsony,SonDaoz,KailashNarayanany,RamyaRajy Abstract Inthispaperweintroduceanarchitectureforonline databaseservicesorientedtowardsconsumers.we identifytwotypesofcosts accesscostandcommunicationcost.wedemonstratethatdynamicallocation ofdatacanminimizethesecosts.wedosobypresentingecientalgorithmsbasedondynamicallocation; thesealgorithmsoptimizeaccessandcommunication costsforvariouscostmodels,accesspatterns,andretrievalprotocols. 1Introduction Wearewitnessingtheemergenceofanewformofcomputing/communicationenvironment,calledconsumer (asopposedtobusiness)computing.insuchanenvironment,tensofmillionsofconsumerswillcarry portablecomputersequippedwithwirelessdatacommunicatorsthatenableaccesstoalargenumberof databases,digitallibraries,andotheronlineservices. Thepotentialmarketforthisactivityisestimatedto bebillionsofdollarsannually.forexample,passengerswillaccessairlineandothercarriersschedules, aswellasweatherinformation.investorswillaccess pricesofnancialinstruments,salespeoplewillaccess priceandinventorydata,routeplanningcomputersin carswillaccesstracinformation,andcallerswillaccesslocationdependentdata(e.g.whereisthenearest doctor[1]). Therewillbetwotypesofchargesincurredinthis information-at-your-ngertipsenvironment,namely accessandcommunicationcharges.accesscharges willbepaidtotheinformationprovider,andcommunicationchargeswillbepaidtothenetworkprovider. thisresearchwassupportedinpartbynsfgrantnumbersiri-9408750andiri-9224605,andafosrgrantnumber F49620-93-1-0059. yelectricalengineeringandcomputersciencedepartment, UniversityofIllinois,Chicago,Illinois60607 zhughesresearchlaboratories,informationscienceslaboratory,malibu,ca Forexample,currentlyRAMMobileDataCorp. chargesonaverage$0.08perdatamessagetoorfrom themobilecomputer(theactualchargedependson thesizeofthemessage),anddatabroadcastingcorp. chargesforprovidingthepricesofnancialinstruments.similarly,thesetwotypesofchargesareincurredtodayinvoicecommunication,whencalling900 numbers. Webelievethatthesechargeswillbethedriving forcethatdeterminestheoverallsystemarchitecture, andtheavailableaccessmodesandprotocols.both typesofchargescanbeoptimizedbythedynamicallocationprinciple.thisprinciplestatesthatwhena customerreadsadata-itemmorefrequentlythanthe dataitemisupdated,thentheamountofdatatransfersisminimizedifthecustomerhasasubscriptionto receiveallthechangestothedataitem;andviceversa, whenacustomerreadsadata-itemlessfrequently thanthedataitemisupdated,thentheamountof datatransfersisminimizedifthecustomerdemands thedataitemfromtheonlineserverateachaccess. Inotherwords,acopyofthedataitemshouldbedynamicallyallocatedanddeallocatedatthecustomer's computer,dependingonthefrequencyofcustomerreadscomparedtothefrequencyofdata-item-writes. Thewayinwhichthisprinciplecanbeapplieddependsontheaccessandcommunicationcoststructures,thetypeofknowledgeabouttheaccesspattern totheonlineservice,andtheretrievalprotocolsthat areused.forexample,ifadatatransferon-demandis twiceasexpensiveasadatatransferbysubscription, thencostisoptimizedifasecondcopyofthedataitem iscreatedwhenthenumberofreadsismorethanhalf thenumberofwrites. Inthispaperwedemonstratetheapplicationofthe dynamicallocationprincipleforcostoptimization.we dosoinanarchitecturewepropose,andforseveral typesofaccesspatterns,costmodels,andretrieval protocols.althoughthearchitectureandthecost modelsseemreasonabletous,werealizethatcurrently

theindustryisinitsinfancy,andthewaythesefactorswillevolvedependsoncompetitivemarketforces andtechnologicaladvancesthatarehardtopredict atthispointintime.however,webelievethatthe principlecanbeappliedinmanyotherscenariosthat willemerge. Weconsiderthefollowingretrievalprotocols.Assumethatacustomeraccessesthepricesofaportfolio ofstocks.theaccesscanusethesubscriptionprotocol,inwhichthecustomerreceiveseveryupdatetoa portfolio-stockprice,ortheon-demandprotocol,in whichthecustomerrequeststheportfoliopriceswhen needed.theon-demandprotocolmayhaveacache- Invalidationoption,inwhich,followingatransferof thedata-itemtothecustomer,theserverinformsthe customerwhentherstupdatetothedata-itemoccurs,withoutprovidingthenewvalue.thesubscriptionprotocolmaybeparameterizedfordivergence,allowingselectivetransmissionofupdates;forexample, thecustomermayrequestarefreshonlywhenhis/her copydivergesfromthemostup-to-datecopyby3updates,or3%,or3minutes(see[2,3,4]). Weenvisionthatthecustomerwilluseoneofthese retrievalprotocols,andtheonethatoptimizesthe accesscostdependsontwofactors:theaccesscost model,andtheaccesspatterntype.furthermore,the usermaybeabletochangetheretrievalprotocolas theaccesspatternchanges.forexample,theusermay retrievebysubscriptionbetween9amand10am,and on-demandbetween10amand11am. Foroptimizingthecommunicationcost,theretrievalprotocolmayalsobeabletomakeuseof thebroadcastoption.specically,theinformation providermaybeabletochoosewhethertobroadcast aparticularupdateitreceives,ortotransmititina point-to-pointfashiontooneormorecustomers.obviously,whenbroadcastinginformationthatinvolves anaccesscost,thedatawillhavetobeencrypted,so thatonlytheownersofadecryptionkeywillbeable todecipherit. Thecostmodelmaybetime-basedorrequestbased,andthecustomermayhaveachoicebetween thetwo.inatime-basedmodel,thereisaatfeeper timeperiod,e.g.amonth.thisenablesthecustomer toreceiveallthepriceupdatestohisstockportfolio. Inarequest-basedmodelthecustomerischargedper transferofinformation,wherethetransfermaybea resultofsubscriptionordemand. Theoptimalretrievalprotocolalsodependsonthe access-pattern.theaccesspatterntoadatabaseview (e.g.thestockportfolio)isthepatternofreads(by thecustomer)andupdates(bythedatabaseserver) oftheview.thetypesofaccesspatternsthatwe consideraredeterministic,partiallydeterministic,and probabilistic.inadeterministicaccess-pattern,the customer/information-providerknowthetimeofeach readandeachupdate(e.g.thecustomermayknow thats/hereadsthevalueofthedatabaseviewevery dayat5pm,andtheviewisupdatedatmidnight). Inapartiallydeterministicaccesspattern,foreach timeslot(e.g.between9amand10am)thenumber ofreadsandwritesisknown,althoughtheexacttime ofeachaccessisnotknown.inaprobabilisticaccess pattern,expectednumberofreadsandandtheexpectednumberofwritesineachtimeslotareknown. Thecustomerand/ortheinformation-providerdene theaccesspattern,andinputittoanalgorithmthat selectstheoptimalretrievalprotocolforeachslot. Currently,wearebuildingasystemcalledWireless- View,tobeinstalledinmobilecomputersthataccess onlineservices.itreceivesasparameterstheexpected accesspatternandthecostmodel,andselectsaretrievalprotocolthatoptimizestheoverallcost.inthis paperwedescribehowthesystemmakesthisselection forthecostmodels,accesspatterns,andretrievalprotocolsdiscussedabove.somecombinationsof(costmodel,access-pattern-model,retrieval-protocol)have astraight-forwardformulaforcomputingthetotal cost,othersaremorechallenging.forexample,the (linear-time)allocationalgorithmforpartiallydeterministicpatternsinthetimebasedaccess-costmodel wasdiculttodevise,particularlyifthepatternis periodicand/orestimated(i.e.thenumberofreads (writes)inthenexttime-slotisestimatedastheaverageofthenumberofreads(writes)inthelastj slots).thingsarefurthercomplicatedbythefactthat notallprotocolsforcommunication-costoptimization arecompatiblewithprotocolsforaccess-costoptimization. Insummary,themaincontributionsofthispaper areasfollows. Wedemonstratetheapplicationofthedynamic allocationprincipleforcostoptimizationinaccessingonlineservices. Weintroduceanarchitectureforonlinedatabase

servicesinaconsumer-orientedenvironment. Weoutlineseveralcostmodelsandfactorsaectingthesecosts. Wepresentecientalgorithmsforoptimizing thesecostsforvariousaccesspatternsandretrievalprotocols. Nowwediscussrelevantwork.Inapreviouspaper ([7]),wehavealsodiscussedoptimalretrievalprotocols,butthatworkwasrestrictedtoaparticularscenariopresentedhere,namelyoptimizationofcommunicationcostforprobabilisticaccesspatternsinthe requestbasedcostmodel.theworkin[8,9]isalso relevanttothispaperbutthatworkconcentrateson broadcasting,whichisnotacentralthemeofourpaper.thewireless-viewsystemdiscussedabovewas conceivedin[6]. Therestofthepaperisorganizedasfollows.Section2discussesthearchitectureofatypicalconsumerorientedonline-servicesenvironment.InSections3 and4wediscussalgorithmsforaccesscostoptimization.section3concentratesonthetimebasedcost model,andsection4concentratesontherequest basedcostmodel.section5,discussescommunicationcostoptimizationbetweentheserveragentand theserver. 2Architecture Theenvironmentconsistsofthreeindependentfunctionalentities,thedatabasepublisher,thenetwork provider,andthecustomers.thedatabasepublisher providesservicestowidegeographicareas,e.g.,the wholeus.thecustomersusemobile/portablecomputers,thusthesystemconsistsofasetmcofactive mobilecomputersandaserverstationarycomputer SCthatstorestheonlinedatabase.Weassumethat eachmobilecomputerinthesetmcisconnectedto SC,i.e.,itcansendandreceivemessagesfromtheSC. TheMCsetvariesovertimesincemobilecomputers candisconnect,turn-onando.althoughwereferto thecomputersinthesetmcasmobilecomputers, someofthemmaybeinaxedlocation,connected bywirelinestothexednetwork.whatmattersfor thepurposeofthispaperisthatthecomputersinthe setmcaccessonlinedatabasesanddigitallibraries usingthearchitectureoutlinedinthissection. Eachcustomerpaysaccesschargestothedatabase publisher,andthedatabasepublisherpaysthenetworkproviderforthecommunication.alternatively, thecustomermaypaycommunicationchargesdirectly tothenetworkprovider.insomecasestheaccess chargeiszero.forexample,iftheuserisasalesperson thataccessestheinventoryinformationinthecorporatedatabase,accesschargewillprobablybezero. Weconsiderretrievalandupdateofadatabase view,x.herexisdenedbyapredicate,anditmay containoneormoredataitems,oritmayconstitute thewholedatabase.forexample,xmaybetheibm stockprice,orthepriceofsomecollectionofstocks, oritmaybethesetofrecordsofaaightsoutof Chicagoon12/12/93,ormailboxoftheuserinthe servercomputer.inthelattercase,awriteistheadditionofamessagetothemailbox,andareadretrieves theunreadmessages. Weareconcernedwithreadsthatareissuedatthe mobilecomputersandwritesthatareissuedatthe servercomputer.thesearetherelevantrequests. TheuserretrievesinformationfromtheviewxeitherbySubscription,oron-Demand.ASubscription requeststhatallupdatestoxbetransmittedtothe user'smobilecomputer.wealsodiscussthecaseof selectivesubscriptions,wheretheupdateistransmittedonlywhensomethresholdisexceeded(e.g.the priceofthestockexceeds15,ortheviewinthemobilecomputerismorethan10minutesold). Inordertoaccessthedatabaseauserhastoinstall inhis/hermobilecomputerasoftwaremoduleprovidedbythedatabasepublisher.thissoftwaremoduleiscalledtheserveragent(sa);itprocessesthe requestsoftheclientagent(ca),i.e.theuseror his/hersoftware.thecareceivesdatabaseinformationfromthesa,andinturn,thesareceivesinformationfromtheserver. ThisarchitectureillustratedinFigure1. TheSAprovidestotheCAthefollowingservices foreachviewx. subscribe:unsolicitedly,transfertothecaeach updateofx,or,inthecaseofdivergencecaching, selectiveupdates.thetransferisreceivedand processedbythecawhiletheusermaybeusinghis/herconsumercomputerforvariousother purposes. cancelsubscription:thecaindicatestothesa

The Architecture Mobile Computer Mobile Computer Client Agent Figure1:Architecture Server Agent Server invalidate:thesaindicatestothecathatthere read:transfertothecathecurrentcontentsof withperformingotherfunctions. thattheclientdoesnotwaitforx,butproceeds x.thisrequestmaybeasynchronousinthesense theviewx. thatthecaisnottoreceivefurtherupdatesto Mobile Computer Mobile Computer els.therst,denotedacm1,isrequest-basedinthe accesscost.wewillconsidertwoaccess-costmod- AccessCost TheinteractionbetweentheSAandtheCAincurs wasanupdateofthex,withoutprovidingthenew followingsense.iftheuserhasasubscriptiontoreceivealltheupdatestox,then,foreachtransferofzero.thisisthecostmodelfortelephone(unlimited numberoflocalcalls)orcabletvservice.inthiscost contents. ablestheusertoreceiveallwritestotheviewforaat feepertimeunit(sayaday).inotherwords,the time-basedinthefollowingsense.asubscriptionen- costpertimeunitisxed,regardlessofthenumber isthecostmodelofnewspapersandmagazines,where thecostpercopyishigheratthenews-standthanfor subscription-delivery. ofwritespropagatedtotheuser.thereisalsoasubscriptioninitiationfee,if,whichisgreaterorequalto Thesecondaccesscostmodel,denotedACM2,is informationfromthedatabasetotheuser,theuser subscriptionrequestsdonotincuranaccesscost.this aquerytoreceivethecurrentcopyofx,thenthe notedsac.ontheotherhand,iftheusersubmits dacsac.weassumethattheinvalidateandcancel- costoftheserviceisdac(demand-access-cost),where ischargedasubscription-access-cost.thiscostisde-modeltheusercanalsosubmitaquerytoreceivethe currentcopyofx,ifs/hedoesnothaveasubscription. Thenthecostoftheserviceisdac.Inthiscostmodel theinvalidaterequestisnotbeingused,andthecancelsubscriptionrequestcarriesazeroaccess-cost. broadcastfacilitymaybeusedfortransmittinginval- CommunicationCost theserverandamobilecomputer.forexample,the point-to-pointandbroadcastcommunicationbetween Weassumethatthenetworkproviderenablesboth,

idationmessages,andthepoint-to-pointfacilitymay beusedfordata(thisistheschemeusedin[5]). ThecommunicationbetweentheSAandtheServer incurscommunicationcostasfollows.apointto-pointtransmissionofapage(orless)fromthe ServertotheClientcostscc(chargedbythenetwork provider),andthecostofarequest(toread)sentfrom theclienttotheserveris!.notethat!maybe higherthanccsinceuplinkcommunicationmaybe moreexpensivethandownlinkcommunication.the broadcastofapagefromtheservertoanarbitrary numberofclientscostsb. RetrievalProtocols Wewillconsiderthecostoftwobasicretrievalprotocolsforreadingdatafromtheviewx.Eachone oftheseprotocolscanbeusedforca'sinterfaceto retrievex-datafromthesa,andforsa'sinterfaceto retrievex-datafromtheserver.theobjectiveofeach interfaceistooptimizecost. ThearchitectureinvolvingaccessandcommunicationcostsisdepictedinFigure2. TheRetrievalProtocolsthatweconsiderareDemand,denotedD,andSubscription,denotedS.If thecaretrievesx-datafromthesausingdemand, itmeansthatthecarequeststhecurrentvalueofx foreachreadissuedbytheuser.inotherwords,the CAdoesnotkeepanup-to-datecopyofx.Similarly, ifthesaretrievesx-datafromtheserverusingdemand,itmeansthatthesarequeststhecurrentvalue ofxwheneverneeded. AsafeatureoftheDemandprotocoltheCA(SA) mayrequestcacheinvalidation.thismeansthatthe SA(server)sendsanindicationtotheCA(SA)whenevertheviewxisupdated.Sincethisindicationis cost-free,thefeatureenablestheclienttopayonly forreadsthatareimmediatelyprecededbyawrite. AnotherwaytoimplementCacheinvalidationisto chargetheuseronlyforreadsthatarepresentedwhen thevalueoftheviewxisdierentfromtheonethat existedwhentheimmediatelyprecedingreadwaspresented.thecacheinvalidationfeaturemayormay notbeavailable. IftheCAretrievesx-datafromtheSAusingSubscription,itmeansthattheCArequeststoautomaticallyreceivealltheupdatestotheviewx.Inother words,thecakeepsanup-to-datecopyofx.similarly,ifthesaretrievesx-datafromtheserverusing Subscription,itmeansthattheSArequeststoautomaticallyreceivealltheupdatestotheviewx.The Subscriptionaccessprotocolmaybeparameterizedfor divergence(see[3,4]).specically,thesubscription protocolreceivesaparameterthatenablesaselective transmissionofupdates.forexample,thecamay receiveoneinevery3updatestotheviewx.thiswill beelaborateduponinsection6. AccessPatterns ForagivenRetrievalProtocol,theaccessandcommunicationcostsdependonthecostmodel,which wediscussedabove,andonthetypeofaccesspattern,whichwediscussnext.theusercanprovide access-patterninformationinoneofseveraltypes. Oneisdeterministic,inwhichtheuserspeciesaset oftimestampedrelevantrequests.forexample,the userspeciesthatthereisawriteofxeveryhour onthehour,andreadsat4:05pm,4:30pm,4:50pm and6:05pm.clearly,foreachoneofthecostmodels andforeachprotocolthecostofagivenpatterncan becomputedinastraight-forwardmanner.unfortunately,accesspatterninformationisrarelyavailable inthisform. Asecondtypeofaccesspatternispartiallydeterministic,inwhichtheuserspeciesthenumberofrequestsforeachtimeunit.Forexampletheuserspeciesthatbetween9and10thereare3readsand4 writes,between10and11thereare2readsand5 writes,etc.determinacyisonlypartial,becausethe exacttimeofeachrequestisnotknown. Aspecialcaseofpartialdeterminismiswhenthe numberofrequestsineachtimeunit,insteadofbeing explicitisestimatedasafunctionofthepreviousn timeunits.forexample,thenumberofreadsinany particularhourisisestimatedtobetheaverageofthe numberofreadsineachofthelastvehours. Athirdtypeofaccesspatternisprobabilistic,in whichtheuserspeciestheexpectednumberofrequestsforeachtimeunit.weassumethatthenumbersofreadsandwritesineachtimeunitarerandom variables;weassumethatanypairoftheserandom variablesareindependent.thus,thismodelissimilar tothepartiallydeterministicone,exceptthattheparametersareexpectedintheprobabilisticsense,rather thanexactones.

Optimization Structure speciedforaperiodsuchasaday,aweek,oramonth. Figure2:OptimizationStructure Server Agent communication toeachconsumer(user)inorderfortheconsumerto access cost cost optimization optimization beabletooptimizetheaccesscost,andtheconsumer Client Agent providesthereadpatterntothedatabasepublisher,so Eachoneoftheaboveaccesspatterntypescanbe thatthelattercanoptimizethecommunicationcost. ItcanbespeciedthattheAccessPatternisrepeated eachperiod. Thedatabasepublisherprovidesthewritepatterntouse.Inthesecondsubsection,weconsideresti- matedpartiallydeterministicpatternandprovidean algorithmforaccesscostoptimization.inthethird subsection,weconsiderperiodicpartiallydeterministicpatterns.inthefourthsubsection,weconsiderthe RetrievalProtocolDemandwithCacheinvalidation. foreachslotinthepatternwhichofthetwoprotocols Thus,boththeClientandtheServerknowapriorithe Server Computer Mobile Computer typeofaccesspattern,anditsparameters.obviously, weassumethatthereadandwriteaccesspatternsare compatible,i.e.iftheconsumerprovidesaprobablisticreadpattern,thenthedatabasepublisheralso providesthewritepatterninaprobablisticformat,so thatboth,theconsumerandthedatabasepublisher, 3.1PartiallyDeterministicPattern, canarriveatacommonprobablisticaccesspattern. 3AccessCostOptimizationin WeconsidertheissueofaccesscostoptimizationbetweentheClientAgentandtheServerAgentinthe mobilecomputer.wehavetwocostmodels,three RetrievalprotocolsandavarietyofAccessPatterns. Thuswehaveanumberofpossiblecongurations.In thissectionweconsiderthetimebasedcostmodel thetime-basedcostmodelpredenedtimes,e.g.midnight.thus,wecandivide TimeBasedCostModel theentirepatternintoanumbernoftimeslots. Opt,forselectingtheoptimalretrievalprotocolsfora givenpartiallydeterministicaccesspattern.theobjectiveistooptimizeaccesscostinthetimebasedcost model.itisassumedthatwecansubscribeonlyat Inthissubsectionwepresentanalgorithm,called tiveoftheoptalgorithmistoproduceanallocation patterni.e.assignsubscriptionordemandtoeach Givenapartiallydeterministicpattern,theobjec- anddescribealgorithmsforaccesscostoptimization. timeslotinthepattern.thisdeterminestheretrieval Intherstsubsection,weconsidertheSubscriptionProtocolusedfortheslot.Wewillshowthatforthe anddemandretrievalprotocols,i.e.wedeterminegivenpattern,theallocationpatterngivesthemini- mumtotalaccesscost. inguntilitexaminessucientnumberoffutureslots. Thus,atanypointintheexecutionofthealgorithm, iteitherimmediatelydecidesaretrievalprotocolfor theslot,oritkeepsthedecisionfortheslotpend- theslotsoneafteranother.afterexaminingeachslot, ThealgorithmOptoperatesasfollows.Itexamines

SDDS DecidedSlotscs z} {?++ UndecidedSlots2r3wj5r6wj {z } UnexaminedSlots Figure3:ClassicationOfSlots thesequenceoftimeslotscanbedividedintothree types,(1)thesequenceofdecidedslotswhichoccur inthebeginning,followedby(2)thesequenceofundecidedslots,i.e.slotsthathavebeenexaminedbut forwhichadecisionispending,followedby(3)the sequenceofunexaminedslots.thedecidedslotsare theslotsforwhichsubscriptionordemandprotocol hasbeenassigned.thealgorithmusestwovariables statusandfus(rstundecidedslot).atanytimethe statusvariabledenotestheretrievalprotocolassigned tothelastdecidedslot,whilefusgivestheindex oftherstundecidedslot.thealgorithmalsouses aprecomputedvaluedfiforeachsloti.here,dfiis thedemandfeefortheithslotandiscomputedasthe productofthenumberofreadsintheithslotandthe demandaccesscostforasinglereadrequest.after theterminationofthealgorithm,thearrayvariable decisioncontainsthedecisionsthathavebeentaken foreachoftheslots.figure3showstheclassication ofthedierentslots. Initially,thestatusvariableisassignedDemand. ThealgorithmOptscanstheslotsonebyone,startingfromtherst.Foreachtimesloti,itcomputes (dfi?ff),wheredfiisthedemandfeeoftheithslot asdescribedabove,andffistheatfeepertime unit.assumethatthevalueofthestatusvariable isdemand.ifthedemandfee(dfi)islessthanor equaltoatfee(ff),i.e.(dfi?ff)0,thealgorithmoptallocatesdemandtothecurrent(ith) slot.ifthedemandfeeisgreaterthantheatfee,i.e. (dfi?ff)>0,itmeansthatsubscriptionischeaper thandemand.however,wecannotassignsubscriptionwheneverthisconditionissatised,becausesubscriptionalsoinvolvesthepaymentoftheinitiation fee(if).so,wecheckwhetherthedemandfee(dfi)is greaterthantheatfee(ff)byif,i.e.dfi?ffif. However,iftheconditionisnotsatisedforasingle slot,wecannotassigndemandtothatslot.thisis becausethecumulativesum(cs)of(dfi?ff)forasequenceofconsecutiveslotsmaysatisfythecondition, i.e.p(dfi?ff)if,althoughforeachindividual slotithedierence(dfi?ff)maybepositiveornegative.so,algorithmoptproceedstothenextslotand computesthecumulativesum(cs),p(dfi?ff). Insummary,whenthevalueofthestatusvariable isdemand(i.e.theretrievalprotocolassignedtothe lastdecidedslotisdemand),thedemandprotocol isassignedtoalltheundecidedslots,i.e.fromthe FirstUndecidedSlottothecurrent(ith)slot,whenevercs0.Ifcsif,thenSubscriptionisassigned toalltheundecidedslotsandthestatusvariablebecomessubscription.ifneitheroftheaboveconditions issatised,thealgorithmproceedstothenextslotand computesthecumulativesumandrepeatstheabove operations. IfthestatusisSubscription,itmeansthattheinitiationfeehasbeenpaid,andwecanallocateSubscriptiontoalltheUndecidedslotswheneverthecumulativesum(cs),Pdfi?ff0.Ifthecs<0,itmeans thatdemandischeaperfortheundecidedslots.however,wecannotchoosedemandifjcsj<if,because ifwehavesubscriptioninanunexaminedslot,we wouldbepayingmoreinswitchingbacktosubscription.thusthealgorithmoptchecksifjcsjif, i.e.itchecksifinitiationfeeisrecoverable.ifso,the algorithmchoosesdemandfortheundecidedslots. Insummary,whenthestatusisSubscription,the SubscriptionprotocolisallocatedtoalltheUndecided slotswhenevercs0.ifcs<0andjcsjif,then DemandisassignedtoalltheUndecidedslotsand thestatusbecomesdemand.ifneitheroftheabove conditionsissatised,thealgorithmoptproceedsto thenextslotandcomputesthecsandrepeatsthe aboveoperations. Ifweareunabletoarriveatadecisionbasedonthe cumulativesumandwereachtheendofthepattern, therearetwopossiblecases,cs<0and0<cs<if. Ineithercase,thealgorithmOptchoosesDemandfor alltheundecidedslots.thisisjustiedbecause,if cs<0,demandischeaperandif0<cs<if,it meansthattheinitiationfeeisnotrecoverable. Aformalpresentationofthealgorithmisgivenin theappendix.

3.2EstimatedPartiallyDeterministic Pattern Thissubsectionconsidersestimatedpartiallydeterministicpatternsinwhichthenumberofreads (writes)inthenexttimeslotisestimatedtobethe ooraverageofthenumbersofreads(writes)inthe lastjtimeslots.theallocationalgorithmison-line andatthebeginningofeachtimeslot,itcomputes theestimatedvalueofthenumberofreadsforthe nextoneormoretimeslots,andusestheseestimated valuesforselectingdemandorsubscriptionforthe nexttimeslot. TheOptalgorithmforthepartiallydeterministic patternsgivenintheprevioussectioncanbeadapted totheabovesettingbycombiningitwiththecomputationoftheestimatedvalues,asfollows.atruntime, attheendofeachtimeslot,theestimatednumberof readsforthenexttimeslotiscomputed.then,algorithmoptisusedtocheckifadecisioncanbereached; ifso,weusethecorrespondingselection.otherwise, i.e.iftheslotisundecided,wecomputetheestimated valuesforthetimeslotafterthenext,andrepeatthe aboveprocedureuntiladecisionaboutthenexttime slot(whichisthefirstundecidedslot)canbemade. Itcanbeshownthattheestimatedvalueswilleventuallyconverge,andafterthisthecumulativesum(i.e. thevalueofthevariablecs)ofthealgorithmopt(see section3.1)willmonotonicallyincreaseordecrease; atthattime,wechoosesubscriptionforthenexttime slotifthecumulativesummonotonicallyincreases, otherwisewechoosedemandforthenexttimeslot. Itcanbeshownthattheestimatedvaluesconverge withinciterationswherecisafunctionofjandthe maximumnumberofreadsinanyofthelastjtime slots. Wehaveasimplerandmoreecientmethodfor thecasej=2,butweomitthisdiscussionforspace considerations. 3.3PeriodicPartiallyDeterministic Pattern Anotherspecialcaseofpartialdeterminismisthe casewhentheaccesspatternisperiodic.here,the numbersofreadsandwritesareknownforeachslot inoneperiodofthepattern.thesamepatternrepeats periodically,innitely. DDSSDD 2kDD 1SD Figure4:Non-trivialCase DDD+?k?+?+? {z } UndecidedSlotsk + DDDSSkSSSSSkS Figure5:FUSinthe1stperiod Theallocationpatternobtainedfortherstperiod cannotbedirectlyassignedtoalltheotherperiodsfor thefollowingreason.whenweconsidertwoadjacent periodswemayhavethecaseillustratedinfigure4. There,thesegments1and2areinbetweentwo Subscriptionslots.Itispossiblethatthecumulative sumofallslotsin1and2isgreaterthan?if.ifthis isthecase,thenallslotsin1and2shouldbeallocated Subscription.Forthisreasonwemodifythealgorithm asfollowsandapplytothersttwoperiods.theopt algorithmismodiedsothatifeitheroftheinner Repeatloopsterminatebecausetheendofthesecond periodisreached,thenforalltheundecidedslotsfrom FirstUndecidedSlottotheendofthesecondperiod, theallocationpatternischosenasfollows.ifthefirst UndecidedSlotisintherstperiod,thenwechoose SubscriptionforalloftheUndecidedslots.Thisis illustratedinfigure5.otherwise,i.e.,ifthefirst UndecidedSlotisinthesecondperiod,thenforeach ithslot(ifus)inthesecondperiod,wechoose theallocationpatternofthecorrespondingslotsin therstperiod.thisisillustratedinfigure6. Forallotherperiods,followingthesecondperiod, werepeattheallocationpatternofthesecondperiod. Theaboveallocationmethodcanbeshowntoproduceanoptimalallocationpattern.Theproofofcorrectnessofthismethodisomittedduetolackofspace.

SSDDS j1s kkssddundecidedslots z} { + 2j1+ 2k + SSDSDSSkSSDDSS Figure6:FUSinthe2ndperiod 3.4DemandwithCacheinvalidation InthissubsectionweconsidertheRetrievalProtocols SubscriptionandDemandwithCacheinvalidation. Weassumethatthepatternispartiallydeterministic. Theobjectiveistooptimizeaccesscostinthetime basedcostmodel.intheretrievalprotocoldemandwith-cache-invalidation,theclienthastopayonlyfor thereadsthatareimmediatelyprecededbyawrite, i.e.thecriticalreads.theexpectednumberofcriticalreadsnc,assumingthattherearenrreadsand nwwritesinatimeslotandassumingthattheyare uniformlydistributed,isgivenasfollows. nc=nrnw nr+nw Thentheexpecteddemandfeeforaslotisncdac. Withthisreviseddemandfee,thealgorithmOptcan beappliedverbatimforaccesscostoptimization. Thealgorithmsthatoptimizeaccesscostforthe estimatedandperiodicpatternscanalsobeapplied verbatimusingthesoreviseddemandfee. 4AccessCostOptimization intherequest-basedcost Model Inthissection,weconsiderthecombinations(AccessPattern,RetrievalProtocol)intherequestbased costmodel,andwedevelopalgorithmsforaccesscost optimization. Intherequestbasedcostmodel,whenevertheuser submitsaquerytoreceivethecurrentcopyoftheview x,thenthecostoftheserviceisdemand-access-cost (dac).iftheuserhasasubscriptiontoreceiveall theupdatestox,thenforeachtransferofinformationfromtheservertotheuser,theuserischargeda subscription-access-cost(sac). Firstweconsiderthecaseinwhichthepossible choicesofretrievalprotocolsaresubscriptionanddemand,i.e.thecache-invalidationoptionisunavailable.asbefore,therearethreetypesofaccesspatterns,i.e.deterministic,partiallydeterministicand probabilistic. Foreachtypeofaccesspattern,thealgorithmfor accesscostoptimizationistrivial.foreachtimeslot iweneedtocomparethesubscriptionfeesi=nw sacandthedemandfeedi=nrdac,andassignthe protocolthatincursalowercost. Now,whatexactlyarenrandnwintheaboveformula?Iftheaccesspatternisdeterministic,theClient needstopayonlyforthosereadsthatfollowawrite. Thusnristhenumberofreadsthatimmediatelyfollowawrite,andnwisthetotalnumberofwritesin theslot. Iftheaccesspatternispartiallydeterministic,we aregiventhenumberofreads(nr)andwrites(nw)in everytimeslot. Iftheaccesspatternisprobabilistic,nristheexpectednumberofreadsintimeunit,andnwisthe expectednumberofwritesinunittime.obviously, intheprobabilisticcase,thecostoptimizedistheexpectedcostratherthantheexactone. Nowassumethatthecacheinvalidationoptionis available.asbefore,foreachtypeofaccesspattern wecomparethesubscriptioncost,si=nwsacwith thedemandcost,di=ncdac,andchoosetheprotocolthatgivestheminimalcostforthatslot.theonly dierenceisthatweusenc(ratherthannr).thisis thenumberofcriticalreads,i.e.readsthatimmediatelyfollowawriteintheslot. 5CommunicationCostOptimization InthissectionweconsidertheissueofcommunicationcostoptimizationbetweentheServerandthe ServerAgentinthemobilecomputer.Again,there arethreeretrievalprotocolsthatcouldbeusedbythe ServerAgent,i.e.Subscription(S),Demand(D),and DemandwithCacheinvalidation(DCI). WeassumethattheRetrievalProtocolbetweenthe ClientAgentandtheServerAgent(calledtheAccess Protocol)hasbeenxed.Thereasonisthatthecon-

sumercan,independentlyofthedatabasepublisher, selectaretrievalprotocolforaccesscostoptimization. Thisimposesaconstraintonthepossiblechoicesof RetrievalProtocolsbetweentheServerAgentandthe Server(calledtheCommunicationProtocol).Inorder toseethisconsiderthefollowingcase.lettheretrieval protocolbetweentheserveragentandtheclientbe Subscription.ThenalltheupdateshavetobepropagatedbytheServerAgenttotheClient.Itisclearly evidentthatdemandcannotbeusedastheretrieval ProtocolbetweentheServerAgentandtheServer. Thusinthiscase,theonlyavailableretrievalprotocol betweentheserveragentandtheserverissubscription.thetablebelowgivesthepossiblechoicesof RetrievalProtocolsbetweentheServerAgentandthe Server,foragivenprotocolbetweentheClientAgent andtheserveragent. AccessProtocolCommunicationProtocol Subscription Subscription Demand Subscription Demand Demand Demand DCI DCI DCI DCI Subscription Fortherestofthissectionweassumethataccess patternispartiallydeterministic,butourapproach canbeappliedtoothertypesofaccess-patterns.now weselectforeverymobilecomputerandforeverytime slottheretrievalprotocolthatminimizesthepoint-topoint(ptp)transmissioncost,fromtheavailableprotocolchoices.ifthebroadcastmodeisunavailablethen ourprotocolselectionprocessendshere.thus,assume fortherestofthissectionthatbroadcastisavailable. Wewilldeterminewhetherornotthebroadcastmode canfurtherreducethecostoftheoptimalptpprotocol.asmentionedinsection2,thebroadcast-costof asinglewrite/pageisb,andatthiscostthepagecan besenttoalltheactivemobilecomputers. Assumethatthenumberofmobilecomputersthat areactive,i.e.turnedon,atanypointintimeis knownapriori,andtheaccesspatternofeachoneof themisalsoknown.thisisthecase,forexample, inacompanythathasaxednumberofsalespersons accessingtheinventorydatabase.thenwecompute thefollowinginequalityforeachtimeslot. Bnwk1nwcc+k2 Xi=1nri(cc+!)+k3 Xi=1nci(2cc+!) Intheaboveformulak1isthenumberofmobile computerswithsubscriptionastheoptimalptpretrievalprotocol,andnwisthenumberofwritesin thetimeslot.observethatnwisidenticalintheaccesspatternsofallmobilecomputers,sinceitisthe numberofwritesattheserver,andisindependent ofaparticularmobilecomputer.k2isthenumber ofmobilecomputerswithdemandastheoptimalptp protocol;nriisthenumberofreadsoftheithsuchmobilecomputer.k3isthenumberofmobilecomputers withdemand-with-cache-invalidationastheoptimal ptpprotocol;nciisthenumberofcriticalreads(forthe methodofcomputingthenumberofcriticalreads,see subsection3.4)oftheithsuchmobilecomputer. Iftheaboveinequalityissatised,thenthecostof broadcastingeachwriteislessexpensivethanthetotalcostofusingtheoptimalptpcommunicationprotocolforeachmobilecomputer.theneachsawill usethesubscriptioncommunicationprotocol(which, ascanbeseenfromtheprevioustable,iscompatiblewitheveryaccessprotocol),andthedatawillbe broadcastedduringthistimeslot.otherwise,i.e.if theinequalityisnotsatised,eachmobilecomputer willuseintheslottheoptimalptpprotocolselected intherststage. Now,whetherornotthenumberofactivemobile computersisknownapriori,consideratimeslotin whichsubscription-with-broadcastisnottheoptimal protocol.atruntime,thebroadcastmodecanstillbe usedtoreducecommunicationcost,asfollows.when awriteisreceivedattheserver,thedatabaseserver computesk,thethenumberofmobilecomputersthat haveasubscriptiontoreceivethewriteinaptpmode, or,havetoreceiveaninvalidationptpmessageasaresultofthewrite.thentheserverdetermineswhether thefollowinginequalityissatised. Bkcc ccisthecostofptptransmissionofasinglepage.ifthe aboveinequalityholds,thewriteisbroadcasted.otherwisethewriteand`invalidate'messagesaretransmittedpoint-to-point.

References [1]TomaszImielinskiandB.R.Badrinath.Mobile WirelessComputing:ChallengesinDataManagement.CommunicationsoftheACM,37:(10), Oct.1994 [2]R.Alonso,D.Barbara,andH.Garcia-Molina. Quasi-copies:Ecientdatasharingforinformationretrievalsystems.InProc.ofEDBT'88, LNCS303.SpringerVerlag,1988. [3]R.Alonso,D.Barbara,andH.Garcia-Molina. Datacachingissuesinaninformationretrieval system.acmtrans.databasesyst.,15(3):359{ 384,1990. [4]Y.Huang,R.Sloan,O.Wolfson.Divergence CachinginClient-ServerArchitectures.ProceedingsofthethirdInternationalConference onparallelanddistributedinformationsystems (PDIS),Austin,TX,Sept.1994,pp.131-139. [5]DanielBarbara,TomaszImielinski.Sleepersand Workaholics:CachingStrategiesinMobileEnvironments.ACMSigmod,1994. [6]O.Wolfson.DataAllocationinMobileComputing:AProjectDescription.Proceedingsofthe IEEEWorkshoponAdvancesinParallelandDistributedSystems,Princeton,NJ,Oct.1993,pp. 89-94. [7]Y.Huang,P.Sistla,O.Wolfson.DataReplicationforMobileComputers.Proceedingsofthe ACM-SIGMOD1994,InternationalConference onmanagementofdata,minneapolis,mn,may 1994,pp.13-24. [8]Tzi-ckerChiueh.SchedulingforBroadcast-based FileSystems.MobidataWorkshop,Nov.1994. [9]S.Acharya,R.Alonso,M.Franklin,S.Zdonik. BroadcastDisks:DataManagementForAsymmetricCommunicationEnvironments.ProceedingsoftheACM-SIGMOD1995,International ConferenceonManagementofData. TheAlgorithmOpt fi:=1 last:=n status:=demand whileilast fcs:=0 FUS:=i Ifstatus=Demand frepeat cs:=cs+(dfi?ff) i:=i+1 until((cs0)w(csif)w(i>last)) if(csif) status:=subscription g elsefrepeat cs:=cs+(dfi?ff) i:=i+1 until((cs0)w(cs?if)w(i>last)) if((cs?if)w(i>last)) status:=demand g forj=fusuptoi?1 decision[j]=status g g