310 likes | 586 Views
- in a dynamic peer-to-peer environment. A Distributed Database System. A project by: Claus R. Thrane, Uffe Sørensen, Morten Dahl Jørgensen, Martin Clemmensen. Agenda. Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin)
E N D
- in a dynamic peer-to-peer environment A Distributed Database System A project by: Claus R. Thrane,Uffe Sørensen, Morten Dahl Jørgensen,Martin Clemmensen
AALBORG UNIVERSITET Agenda Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin) Data Replication Versus Caching Distributed Transactions (Claus) Conclusion Model Results Experiments and Testing (Morten) Demonstration
AALBORG UNIVERSITET Motivation Terma Client/Server Ad-hoc P2P (MANET) “The Travelling Wheelbarrow Problem”
AALBORG UNIVERSITET Project Goals Analyze case network requirements and derive theoretical and practical solutions. Develop an effective routing technique based on the requirements of the case. Develop an effective query scheme based on the requirements of the case. Design, implement, test and analyze results of the presented solutions.
AALBORG UNIVERSITET Model Proof-of-concept Groups Proem ZRP Any
AALBORG UNIVERSITET MANETs M(obile) Dynamic topology Limited bandwidth, interference – wireless A(d-hoc) No fixed infrastructure, preferred paths, designated routers. NET(works) Maintain intra-MANET connectivity Maintain outside connectivity
AALBORG UNIVERSITET MANET Application Vehicular Networking Trucks as in our case Mobile Phones Festivals – Roskilde 2002 Cities – Context awareness
AALBORG UNIVERSITET Ad-hoc Network Anatomy Architectural view: No distinction between router and host Dynamic network configuration No pre-established links The network forms the links
AALBORG UNIVERSITET Agenda Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin) Data Replication Versus Caching Distributed Transactions (Claus) Conclusion Model Results Experiments and Testing (Morten) Demonstration
AALBORG UNIVERSITET Peer-to-Peer (P2P) Made up by the peers in the network Built on top of an existing network Motivated by its high scalability/reliability No predefined roles (client/server) Abstraction over network - overlay Free flat “address space” Exact location of data not known until “run-time” Logical routing and querying
P2P Network AALBORG UNIVERSITET
AALBORG UNIVERSITET P2P Overlay Types 1th and 2nd generation: unstructured Application specific Little abstraction, more framework E.g. Napster and Gnutella 3rd generation: structured General purpose High abstraction: DHT and DOLR Upper bound on routing (in ideal state) E.g. Pastry
AALBORG UNIVERSITET P2P and MANETs MANETs can be highly mobile Structures in MANETs should be locality-aware P2P overlays assume a “stable” infrastructure Upper bound is on logical routing in ideal state P2P networks designed to span the globe Safari handles large MANETs Uses a DHT-like structure Distribute/share responsibility Small structures
AALBORG UNIVERSITET Agenda Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin) Data Replication Versus Caching Distributed Transactions (Claus) Conclusion Model Results Experiments and Testing (Morten) Demonstration
AALBORG UNIVERSITET Querying Query language Like SQL Query Interface Strictly defined interface Case Database Schema Case databases are heterogeneous Objects represent physical items
AALBORG UNIVERSITET Query Techniques Groups “Optimized” flooding Depth-First Search Sequential queries Breadth-First Search Flooding Local Indices Answering queries on behalf of others
AALBORG UNIVERSITET Group Based Querying This solution was chosen in our model Optimized flooding Performance depends highly on group construction Optimizations to group construction can be made by performing statistical analysis of queries In a network with few nodes, performance will be slightly better than flooding
AALBORG UNIVERSITET Caching Advantages Good enough answers No significant traffic increase Disadvantages Storage usage increase Not 100% up-to-date Data Replication Versus Caching Replication • Advantages • Availability • Fault tolerance • Disadvantages • Traffic increase • Storage usage increase
AALBORG UNIVERSITET Data Replication Full replication Defeats the purpose of P2P/MANETs Uniform replication Fixed number of replicas Proportional replication Replicas of requested objects Our Case Data objects represents physical objects Large amount of traffic on the network
AALBORG UNIVERSITET Caching Caching Queries & Results Used to provide good-enough answers and to optimize future queries Eavesdropping Caching results of queries made by others and heard by the current node Our Case Does not generate excessive amount of traffic
AALBORG UNIVERSITET Agenda Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin) Data Replication Versus Caching Distributed Transactions (Claus) Conclusion Results Experiments and Testing (Morten) Demonstration
Concepts of Distributed Transactions • Simulate atomic operations • Preserve object state consistency and maximize concurrency • All or Nothing (in case of crashes) • Client, Coordinator and Recoverable objects AALBORG UNIVERSITET
AALBORG UNIVERSITET Distributed Transaction Techniques Traditional and distributed Locks, Optimistic and Timestamp One/two/three-phase commit A transaction in our system Reserve tire, frame, barrow and mounting screws
Transaction Example Pseudo-code: • T= openTransaction(abc) • reserveItem(A,tire) • reserveItem(B,frame) • reserveItem(C,barrow) • reserveItem(C,screws) • closeTransaction(T) Two-Phase commit • Issues in ad-hoc • Who is coordinator? • Dead-lock detection? • Server crashes / disconnect? AALBORG UNIVERSITET
AALBORG UNIVERSITET Model Results Goals and Achievements Overall project Project results Implementation – proof of concept Ad-hoc and Peer-to-Peer.
AALBORG UNIVERSITET Agenda Introduction (Uffe) Motivation Model Networking MANETs P2P and Overlays (Morten) Database Querying (Martin) Data Replication Versus Caching Distributed Transactions (Claus) Conclusion Model Results Experiments and Testing (Morten) Demonstration
AALBORG UNIVERSITET Ad-hoc Testing Setup and Environment Two algorithms: proactive and reactive Three cases: average case and two “optimized” Modelled in ns2
Simulation results AALBORG UNIVERSITET
AALBORG UNIVERSITET Query Testing Setup and Environment 20%/60% items in storage Broadcast/group model 7/49 nodes Tightly connected nodes Implemented using FreePastry with Scribe
AALBORG UNIVERSITET Test Results Results Tightly connected nodes unrealistic Future Tests More realistic environment More realistic scenario; real-world test Longer running tests
AALBORG UNIVERSITET Demonstration DEMO