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
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
http://robert.muntea.nu @rombert
Before we begin - some key terms
● JCR● Apache Jackrabbit● Apache Jackrabbit Oak
http://robert.muntea.nu @rombert
Agenda
● Content● Repository● Scale● 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
http://robert.muntea.nu @rombert
Content - Hierarchy
blog
hello-world
images
jcr:content
some-cat.jpg
other-cat.jpg
media
cats-singing.ogg
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
http://robert.muntea.nu @rombert
Repository – the Content Repository Api for Java
http://robert.muntea.nu @rombert
Repository – who implements the JCR standard
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
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
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
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
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
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
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
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
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
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
http://robert.muntea.nu @rombert
Scaling – BlobStore implementations
● FileBlobStore● MongoBlobStore● S3DataStore● FileDataStore● CloudBlobStore ( experimental )● MongoGridFSBlobStore ( experimental )
http://robert.muntea.nu @rombert
Cloud
● Blob storage● S3DataStore● CloudBlobStore ( experimental )
● Node storage● MongoMK
● DevOps friendliness● Easy deployment with oak-run or Apache Sling
http://robert.muntea.nu @rombert
Wrapping up
● Content● Repository● Scale● Cloud
http://robert.muntea.nu @rombert
Resources
● https://jackrabbit.apache.org/oak ● https://jackrabbit.apache.org/ ● https://sling.apache.org/
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
Top Related