• Like
JCR and ModeShape
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

JCR and ModeShape

  • 4,608 views
Published

Content Repository for Java API, ModeShape project, and jboss.org - talk from Red Hat Developer Conference 2011 (Brno, Czech republic)

Content Repository for Java API, ModeShape project, and jboss.org - talk from Red Hat Developer Conference 2011 (Brno, Czech republic)

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
4,608
On SlideShare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
90
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • DB: structure, integrity, query FS: stream, locking, access control, hierarchy New: unstructured, versioning, search, events Typical use: ... test management systems
  • In a writable repository a node's primary type is first assigned upon node creation, while mixin types may be assigned on creation or during a node's lifetime. Repository implementations may vary as to how flexible they are in allowing changes to the primary or mixin node types assigned to a node. . Primary type ~= Class, Mixin Type ~= Interface . nt:base, jcr:primaryType, . nt:hierarchyNode => nt:file, nt:folder, nt:resource, nt:address, ... . mix:referenceable, mix:created, mix:mimeType, mix:language .
  • Xpath and JCR-SQL deprecated in JCR 2.0 . Nodes appear as rows in those tables that correspond to the node’s types - a node can appear as a row in multiple tables - often a complete picture of a node requires joining multiple tables - other joins are possible, such as ancestors, descendants, equivalent properties . JQOM = Java Query Object Model (mapping of AQM to Java API) javax.jcr.query.qom.* .
  • Search & Query: most implementations automatically indexes the content (Jackrabbit and ModeShape use Lucene)
  • eXo-JCR has been donated to the JBoss Community by eXo Platform
  • JDBC via JPA/Hibernate . Infinispan – data grid platform (CLOUD!!!) . E.g. transient or filesystem for light-weight apps (or development), Database (JPA) for production
  • Connectors: other JCR,
  • Mapping (projection) of R1:W1 -> F:Wa, F1:W2 -> F:Wb, R2:W1 -> F:Wc, ...
  • ZIP (JAR, WAR, EAR): nt:file + nt:folder Java source/class: nt:unstructured for package – class name, annotations, constructors, methods, fields – class:* namespace MS Office: structure via POI library Image: jcr:mimeType, jcr:encoding, image:formatName, image:width, image:height, image:bitsPerPixel, image:progressive, image:numberOfImages, image:physicalWidthDpi, image:physicalHeightDpi, image:physicalWidthInches, image:physicalHeightInches Not sure about EXIF data TEIID sequencers (Teiid = data virtualization) Text sequencers (delimiter, fixed width)
  • RESTful service: JSON responses (HTML, XML planned), uses RESTEasy . WebDAV: mount repository as network share . JDBC driver – it has many limitations, not full JDBC – workspace in URL is optional, driver connects to the default workspace if missing . JOPR/RHQ – managment tool .
  • Imagine the situation: You have to develop search solution for your company data – partially in SQL databases, partially in SAP, some data on filesystem (MS Office docs), ... Then you can develop all parsers, connectors etc. on your own – or you will use JCR API in your “search engine” and ModeShape with its connectors, sequencers and federationm for accessing the data.
  • They fleed to GitHub but the rest of the infrastructure is on jboss.org
  • 4.2.2 is considered experimental . Performance issues, to be solved in ModeShape 2.5 .
  • In SOA-Platform 5.1 to be released in few days . In BRMS 5.1.1 or 5.2 (5.1 to be released as ^^^) .

