1 / 37

High Concurrent R-tree Operations when Tracking Continuous Movement

High Concurrent R-tree Operations when Tracking Continuous Movement. Cezar Chitac , Robertas Kerpys , Raluca Marcuta. Motivation. Need for tracking moving objects in real time: concurrency Organize and access positional information Queries: s earch query r ange query. Overview.

bracha
Download Presentation

High Concurrent R-tree Operations when Tracking Continuous Movement

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. High Concurrent R-tree Operations when Tracking Continuous Movement CezarChitac, RobertasKerpys, RalucaMarcuta

  2. Motivation • Need for tracking moving objects in real time: • concurrency • Organize and access positional information • Queries: • search query • range query

  3. Overview • Problem Formulation • Queries vs. Updates • First Approach: Split-Supporting Index • Second Approach: Split-Free Index • Related Work • Project Status • Conclusions • Future Work

  4. Problem Formulation • Frequent updates • Efficient R-tree index structure • Concurrency between queries and updates • Objectives • Query performance • Update performance • Data freshness • Challenges • Structural modifications during concurrent tree operations: queries and updates avoid locks

  5. Range Queries • Objects send updates when moving δ units: • reported position • real position δ range last reported position expanded range real position at current time Current time in [ts, te)  time for which the results are returned

  6. Semantics - may have been in range at time ts • Updates used to construct answer to range query – freshest possible: • all that finish before ts • some that finish after ts • Constructing the resulting set • roll time back or forward to ts • area where object may have been at ts: • circle of radius: min(vmax|ts - tu|, δ), center: (x, y) • intersect with original unexpanded range

  7. Background: Bottom-up Updates • Efficient updates: no top-down traversal • Secondary index on oid

  8. Types of Update: Local & Non-local Query p10 p10 p13 p5 p4 p5 p6 p7 p11 p12 p9 p1 p2 p3 p8 p10 R2 R1 R5 R6 R3 R7 R4

  9. Types of Update: Local & Non-local • Local updates • modify position coordinates • no structural modifications • Non-local updates • move object to another leaf node => delete + insert • problem: concurrent query • Solution • insert + logical delete (negative tu)

  10. Query vs. Update Query • Query retrieves: • old position if new is inserted in the already scanned leaf nodes p10 p10 • – both => query chooses freshest • Pold in hash-table: used by next update • delete logically marked entry

  11. General Index Structure

  12. Overview of Update Process

  13. Overview • Problem Formulation • Queries vs. Updates • First Approach: Split-Supporting Index • Second Approach: Split-Free Index • Related Work • Project Status • Conclusions • Future Work

  14. Split-Supporting Index • Algorithm is based on atomic operations and versioning of the items • Latching is minimal

  15. Node Split - exclusive latch between non-local updates - marks logically deleted items p14 p14 p3 p4 p5 p14

  16. Node Split - exclusive latch between non-local updates - marks logically deleted items R3 R4 R5 p1 p2 p6 p7 p14 R9 p3 p4 p5 p14

  17. Node Split - exclusive latch between non-local updates - marks logically deleted items R10 p14 R3 R4 R5 R9 p2 p3 p4 p5 p14 p1 p6 p7

  18. Local Updates • Are allowed during splits and merges R3 Secondary index N2 N3 N1 p1 p2 N1 N1’ Nil Nil 0 N1 N1’ Nil Nil 1 N2’ N2 0 R4 N2’ N1’ N3’ p3 p4 p6 p7

  19. Non-Local Updates • Are not allowed to make changes for items which are involved into split • Updates are put into a priority queue and retried later

  20. Merge Merge underflow node with one of the sibling nodes • Sibling node have space for all entries • Sibling node would become overflow after insertion

  21. Sibling node has space for all entries • Sibling and underflow nodes are latched • New empty node is created • Entries from sibling and underflow nodes are copied into the new node • New node is introduced into structure by atomic swap of the pointers

  22. Sibling node would become overflow • Split of the sibling node is performed • Split function accepts all entries from the underflow node instead of one entry • Entries are distributed between two new nodes • Two new nodes are introduced into structure in two atomic operations

  23. Summary Advantages Disadvantages • Local updates are permitted during node splits and merges • Queries can execute concurrently • High complexity due to avoidance of locks • Creation of artificial updates

  24. Overview • Problem Formulation • Queries vs. Updates • First Approach: Split-Supporting Index • Second Approach: Split-Free Index • Related Work • Project Status • Conclusions • Future Work

  25. Second Approach – Main Idea • Splits and merges: • Time consuming • Increase complexity • Artificial updates • Goals: • Objects update only when they move • No splits and no merges

  26. Parameters

  27. Logically Overfull Node cut_val persistent part evacuating part R2 R1 p7 p5 p1 p4 p6 p3 Node is logically overfull: LO = 6 Create new node p2 Algorithm: choose cut value Change nodes’ states Store pointer to new node

  28. Node Structure split_ptr – pointer to newly created node state – represents a node’s state: Normal, Evacuating, Populating or New cut – stores the axis by which the node was “divided” cutval – stores the value of the axis ev_part– indicates the part that is evacuating iNeed – indicates a node’s desire to attract or repel objects

  29. State Diagram PU≤NR ≤LU NR = 0 Creation Populating Insert(obj) New NR ≤LU Insert(obj) & NR = LU Delete(obj) & NR=PU+1 Delete(obj) & NR = LU+1 Insert(obj) & NR = LU Normal NR ≤PU Total Evacuation NR ≥LO/2 Insert(obj) & NR = LO LU+1≤NR ≤LO Delete(obj) & NR =LO/2 Delete(obj) & NR=1 Evacuating Deletion

  30. Find Node Heuristics • Search parent node first • Sibling node in need of objects • Top-down tree traversal based on: • MBR area enlargement • iNeed values

  31. Local and Non-local R1 R2 R12 R3 R4 R5 R6 R7 R8 R9 R10 R11 p1 p2 p3 p5 p4 p3 p4 P3 local update p5 non-local update to R3

  32. Summary • Advantages: • Algorithmic simplicity • No artificial updates • Novelty • Disadvantages: • Setting heuristic parameters • Logical complexity

  33. Related Work • Logical and Physical Versioning in Main Memory Databases [Rastogi et al. 1997] • Trees or Grids: Main-memory Indexing [Šidlauskas et al. 2009] • High-Concurrency Locking in R-trees: R-link [Kornacker & Banks 1995] • Existing concurrent approaches: • An Enhanced Concurrency Control Scheme for Multi-dimensional Index Structures [Song et al. 2004] • CGiST: Concurrency and Recovery in Generalized Search Trees [Kornacker et al. 1997]

  34. Status of the Project • Semantics of application domain • Concurrent queries and updates • An approach based on copying on demand: • Create minimal structure on the side • Integrate using atomic operations • A new approach: • A tree structure with no splits or merges • Necessary heuristics to compensate

  35. Conclusion • Addresses concurrency issues when minimizing locking/latching • Two approaches debated (one novel) • Focus on concurrency while maintaining structure integrity

  36. Future Work • Next semester: • Implementation of second approach • Comparison with relevant existing approaches • Additional work: • Implementation of the first approach • Comparison between the two

  37. Feedback • What parts of the presentation: • needed more focus? • unnecessary? • too detailed? • Was the flow of the presentation natural? • Any thoughts about our two presented methods?

More Related