1 / 43

Oak , the Architecture of the new Repository

Oak , the Architecture of the new Repository. Michael Dürig, Adobe Research. Design goals. Scalable Big repositories Clustering Customisable, flexible OSGi friendly. Outline. CRUD Changes Search. Tree model. a. d. b. c. Updating. ?. a. d. b. c. x. MVCC. HEAD. r1: /.

lave
Download Presentation

Oak , the Architecture of the new Repository

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. Oak, the Architecture of the new Repository Michael Dürig, Adobe Research

  2. Design goals • Scalable • Big repositories • Clustering • Customisable, flexible • OSGi friendly

  3. Outline • CRUD • Changes • Search

  4. Tree model a d b c

  5. Updating ? a d b c x

  6. MVCC HEAD r1: / r2: / a d r1: /d r2: /d b c r1: /a/b r2: /a/b r2: /d/x

  7. Refresh and Garbage Collection

  8. Refresh garbage

  9. Garbage collection garbage

  10. Concurrency and Conflicts

  11. Concurrent updates r2a r1 r2b

  12. Merging r2a merge upates r1 r3 r2b

  13. Conflict handling: serialisation • Fullyserialised • Fail, no concurrent update • Partially serialised • Concurrent conflict free updates

  14. Conflict handling strategies: merging • Partial merge • Conflict markers, deferred resolution • Full merge • Need to choose victim

  15. Replicas and Sharding

  16. Replica and caches master copy full replica cache

  17. Sharding strategies by path by level by hash with caching

  18. Implementations

  19. MicroKernel / NodeStore • Tree / Revision model implementation

  20. Current implementations

  21. Access Control

  22. Accessible paths a d b c

  23. xistentialism E • All paths traversable • Node may not exist • Decorator on NodeStore • root.getChildNode("a").exists(); • root.getChildNode("a") • .getChildNode("b").exists(); ⟹ false ⟹ true

  24. Comparing Revisions

  25. Content diff • What changed between trees • Cornerstone for • Validation • Indexing • Observation • …

  26. What changed?

  27. Example: merging ∆ • r1 ➞ r2a“a” modified • “b” removed r2a r1 r3 ∆ r2b • r1 ➞r2b • “d” modified • “x” added

  28. Commit Hooks

  29. Commit hooks • Key plugin mechanism • Higher level functionality • Validation (node type, access control, …) • Trigger (auto create, defaults, …) • Updates (index, …)

  30. Editing a commit ∆ ∆ + x

  31. Commit hooks • Based on content diff • pass a commit • fail a commit • edit a commit • Applied in sequence

  32. Type of hooks

  33. Observers

  34. Observers • Observe changes • After commit • Often does a content diff • Asynchronous • Optionally synchronous • Local cluster node only

  35. Examples • JCR observation • External index update • Cache invalidation • Logging

  36. Search

  37. Query Engine parse execute post process SELECT WHERE x=y Parser Index /a//* Parser Index Parser Index Parser Traverse

  38. Index Implementations • Property (ordered) • Reference • Lucene • In-content or file system • Solr • Embedded or external

  39. Big Picture

  40. Big picture JCR API Plugins Oak JCR Oak API Oak Core NodeStore API MicroKernel

  41. Resources http://jackrabbit.apache.org/oak/

  42. Appendix

  43. Resources http://jackrabbit.apache.org/oak/ http://jackrabbit.apache.org/oak/docs/ https://svn.apache.org/repos/asf/jackrabbit/oak/trunk/

More Related