Transcript

  • 1. Content Repository API for Java ™ (JCR) & ModeShape Jozef Chocholáček @jchochol JBoss Community Team
  • 2. Agenda
    • JCR – what is it (good for)
    • 3. ModeShape – beyond JCR
    • 4. How do we use JCR and ModeShape
  • 5. JCR Content Repository API for Java ™
    • Simple answer: JSR-170, JSR-283 -> javax.jcr API
    • 6. OK, few more details:
      • Abstracts where and how the content is stored
      • 7. Best things from databases and file systems + additional features
    • Typical uses: CMS, portals, knowledge bases, artifact repositories, ...
  • 8. JCR Basic Concepts
  • 20. JCR API Example
  • 21. JCR Node Types
    • Defines the structure of the node
    • 22. Supertype(s)
    • 23. Primary node type / mixin node type
    • 24. Property names and types
      • STRING, URI, BOOLEAN, LONG, DOUBLE, DECIMAL, BINARY, DATE, NAME, PATH, REFERENCE, WEAKREFERENCE
    • Child nodes and their (node) types
  • 25. JCR Node Type Example
  • 26. JCR Query Languages
    • JCR-JQOM
    SQL JCR-SQL2 table node type column property row node
  • 29. JCR JCR-SQL2 Examples
  • 30. JCR JCR-JQOM Example
  • 31. JCR Advantages (Why To Use JCR)
    • Standard API
    • 32. Flexible data structure
    • 33. Hierarchical graph-based storage
    • 34. Search & query
    • 35. Versioning
    • 36. Access control
    • 37. Referential integrity, locking, events, ...
  • 38. JCR Implementations
    • Jackrabbit (Apache)
    • 39. CRX (Day Software / Adobe)
    • 40. ModeShape
    • Alfresco
    • 41. eXo Platform (donated to the Jboss Community)
    • 42. Oracle Beehive
  • 43. ModeShape
    • JCR 2.0 implementation (all required & most of the optional features)
    • 44. Own Graph API
    • 45. Sequencers
    • 46. Connectors (storage/access)
    • 47. Federation
    • 48. RESTful API
    • 49. Clustering
    • 50. ...
  • 51. ModeShape Storage Options
    • Multiple out-of-the-box connectors
    • 52. Easy to write your own connector
  • 53. ModeShape Connectors
    • Use JCR API to access data from other systems (but leave the data where it is)
    • 54. E.g. filesystem, Subversion, JBDC metadata, ...
  • 55. ModeShape Federation
    • Virtual repository with projected workspaces from real repositories
    • 56. Use the best data store for each kind of data
    • 57. Combination of own and external data
    • 58. Consistent use of JCR API
  • 59. ModeShape Sequencers
    • Extract meaningful data from various file formats
    • 60. Many out-of-the-box:
      • ZIP, JAR, EAR, WAR files
      • 61. Java class and source files
      • 62. DDL files
      • 63. XML files
      • 64. Microsoft Office documents
      • 65. Image metadata (JPEG, GIF, BMP, PCX, PNG, IFF, ...)
      • 66. MP3
      • 67. and more
    • Easy to implement custom sequencers
  • 68. ModeShape Extended JCR-SQL2
    • ModeShape supports complete JCR-SQL2 language as defined in specification, plus:
      • Additional joins ( FULL OUTER, CROSS )
      • 69. Subqueries in criteria
      • 70. SELECT [DISTINCT]
      • 71. UNION/INTERSECT/EXCEPT [ALL]
      • 72. LIMIT and OFFSET
      • 73. DEPTH and PATH criteria
      • 74. REFERENCE criteria
      • 75. IN and NOT IN
      • 76. BETWEEN val1 [EXCLUSIVE] AND val2 [EXCLUSIVE]
      • 77. Arithmetic expressions in criteria
  • 78. ModeShape Other Features
    • RESTful service
    • 79. WebDAV service
    • 80. JDBC driver
      • Connects to one workspace
      • 81. jdbc:jcr:http://{hostname}:{port}/modeshape-rest/?repositoryName={name}&user=...
    • JOPR RHQ plugin
    • 82. Eclipse plugin (JBoss Tools)
  • 83. ModeShape Why Use ModeShape?
    • Use the data you already have
    • 84. Leave the data where it is
    • 85. Sequencers (automatized extraction of content)
    • 86. Federation
    • 87. Standard JCR API – and beyond
    • 88. Light-weight, embeddable, clusterable
    • 89. Fast development process
    • 90. Backed up by a big open-source company
  • 91. jboss.org JCR, ModeShape and jboss.org
    • http://www.jboss.org/modeshape
    • 92. Old name was JBoss DNA
    • 93. Work in progress on empowering JBoss Community services with the strength of ModeShape
      • downloads.jboss.org
      • 94. docs.jboss.org
      • 95. search.jboss.org
    • Use in other JBoss projects/products
  • 96. jboss.org Magnolia CMS & ModeShape
    • JCR based open-source (Java) CMS
    • 97. By default on Apache Jackrabbit
    • 98. Modular
    • 99. From v.4.2.2 supports ModeShape
    • 100. Goal: “Native” support for downloads.jboss.org
  • 101. jboss.org ModeShape & JBoss Projects
  • 106. Summary
    • JCR API is standard, simple and easy-to-use
    • 107. ModeShape is JCR implementation, and adds important extensions
    • 108. jboss.org eats its own dogfood ;-)
  • 109. Links
    • http://www.jboss.org/modeshape
    • 110. http://www.jcp.org/en/jsr/detail?id=283
    • 111. http://www.magnolia-cms.com/
    • 112. Freenode IRC: #modeshape
    • 113. Twitter:
    @modeshape @magnolia_cms @jbossorg @jchochol
  • 114.  
  • 115. Questions ?
  • 116. Thank You!
  • 117. D2 D3 A107 9:00-9:45 Perl packaging for developers – Marcela Mašláňová MythTV - User view – Lukáš Doktor 9:50-10:35 Java packaging for developers – Stanislav Ochotnicky Gnome 3.0 (r)evolution - Tomáš Bžatek 10:40-11:25 JCR + ModeShape - Jozef Chocholáček Plasma Workspaces 4 by KDE – Lukáš Tinkl, Jaroslav Řezník Power management – Jaroslav Škarvada, Jan Včelák 11:30-12:30 Lunch Lunch Lunch 12:30-13:15 Planning and Scheduling with Drools - Lukáš Petrovický Spice - Jonathan Blandford Introduction to Qt development – Jaroslav Řezník 13:20-14:05 Teiid - data virtualization system - Boris Belovic Beyond init: systemd - Lennart Poettering Remote Desktop – Adam Tkáč 14:10-14:55 PicketLink and PicketBox - Peter Škopek Discussion: Bootloader and Dracut Future Plans - Harald Hoyer (session ends 10 minutes sooner) Bug hunting & static analysis – Ondřej Vašík and Petr Muller 15:00-15:45 Web Services for Remote Portlets - Michal Vančo System vs. Session – David Zeuthen 15:50-16:35 Infinispan : The future of open source data grids – Radoslav Husár, Michal Linhard SysVinit, upstart and systemd in Fedora and RHEL – Petr Lautrbach 16:40-17:25 Deltacloud API – Michal Fojtik Modern Linux Desktop alphabet – Tomáš Bžatek, Jaroslav Řezník