Top Banner
http://robert.muntea.nu @rombert Apache Jackrabbit Oak – Scale your content repository to the cloud Apache Jackrabbit Oak Scale your content repository to the cloud Robert Munteanu http://robert.muntea.nu
26

Apache Jackrabbit Oak - Scale your content repository to the cloud

May 10, 2015

Download

Technology

Robert Munteanu

Apache Jackrabbit Oak is a content repository which supports the most desired features from both SQL and NoSQL approaches. Some of its key features include ACLs, versioning, efficient blob storage, transactions, structured and unstructured content and multiple query languages.

This talk introduces Oak as a new implementation of the Content Repository API for Java, rewritten from scratch to ensure that it can scale out to support massive content repositories.

You will find out how you can start using Oak now to support use cases as varied as content management, document management, digital asset management or business rule management systems.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Apache Jackrabbit Oak – Scale your content repository to the cloud

Apache Jackrabbit OakScale your content repository to the cloud

Robert Munteanuhttp://robert.muntea.nu

Page 2: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Who I am

$DAYJOB Adobe Experience

Manager− Apache Sling− Apache Jackrabbit− Apache Felix

FOSS MantisBT Mylyn Connector for

MantisBT Mylyn Connector for Review

Board Apache Sling

Page 3: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Before we begin - some key terms

● JCR● Apache Jackrabbit● Apache Jackrabbit Oak

Page 4: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Agenda

● Content● Repository● Scale● Cloud

Page 5: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Content – What is content?

Page 6: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Content – Node type defintions

[nt:resource] > mix:referenceable- jcr:encoding- jcr:mimeType mandatory- jcr:data (binary) mandatory- jcr:lastModified (date) mandatory ignore

[nt:unstructured] orderable- * (UNDEFINED)- * (UNDEFINED) multiple+ * = nt:unstructured multiple VERSION

Page 7: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Content - Hierarchy

blog

hello-world

images

jcr:content

some-cat.jpg

other-cat.jpg

media

cats-singing.ogg

Page 8: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Content - Properties

some-cat.jpg

- jcr:primaryType = app:asset- jcr:title = Some Cat- jcr:description = A longer description of this picture of a cat- jcr:created = 2014-06-03T00:00:00.000+02:00- jcr:lastUpdated = 2014-06-03T11:00:00.000+02:00- tags = [Animal, Cat, Color]- width = 400- height = 600

Page 9: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – the Content Repository Api for Java

Page 10: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – who implements the JCR standard

Page 11: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – who interfaces with JCR

Page 12: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – Apache Jackrabbit Oak

● Open Source implementation of JCR● Developed under the Jackrabbit umbrella● Not “only” fast, but built to scale from the ground up● Aims to be a successor of Jackrabbit in a later version● #7 most active project in the ASF, according to Ohloh

Page 13: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – Digital Asset Management Sample

images

some-cat.jpg

renditions

small.jpg

annotations

initial-review

Uploaded by author

Event-based generation

Restricted by ACLs

ripple.jpg

Page 14: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – storing configurations

etc

rendition

ripple

- orientation = /etc/rendition/ripple/options ↵/vertical- antialiasing = true- edges = /etc/rendition/ripple/options/wrap- wave type = /etc/rendition/ripple/options/ ↵wave_type- period = 20- amplitude = 5- phase shift = 0

Page 15: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – Adding Apache Sling to the mix

images

some-cat.jpg

renditions

small.jpg

annotations

initial-review

http://oak/images/some-cat.jpghttp://oak/images/some-cat.pdf

http://oak/images/some-cat/renditions.zip

http://oak/images/some-cat/annotations.odt

ripple.jpg

Page 16: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – Invoice Management Sample

invoices

$BIGCLIENT

2014

ABC-00014

original.pdf

renditions

jcr:content

Access restricted by ACLs

Used for previews

Changes denied by ACLs

Page 17: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Repository – Content Management Sample

par_2_with_image

- jcr:description = “Lorem ipsum...”

- image = /content/images/cats/tabby.jpg

blog

hello-world

jcr:content

heading_1

par_1

par_2_with_image

par_3

Page 18: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Scaling – Oak topologies

TarMK● Standalone● Fast● Easy to maintain● Supports failover● No horizontal scalability

MongoMK● Horizontally scales for read and write access● Supports failover● Not as fast as TarMK

Page 19: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Scaling – MongoMK standalone

Oak Server 1

Mongo Primary

Oak Server 2 Oak Server 3

Read and write

Read and write

Read and write

Page 20: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Scaling – MongoMK replica sets

Mongo Primary

Oak Server 1

Read and write

Oak Server 2

Mongo Secondary

Oak Server 3

Read

Read

Write

Mongo Primary

Read and write

Write

Mongo Secondary

Page 21: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Scaling – MongoMK Sharding

Oak Server 1+ mongos

Mongo Primary

Oak Server 2+ mongos

Read and write

Read and write

Oak Server 3+ mongos

Mongo Shard Primary

Oak Server 4+ mongos

Read and write

Read and write

Mongo Shard Primary

Read and write

Read and write

Page 22: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Scaling – BlobStore implementations

● FileBlobStore● MongoBlobStore● S3DataStore● FileDataStore● CloudBlobStore ( experimental )● MongoGridFSBlobStore ( experimental )

Page 23: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Cloud

● Blob storage● S3DataStore● CloudBlobStore ( experimental )

● Node storage● MongoMK

● DevOps friendliness● Easy deployment with oak-run or Apache Sling

Page 24: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Wrapping up

● Content● Repository● Scale● Cloud

Page 25: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Resources

● https://jackrabbit.apache.org/oak ● https://jackrabbit.apache.org/ ● https://sling.apache.org/

Page 26: Apache Jackrabbit Oak - Scale your content repository to the cloud

http://robert.muntea.nu @rombert

Credits

● Icons courtesy of the Tango Icon Library - http://tango.freedesktop.org/Tango_Icon_Library● Images courtesy of http://www.freedigitalphotos.net