Presentation is loading. Please wait.

Presentation is loading. Please wait.

XML Store Christian Theil Have, René Kofoed, References: Kasper Pedersen & Jesper Pedersen, Value-oriented.

Similar presentations


Presentation on theme: "XML Store Christian Theil Have, René Kofoed, References: Kasper Pedersen & Jesper Pedersen, Value-oriented."— Presentation transcript:

1 XML Store Christian Theil Have, cth@itu.dkcth@itu.dk René Kofoed, rkofoed@itu.dkrkofoed@itu.dk References: Kasper Pedersen & Jesper Pedersen, Value-oriented XML Store Mads Pultz, Garbage Collection in Distributed Value-Oriented Storage System

2 XML Store overview XML store Stores values Name service Like a DNS service

3 XML Store overview What’s in an XML store Values Value references XML store helps you to store values, and locating them again with references.

4 What’s a value ? A piece of data of some sort, maybe the number 5 :) Are 5 and 5 and 5 the same values? Nope – there is only one value: 5 The other 5 and 5 are occurences of the first 5.

5 What’s a value reference? A shortname for a value :) A shortname is shorter than the data being stored.

6 Value references to xml or not to xml BBCD01 BBCD02 Hamlet Values Value references

7 Shared values Document A BBCD01 BBCD02 Hamlet Document B BBCD01 BBCD03 to be or not to be Shared value

8 And updates? By changing speaker: ”Hamlet” in document A, will also change document B This will be problematic!

9 Therefore…. Perform non-destructional updates by: Creating a new value in a new tree Replacing existing references to the old value to point to the new value

10 Changing Hamlet to Ophelia Document A BBCD01 BBCD02 Document A’ BBCD04 BBCD03 Hamlet Document B BBCD01 BBCD03 Ophelia

11 Put in another way Node Value

12 XML - format for representing tree- structured data XML models: Document Object Model (DOM) - loads the entire document into memory in order to manipulate it. XML Enabled Databases (XED) – stores XML data in an existing relational database. Native XML Databases – internal model designed for persisting XML Document Value Model DVM – a way to program XML centric applications

13 What’s DVM? An API consisting of only two methods: Save Load That’s it!

14 Implementations 1. Based on Chord 2. Based on IP-multicast Uses locators and a reference server to map a value reference to a location independant value.

15 XMLStore architechture Overview Layered architechture Application layer DVM layer Disk layer A concrete XMLStore is build with plugable modules.

16 Layers in XMLStore ”SPEECH” Name server: 6FE02A 42.63.145.108:6949/XAA/42,8 5A7012,87D311 Value reference (hashed value) Lookup (p2p routing) load Locator Value Lookup Document XMLStore

17 Modules (1) XMLStore is organized in a modular way. Funtionality can be added using decorators: LoadSave 9A01 F045 1234 Save Load Spawns thread

18 Modules (2) Example modules: Buffering Caching Asynchronous operation Replication (peer-to-peer) distribution Garbage collection

19 Name service Binds a human readable name to a value reference. Must provide provide destructive updates Lost update problem Pessimistic locking Optimistic concurrency control Should be Atomic

20 Distributed name service

21 Garbage collection in XMLStore Problem: Since values cannot be deleted from XMLStore, it could eventually be flooded. The solution: Garbage collection! Garbage collection in XMLStore is concerned with reclaiming values that cannot be reached using references.

22 Garbage collection Live values - can be reached using an existing value reference. The existing value references comprise the ”Root set” Mutator – A program that accesses memory Collector – The garbage collector Local vs. Global garbage collection Different approaches Reference counting Reference listing Tracing

23 Garbage collection 1234 F045 9A01 F3B2 ”foo” ”bar” FF01”foobar” Name server 9A01 F045 1234 … … F3B2 FF01 F3B2 … … 1 1 1 1 1 …0 StubSkeleton Reference count

24 Garbage collection XMLStore needs extended API to to keep track of value references.

25 Garbage collection Reference counting Basic idea: count the number of references to a given object, and reclaim it when the count reaches zero. A reference count is associated with each value occurence Scales well Doesn’t prevent cycles This is not a problem since XMLStore contains only acyclic data structures No resilience to lost messages Low fault tolerance

26 Garbage collection Reference listing Each value occurence has a separate skeleton for each client… Mapping of peers to value references F3B2 Client A Client B Peer hamlet Skeleton

27 Garbage collection Tracing Live objects are recursively traced from the roots and unreachable objects are determined to be garbage Stop-and-collect vs. Incremental collection Group based tracing Pros and cons Can detect cycles Scalability issues

28

29 Approach adapted for xmlstore Local garbage collection Reference listing Tracing (copying collector).. So cycles can be collected (only relevant with cells/mutable data) Global garbage collection Tracing

30 Summary


Download ppt "XML Store Christian Theil Have, René Kofoed, References: Kasper Pedersen & Jesper Pedersen, Value-oriented."

Similar presentations


Ads by Google