distributed systems ad hoc and sensor networks€¦ · networking in mobile systems • difficulty:...
TRANSCRIPT
![Page 1: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/1.jpg)
DistributedSystems
AdhocandsensornetworksRikSarkar
UniversityofEdinburgh
Fall2018
Distributed Systems, Edinburgh, 2018
![Page 2: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/2.jpg)
MobileandUbiquitouscompuEng
• Devices(computers)arecarriedbypeople(mobile)– Laptops,phones,watches…
• Theyareeverywhere– Carriedbypeople(mobile)– Embeddedintheenvironment
• Coffeemachines,cameras,sensorsforlightcontrol,elevators…
– Producelargeamountsofdata• Usage,sensing…
Distributed Systems, Edinburgh, 2018
![Page 3: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/3.jpg)
Ubiquitous• Advantages:
– Therearecomputerseverywhere– Everythingis“smart”– PotenEallyusecomputaEonsonthesetomakethemevensmarter
• Challenges:– Therearemorethingstogowrong– Noteasytomakethingsworkwellcoherently– ConsistentplaSormsformanagingubiquitousdevicesdonotexist(yet)
– Devicesdonotinteroperateeasily
Distributed Systems, Edinburgh, 2018
![Page 4: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/4.jpg)
Mobile
• Advantages:– Thesamedeviceiscarriedbytheperson–easytogiveconsistentservice
– InformaEonwhenever,wherevertheyneed– Deviceshavesensors–potenEalforsensingtheenvironmentandadapEng
• Disadvantages:– ConnecEvityischallenge:dataiscostly;networkdoesnotworkthesameway;mobilityinterfereswithcomunicaEon
– LimitedbaXery:can’tdotoomuchcommunicaEon– Howtomakeuseofsensors,notsowellunderstood
Distributed Systems, Edinburgh, 2018
![Page 5: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/5.jpg)
ContextawarecompuEng
• AdaptcomputaEonstothecircumstances– Timeofday– Istheuserpresent?– Isthephoneinhandorinpocket– Scanforwifionlywhenindoors– Turnoffringwhenincinema,mee-ng…– RecognizeacEvityandbringuprelevantinformaEon
– …
Distributed Systems, Edinburgh, 2018
![Page 6: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/6.jpg)
ContextawarecompuEng
• AdaptcomputaEonstothecircumstances• BasiccontextsareeasytoidenEfy,butitisnotalwaysclearhowtoadapt– Turndownvolumeatnight…butwhatifitisanimportantcall?
• Manycontextsareveryhardtodetectreliably
Distributed Systems, Edinburgh, 2018
![Page 7: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/7.jpg)
OthercontextdetecEonexamples
• Indoor/outdoor• UsesoundtodetectuserinameeEng• Detecttransportmode(walking,car,bus,tram..)– Usingaccelerometer
• DetectpresenceofotherusersnearbyfromwifiacEvity
Distributed Systems, Edinburgh, 2018
![Page 8: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/8.jpg)
ContextdetecEon
• Generallyhard• Concernsaboutprivacy:youdonotwanttosendcontextinformaEontoaserver
• PerhapsdistributedcomputaEoncanhelp– Usedatafrommanyphonestodetectcontext– Butagain,donotwanttosendalldatatoserver– Doasmuchofitaspossibleondevice–filter/processdataatsource
Distributed Systems, Edinburgh, 2018
![Page 9: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/9.jpg)
Networkinginmobilesystems
• Difficulty:– Thenetworkgraphchanges– Anodeisnotalwaysconnectedtothesamerouter
• Examplesystem:Mobilead-hocnetworks– Ad-hoc:Unplanned– Devicessimplyconnecttonearbydevicesandroutepackets
– Alsoappliestosensornetworks
Distributed Systems, Edinburgh, 2018
![Page 10: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/10.jpg)
RouEnginadhocwirelessnetworks
• Findroutebetweenpairsofnodeswishingtocommunicate.
• ProacEveprotocols:maintainrouEngtablesateachnodethatisupdatedaschangesinthenetworktopologyaredetected.
– Heavyoverheadwithhighnetworkdynamics(causedbylink/nodefailuresornodemovement).
– NotpracEcalfornetworksthatchangefrequently
Distributed Systems, Edinburgh, 2018
![Page 11: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/11.jpg)
RouEnginadhocwirelessnetworks
• ReacEveprotocols:routesareconstructedondemand.NoglobalrouEngtableismaintained.
• Moreappropriatefornetworkswithhighrateofchanges
– AdhocondemanddistancevectorrouEng(AODV)– DynamicsourcerouEng(DSR)
Distributed Systems, Edinburgh, 2018
![Page 12: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/12.jpg)
DynamicSourceRouEng(DSR)
• NodeSwantstosendamessagetonodeD• SiniEatesaaroutediscovery• Sfloodsthenetworkwithrouterequest(RREQ)message
• Eachnodeappendsitsownidtothemessage
Distributed Systems, Edinburgh, 2018
![Page 13: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/13.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 14: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/14.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 15: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/15.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 16: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/16.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 17: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/17.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 18: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/18.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 19: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/19.jpg)
RouteDiscoveryinDSR
• DesEnaEonDonreceivingthefirstRREQsendsaroutereply(RREP)
• RREPissentonarouteobtainedbyreversingtherouteinreceivedRREQ
Distributed Systems, Edinburgh, 2018
![Page 20: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/20.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 21: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/21.jpg)
RouteDiscovery:RREQ
Distributed Systems, Edinburgh, 2018
![Page 22: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/22.jpg)
When
• Whenalinkfails,anerrormessagewiththelinknameissentbacktoS.
• Sdeletesanyrouteusingthatlinkandstartsdiscovery.
Distributed Systems, Edinburgh, 2018
![Page 23: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/23.jpg)
Routecaching
• Whenanodereceivesorforwardsamessage,itlearnsroutestoallnodesonthepath
• Advantage:– SmaynotneedtosendRREQ– IntermediatenodeonreceivingRREQ,canrespondwithcompleteroute
• Disadvantage:– Cachesmaybestale:StriesmanycachedroutesbeforestarEngadiscovery.Or,intermediatenodesreturnoutdatedinformaEon.
Distributed Systems, Edinburgh, 2018
![Page 24: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/24.jpg)
DSR:SummaryAdvantages:• Routescomputedonlywhenneeded–goodforchanging
networks• Cachingcanmakethingsefficient• DoesnotcreateloopsDisadvantages• EnEreroutemustbecontainedinmessage:canbelongfor
largenetworks• FloodingcausescommunicaEontomanynodes• Stalecachescanbeaproblem• Notsuitablefornetworkswherechangesaretoofrequent
Distributed Systems, Edinburgh, 2018
![Page 25: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/25.jpg)
AdhocOn-DemandDistanceVectorRouEng(AODV)
• MaintainsrouEngtablesatnodessothattherouteneednotbestoredinthemessage
• NoCaches:OnlyonerouteperdesEnaEon
Distributed Systems, Edinburgh, 2018
![Page 26: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/26.jpg)
AODVRouteDiscovery
• SourcefloodsthenetworkDistributed Systems, Edinburgh, 2018
![Page 27: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/27.jpg)
AODVRouteDiscovery
• Othernodescreateparentpointer• AnodeforwardsaRREQonlyonce
Dst NxtHp Dist
S S 1
Dst NxtHp Dist
S S 1 Dst NxtHp Dist
S S 1
Distributed Systems, Edinburgh, 2018
![Page 28: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/28.jpg)
AODVRouteDiscovery
• Othernodescreateparentpointer• AnodeforwardsaRREQonlyonce
Dst NxtHp Dist
S S 1
Dst NxtHp Dist
S E 2
Distributed Systems, Edinburgh, 2018
![Page 29: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/29.jpg)
AODVRouteDiscovery
• RREPisforwardedviareversepath
Dst NxtHp Dist
S E 2
Dst NxtHp Dist
S S 1
Dst NxtHp Dist
S F 3
Distributed Systems, Edinburgh, 2018
![Page 30: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/30.jpg)
AODVRouteDiscovery
• RREPisforwardedviareversepath• Createsaforwardpath
Dst NxtHp Dist
S E 2
D D 1
Dst NxtHp Dist
S S 1
D F 2
Dst NxtHp Dist
S F 3
D D 0
Dst NxtHp Dist
S S 0
D E 3
Distributed Systems, Edinburgh, 2018
![Page 31: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/31.jpg)
Routeexpiry
• ApathexpiresifnotusedforacertainEme.• IfanodeseesthatarouEngtableentryhasnotbeenusedbythisEme,itremovesthisentry
• Evenifthepathitselfisvalid• Goodfornetworkswithfrequentchanges• BadforstaEcandstablenetworks
Distributed Systems, Edinburgh, 2018
![Page 32: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/32.jpg)
Cancreateloops
• AssumeC->Dlinkhasfailed,butAdoesnotknowbecausetheERRmessagewaslost
• CisnowtryingtofindpathtoD• ArespondssinceAthinksithasapath• Createsloop:C-E-A-B-C
Distributed Systems, Edinburgh, 2018
![Page 33: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/33.jpg)
SequencenumbersinAODV
• IfAhasaroutetoD,Akeepsasequencenumber.
• Aincrementsthisnumberperiodically:tellshowoldtheinformaEonis
Distributed Systems, Edinburgh, 2018
![Page 34: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/34.jpg)
Usingsequencenumbers
• Rule:sequencenumbermustincreasealonganyroute
Distributed Systems, Edinburgh, 2018
![Page 35: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/35.jpg)
Sequencenumberruleavoidsloop
• Adoesnotreply,sinceitssequenceno.islessthanthatofC
Distributed Systems, Edinburgh, 2018
![Page 36: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/36.jpg)
AODV
• RouEngtables,messagedoesnotcontainroute
• Freshroutespreferred• Oldunusedroutesexpire• StalerouteslessproblemaEc• Needssequencenumberstopreventloops• BeXerformoredynamic,changingenvironments
Distributed Systems, Edinburgh, 2018
![Page 37: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/37.jpg)
RouEnginadhocnetworks
• ReacEveprotocols:routesareconstructedondemand.NoglobalrouEngtableismaintained.
• Moreappropriatefornetworkswithhighrateofchanges
– AdhocondemanddistancevectorrouEng(AODV)– DynamicsourcerouEng(DSR)
• Needflooding– Inefficientinlargenetworks
Distributed Systems, Edinburgh, 2018
![Page 38: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/38.jpg)
GeographicalrouEng:UsinglocaEon
• GeographicalrouEngusesanode’slocaEontodiscoverpathtothatnode.
Distributed Systems, Edinburgh, 2018
x
y
Greedy Routing: Forward to the neighbor that is nearest to the destination
![Page 39: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/39.jpg)
GeographicalrouEng
• AssumpEons:– NodesknowtheirowngeographicallocaEon– Nodesknowtheir1-hopneighbors– RouEngdesEnaEonsarespecified
geographically(alocaEon,orageographicalregion)
– EachpacketcanholdasmallamountofrouEnginformaEon.
Distributed Systems, Edinburgh, 2018
![Page 40: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/40.jpg)
Sensornetwork
• Sensorsenabledwithwireless– Cancommunicatewithnearbysensors– CommunicaEontoserverrelaEvelycostly
• Lowpower,butlotsofdata– Notworthsendingeverythingtoserver
• Tryusethedatadirectlyinsidethenetwork– In-networkdistributedcompuEng
Distributed Systems, Edinburgh, 2018
![Page 41: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/41.jpg)
Problem:Howtofindtherelevantdata?
• Atouristinaparkasks• “Whereistheelephant?”• Outofallthesensors/cameraswhichoneisclosetoanelephant?
Distributed Systems, Edinburgh, 2018
![Page 42: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/42.jpg)
DatacentricrouEng• TradiEonalnetworkstrytoroutetoanIPaddress• FindpathtothenodewithaparEcularID• Butwhatifwetrytofinddata,notspecificnodes?
• Akerall,deliveringdataistheulEmategoalofrouEngandnetworks
• Datacentricstorage– Storagedependsonthedata(elephant,giraffe,song…)
• DatacentricrouEng(search)– Routetothedata
Distributed Systems, Edinburgh, 2018
![Page 43: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/43.jpg)
DistributedDatabase
• InformaEonProducer– Canbeanywhereinthenetwork– Maybemobile– Manyproducersmaygeneratedataofthesametype
• UserorInformaEonConsumer– Canbeanywhere– Maybemany
Distributed Systems, Edinburgh, 2018
![Page 44: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/44.jpg)
DistributedDatabase:Challenges
• Consumerdoesnotknowwheretheproduceris,andviceversa
• Needtosearch:Mustbefast,efficient
Basicmethods(e.g.usingfloods):• Push:Producerdisseminatesdata• Pull:Consumerlooksforthedata• Push-pull:Bothproducer,consumersearchforeach-other
Distributed Systems, Edinburgh, 2018
![Page 45: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/45.jpg)
Distributedhashtables
• Useahashonthedata:h(song1.mp3)=node#26
• Anyonethathassong1.mp3informsnode#26• AnyonethatneedsSong1.mp3checkswithnode#26
• UsedinpeertopeersystemslikeChord,pastryetc
Distributed Systems, Edinburgh, 2018
![Page 46: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/46.jpg)
GeographicHashTables• Contentbasedhashgivescoordinates:– h(lion)=(12,07)
• Producersendsmsgto(12,07)bygeographicrouEngandstoresdata
• Consumersendsmsgto(12,07)bygeographicrouEngandgetsdata
Distributed Systems, Edinburgh, 2018
![Page 47: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/47.jpg)
GHT
• Whatifthereisnosensorat(12,07)?
• Usethesensornearesttoit
Distributed Systems, Edinburgh, 2018
![Page 48: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/48.jpg)
Faulthandling• Whatifhomenodeadies?• Replicas(nodessurroundingahashlocaEon)haveaEmerthattriggersanewcheck
• Anewnodebecomeshome
Distributed Systems, Edinburgh, 2018
![Page 49: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/49.jpg)
GHT
• Advantages– Simple– Handlesloadbalancingandfaults
• Disadvantages– NotdistancesensiEve:everyonehastogotohashnodeevenifproducerandconsumerareclose
– Ifadataisqueriedorupdatedoken,thatnodehasalotoftraffic–boXleneck
Distributed Systems, Edinburgh, 2018
![Page 50: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/50.jpg)
RumorRouEng
• Producer:Senddataalongacurveorrandomwalk,leavedataorpointersonnodes
• Consumer:Routealonganothercurveorrandomwalk,hopetomeetdataorpointer
Distributed Systems, Edinburgh, 2018
![Page 51: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/51.jpg)
RumorrouEng
• Eachnodemaintainsalistofevents• Addseventsastheyhappen
• Agents:Packetsthatcarryeventsinthenetwork– Aggregateeventsofeachnodetheypassthrough
• Agentsmoveinrandomwalk.From1-hopneighborsselectonethathasnotbeenvisitedrecently
Distributed Systems, Edinburgh, 2018
![Page 52: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/52.jpg)
• D
Distributed Systems, Edinburgh, 2018
![Page 53: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/53.jpg)
Mobile,Ad-hocandSensornetwork
• Adifficultmodel–leastinfrastructure,lowpowernodes,communicaEon/computaEonexpensive
• NotenErelyrealisEc• However,itmakesleastnumberofassumptons
– usefulasabasisfordevelopingdistributedprotocols/algorithms
– Whichcanthenbeenhancedusingavailableinfrastructureinspecificcases
Distributed Systems, Edinburgh, 2018
![Page 54: Distributed Systems Ad hoc and sensor networks€¦ · Networking in mobile systems • Difficulty: – The network graph changes – A node is not always connected to the same router](https://reader033.vdocument.in/reader033/viewer/2022052003/6016e38ca9038c53314463f9/html5/thumbnails/54.jpg)
Emergingtechnologies
• IoT:localcomputaEonandcommunicaEonisimportant– Efficiency– Privacy
• DevicetodevicecommunicaEon– Comingin5G– Ad-hocnetworkstosupplementcellnetworks
Distributed Systems, Edinburgh, 2018