The Java Content Repository

2,244 views

Published on

Published in: Technology
0 Comments
7 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,244
On SlideShare
0
From Embeds
0
Number of Embeds
26
Actions
Shares
0
Downloads
96
Comments
0
Likes
7
Embeds 0
No embeds

No notes for slide

The Java Content Repository

  1. 1. The Java Content Repository Andreas Hartmann CTO, BeCompany GmbH
  2. 2. Agenda Primer: Content- vs. behaviour-orientation What is a content repository? The Java Content Repository Jackrabbit
  3. 3. Primer: Content- vs. Behaviour-Orientation
  4. 4. Behaviour vs. Content WWW Applications Simple Complex Standards-based Proprietary Build your own Fix set of functions Coarse-grained Fine-grained Integration: O(n) Integration: O(n²)
  5. 5. Integration through Behaviour
  6. 6. Integration through Content
  7. 7. Server Applet Desktop feed.getPosts() Dojo feed.add(post) Posts post.setTitle(…) post.setAuthor(…) Flex feed.delete(…) …
  8. 8. Workflow Engine Server Applet States setState() Desktop getState() feed.getPosts() Dojo feed.add(post) Posts post.setTitle(…) post.setAuthor(…) Flex feed.delete(…) …
  9. 9. Workflow Engine Server Applet States Desktop Dojo Posts Console Flex
  10. 10. Google Server Reader Sage Atom Dojo get(uri) : doc Documents post(uri, doc) put(uri, doc) Flex delete(uri)
  11. 11. Workflow Google Server Engine Reader Sage Atom Dojo Documents Console Flex
  12. 12. Content Orientation … Enforces simplicity Encourages standardization (think SOA) Allows applications to involve independently from each other Improves scalability and reuse of infrastructure
  13. 13. Content Orientation … May be inappropriate for complex processes Requires content processing facilities in each involved application (good availability for content formats based on open standards) Can increase network traffic
  14. 14. What is a Content Repository?
  15. 15. Why a Repository Standard? Portability → no vendor lock-in Shared vocabulary for developers Reuse of experience, code, tools, …: True content repository infrastructure Increased independence, reduced risk
  16. 16. Customers Now: „Vendor A had a nice GUI, but the back-end doesn‘t scale. Vendor B had a great back-end, but the front-end is unusable.“ With JCR: „We can choose the front-end vendor independently from the back-end vendor. And when we need a bigger back- end, we can exchange it without having to train the users again.“
  17. 17. Vendors Now: „It‘s such a PITA to fix all those concurrency bugs in the back-end. I‘d rather work on this nifty AJAX stuff.“ With JCR: „Since we can just include whatever back-end the customer wants, we can concentrate on providing a magnificent user experience by continuously improving our front-end.“
  18. 18. What is a Content Repository? Application data „super store“ Generic API for content storage: CRUD + locking, versioning, transactions, observation Access control Powerful search
  19. 19. API, not Product Well-defined, closed set of features Documentation about expected behaviour Abstraction from implementation: Choose whatever storage facility is appropriate - file system, RDBMS, … or even mix them in your repository
  20. 20. Today: Separated Content Silos WCMS CRM Project Mgmt Oracle MySQL File System
  21. 21. Towards a JCR Infrastructure WCMS CRM Project Mgmt JSR 170 API JCR Connectors Oracle MySQL File System
  22. 22. JCR Infrastructure WCMS CRM Project Mgmt JSR 170 API JCR Repository
  23. 23. Choosing a Back-End How easily can I implement a connector? Versioning: FS easy, RDMBS difficult Transactions: FS difficult, RDMBS easy Performance Manageability
  24. 24. Repository Deployment Models (Jackrabbit) A) Inside the application B) As application inside the container Referenced via JNDI, accessed via JCR C) As standalone server Communication via SOAP, DAV, RMI, … Accessed via JCR stub
  25. 25. Content Model Features Structured: Mandatory/optional elements Unstructured: Store what you like Content types (textual, binary, …) Relationships with integrity control
  26. 26. The Java Content Repository JSR-170 = JCR 1.0 (Final Release) JSR-283 = JCR 2.0 (Public Review)
  27. 27. Content Model Repository Workspaces (shared version store) a) working copies for users b) authoring/staging/live c) … Tree of nodes Properties
  28. 28. Nodes 1 primary node type e.g., nt:file, nt:unstructured 0..* mixin node types e.g., mix:versionable, mix:referenceable Properties (key-value pairs) string, binary, date, double, long, boolean, name, path, reference
  29. 29. Node Types Hierarchical (inheritance) Child node definitions: Default+required node types for children same name siblings allowed (true|false) Property definitions: Required type, multiple (true|false), value constraints, default values
  30. 30. Level 1 Initiate a session with a workspace (login) Retrieve and traverse nodes and properties Read the values of properties Export to XML XPath queries
  31. 31. Level 2 Add and remove nodes and properties Write the value of properties Assign node types to nodes Import from XML
  32. 32. Optional Locking Transactions (Java Transaction API) Versioning (directed acyclic graph) Observation SQL queries
  33. 33. Implementations Apache Jackrabbit (Reference Impl.) Jeceira eXo Platform Alfresco Day CRX (commercial)
  34. 34. Jackrabbit Persistence managers (back-ends): In-memory: fast, but not persistent Serialized objects: good performance XML: human-readable, good for testing RDBMS: good performance, scalable Hibernate pers. mgr. from JBoss project: Clustering, transactions, better caching Lucene for indexing
  35. 35. JSR-283: JCR 2.0 Management facilities for Access permissions Workspaces Node Types Meta data I18n

×