SlideShare a Scribd company logo
APACHE SLING & FRIENDS TECH MEETUP
BERLIN, 23-25 SEPTEMBER 2013
Distributed Eventing and Jobs
Carsten Ziegeler | Adobe Research Switzerland
1
About
2
§  RnD Team at Adobe Research Switzerland
§  Co-founder Adobe Granite
§  OSGi Core Platform and Enterprise Expert
Groups
§  Member of the ASF
§  Current PMC Chair of Apache Sling
§  Apache Sling, Felix, ACE
§  Conference Speaker
§  Technical Reviewer
§  Article/Book Author
Overview
3
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Overview
4
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
OSGi Event Admin
Publish Subscribe Model
5
OSGi	
  Event	
  Admin	
  Component	
  A	
  
publish
deliver
Component	
  X	
  
Component	
  Y	
  
OSGi Event Admin
Publish Subscribe Model
6
§  OSGi event is a data object with
§  Topic (hierarchical namespace)
§  Properties (key-value-pairs)
§  Resource Event
§  Topic:
org/apache/sling/api/resource/Resource/ADDED
§  Properties: path, resource type etc.
OSGi Event Admin
Publish Subscribe Model
7
§  Publisher creates event object
§  Sends event through EventAdmin service
§  Either sync or async delivery
§  Subscriber is an OSGi service
(EventHandler)
§  Service registration properties
§  Interested topic(s)
§  org/apache/sling/api/resource/Resource/*	
  
§  Additional filters (optional)
§  (path=/libs/*)	
  
OSGi Event Admin
Publish Subscribe Model
8
§  Immediate delivery to available
subscribers
§  No guarantee of delivery
§  No distributed delivery
OSGi Event Admin
Publish Subscribe Model
9
§  Immediate delivery to available
subscribers
§  No guarantee of delivery
§  No distributed delivery
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Overview
10
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Overview
11
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Installation Scenarios
12
Clustered	
  JCR	
  
Single	
  
Instance	
  
JCR	
  
Instance	
  
1	
  
Instance	
  
2	
  
Instance	
  
3	
  
Topologies I
Apache Sling Discovery
13
Clustered	
  JCR	
  JCR	
  
ID	
  :	
  A	
   ID	
  :	
  X	
   ID	
  :	
  42	
  ID	
  :	
  1	
  
Single	
  
Instance	
  
Instance	
  
1	
  
Instance	
  
2	
  
Instance	
  
3	
  
§  Instance: Unique Id (Sling ID)
Topologies I
Apache Sling Discovery
14
§  Instance: Unique Id (Sling ID)
§  Cluster: Unique Id and leader
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  	
  	
  	
  	
  	
  	
  Cluster	
  35	
  
Clustered	
  JCR	
  JCR	
  
ID	
  :	
  A	
   ID	
  :	
  X	
   ID	
  :	
  42	
  ID	
  :	
  1	
  
Single	
  
Instance	
  
Instance	
  
1	
  
Instance	
  
2	
  
Instance	
  
3	
  
Leader	
   Leader	
  
Topologies I
Apache Sling Discovery
15
§  Topology: Set of clusters
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  	
  	
  	
  	
  	
  	
  Cluster	
  35	
  
Clustered	
  JCR	
  JCR	
  
ID	
  :	
  A	
   ID	
  :	
  X	
   ID	
  :	
  42	
  ID	
  :	
  1	
  
Single	
  
Instance	
  
Instance	
  
1	
  
Instance	
  
2	
  
Instance	
  
3	
  
Leader	
   Leader	
  
Topology	
  Topology	
  
 
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  	
  	
  	
  	
  	
  	
  Cluster	
  35	
  
Topologies I
Apache Sling Discovery
16
Clustered	
  JCR	
  JCR	
  
ID	
  :	
  A	
   ID	
  :	
  X	
   ID	
  :	
  42	
  ID	
  :	
  1	
  
Single	
  
Instance	
  
Instance	
  
1	
  
Instance	
  
2	
  
Instance	
  
3	
  
Leader	
   Leader	
  
Topology	
  
§  Topology: Set of clusters
Topologies II
Apache Sling Discovery
17
§  Instance
§  Sling ID
§  Optional:
Name and description
§  Belongs to a cluster
§  Might	
  be	
  the	
  cluster	
  leader	
  
§  Additional distributed properties
§  Extensible	
  through	
  own	
  services	
  
(PropertyProvider)	
  
§  E.g.	
  data	
  center,	
  region	
  or	
  enabled	
  job	
  topics	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
ID	
  :	
  42	
  
Instance	
  
3	
  
Topology	
  
Lead
er	
  
Topologies II
Apache Sling Discovery
18
§  Cluster
§  Elects (stable) leader
§  Stable instance ordering
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
ID	
  :	
  42	
  
Instance	
  
3	
  
Topology	
  
Lead
er	
  
Topologies II
Apache Sling Discovery
19
§  TopologyEventListener
§  Receives events on
topology changes
§  Topology is changing
§  Topology changed
§  Properties changed
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
	
  
Cluster	
  99	
  
ID	
  :	
  42	
  
Instance	
  
3	
  
Topology	
  
Lead
er	
  
Overview
20
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Job Handling I
Apache Sling Job Handling
21
§  Job : Guaranteed processing,
exactly once
§  Exactly one job consumer
§  Started by client code, e.g. for
replication, workflow...
§  Job topic
§  Payload is a serializable map
Job Handling I
Apache Sling Job Handling
22
§  Sling Job Manager handles and
distributes jobs
§  Delivers job to a job consumer…
§  …and waits for response
§  Retry and failover
§  Notification listeners (fail, retry,
success)
Starting / Processing a Job I
Apache Sling Job Handling
23
public interface JobConsumer {	
	
String PROPERTY_TOPICS = "job.topics";	
	
enum JobResult {	
OK,	
FAILED,	
CANCEL,	
ASYNC	
}	
	
JobResult process(Job job);	
}	
  
public interface JobManager {	
	
Job addJob(String topic, String optionalName, Map<String, Object> properties);	
…	
}	
  
Star3ng	
  a	
  job	
  
Processing	
  a	
  job	
  
Note:	
  Star3ng/processing	
  of	
  jobs	
  through	
  Event	
  Admin	
  is	
  deprecated	
  but	
  s3ll	
  supported	
  
Starting / Processing a Job II
Apache Sling Job Handling
24
@Component	
@Service(value={JobConsumer.class})	
@Property(name=JobConsumer.PROPERTY_TOPICS, value="org/apache/sling/jobs/backup")	
public class BackupJobConsumer	
implements JobConsumer {	
	
	
@Override	
public JobResult process(final Job job) {	
// do backup	
return JobResult.OK;	
}	
}
Job Handling I
Apache Sling Job Handling
25
•  New jobs are immediately persisted
•  Jobs are “pushed” to the processing
instance
•  Processing instances use different
queues
•  Associated with job topic(s)
•  Main queue
•  0..n custom queues
Job Queue I
Apache Sling Job Handling
26
•  Queue is configurable
•  Queue is started on demand in own
thread
•  And stopped if unused for some time
Job Queue II
Apache Sling Job Handling
27
•  Queue Types
•  Ordered queue
•  Parallel queues: Plain and Topic Round
Robin
Job Queue III
Apache Sling Job Handling
28
•  Limit for parallel threads per queue
•  Number of retries (-1 = endless)
•  Retry delay
•  Thread priority
Additional Configurations
Apache Sling Job Handling
29
•  Job Manager Configuration = Main
Queue Configuration
•  Maximum parallel jobs (15)
•  Retries (10)
•  Retry Delay
•  Eventing Thread Pool Configuration
•  Used by all queues
•  Pool size (35) = Maximum parallel jobs for
a single instance
Monitoring – Web Console
Apache Sling Job Handling
30
Monitoring – Web Console
Apache Sling Job Handling
31
Job Distribution I
Apache Sling Job Distribution
32
•  Each instance determines enabled job
topics
•  Derived from Job Consumers (new API
required)
•  Can be whitelisted/blacklisted (in Job
Consumer Manager)
•  Announced through Topology
Job Distribution II
Apache Sling Job Distribution
33
•  Job Distribution depends on enabled
job topics and queue type
•  Potential set of instances derived from
topology (enabled job topics)
•  Ordered: processing on leader only, one job
after the other
•  Parallel: Round robin distribution on all
potential instances
§  Local	
  cluster	
  instances	
  have	
  preference	
  
Job Distribution III
Apache Sling Job Distribution
34
•  Failover
•  Instance crash: leader redistributes jobs to
available instances
§  Leader	
  change	
  taken	
  into	
  account	
  
•  On enabled job topics changes:
potential redistribution
Sling Job Distribution
35
Topology	
  
Instance	
  
Sling	
  ID:	
  1	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  2	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  3	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  4	
  
Job	
  Manager	
  
Job	
  Consumer	
  
Topic:	
  A	
  
Job	
  Consumer	
  
Topic:	
  B	
  
Job	
  Consumer	
  
Topic:	
  C	
  
Sling Job Distribution
36
Instance	
  
Sling	
  ID:	
  1	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  2	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  3	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  4	
  
Job	
  Manager	
  A	
  
Job	
  Consumer	
  
Topic:	
  A	
  
Job	
  Consumer	
  
Topic:	
  B	
  
A:2	
  
Job	
  Consumer	
  
Topic:	
  C	
  Job	
  
Topology	
  
Sling Job Distribution
37
Instance	
  
Sling	
  ID:	
  1	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  2	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  3	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  4	
  
Job	
  Manager	
  B	
  
Job	
  Consumer	
  
Topic:	
  A	
  
Job	
  Consumer	
  
Topic:	
  B	
  
B:3	
  
Job	
  Consumer	
  
Topic:	
  C	
  Job	
  
Topology	
  
Sling Job Distribution
38
Instance	
  
Sling	
  ID:	
  1	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  2	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  3	
  
Job	
  Manager	
  
Instance	
  
Sling	
  ID:	
  4	
  
Job	
  Manager	
  C	
  
Job	
  Consumer	
  
Topic:	
  A	
  
Job	
  Consumer	
  
Topic:	
  B	
  
C:4	
  
Job	
  Consumer	
  
Topic:	
  C	
  Job	
  
?	
  
Topology	
  
Discovery and Eventing
39
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Discovery and Eventing – What’s Next?
40
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
New	
  OSGi	
  Specifica-on	
  
	
  
•  Distributed	
  Even3ng	
  
•  Cloud	
  Compu3ng	
  
Discovery and Eventing – What’s Next?
41
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Job	
  Distribu-on	
  
	
  
•  Improved	
  load	
  balancing	
  
•  Pull	
  based	
  distribu3on	
  
One More Thing…
42
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  
Job Progress Tracking
Apache Sling Job Processing
43
§  Jobs can inform about
§  Progress (percentage)
§  ETA
§  Additional informational messages
§  All information is persisted
NEW	
  
Improved Failure Handling I
Apache Sling Job Processing
44
§  Currently, no history of jobs
§  Immediately removed once
§  Job succeeds
§  Job is cancelled
§  What happened?
§  What did go wrong?
Improved Failure Handling II
Apache Sling Job Processing
45
§  Cancelled jobs are kept
§  With a reason and log
§  Can be retried
§  Successful jobs can be kept
§  With a message and log
NEW	
  
Discovery and Eventing
46
Discovery	
  Sling	
   Job	
  Distribu3on	
  
Felix	
   OSGi	
  Event	
  Admin	
  
From	
  Even3ng	
  to	
  
Job	
  Processing	
  

More Related Content

What's hot

Rule Engine: Drools .Net
Rule Engine: Drools .NetRule Engine: Drools .Net
Rule Engine: Drools .NetGuo Albert
 
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule SetModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
NGINX, Inc.
 
Solid principles
Solid principlesSolid principles
Solid principles
Dmitry Kandalov
 
Lecture 3 object-oriented design
Lecture 3    object-oriented designLecture 3    object-oriented design
Lecture 3 object-oriented design
Nada G.Youssef
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID Principles
Ganesh Samarthyam
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
Armen Arzumanyan
 
Handling Billions of Edges in a Graph Database
Handling Billions of Edges in a Graph DatabaseHandling Billions of Edges in a Graph Database
Handling Billions of Edges in a Graph Database
ArangoDB Database
 
Java spring batch
Java spring batchJava spring batch
Attack and Mitigation for Insecure Deserialization
Attack and Mitigation for Insecure DeserializationAttack and Mitigation for Insecure Deserialization
Attack and Mitigation for Insecure Deserialization
Sukhpreet Singh
 
Java EE _ JSTL (1).pdf
Java EE _ JSTL (1).pdfJava EE _ JSTL (1).pdf
Java EE _ JSTL (1).pdf
ColombieColombie
 
What is Material UI?
What is Material UI?What is Material UI?
What is Material UI?
Flatlogic
 
Avoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promisesAvoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promises
Ankit Agarwal
 
Serialization & De-serialization in Java
Serialization & De-serialization in JavaSerialization & De-serialization in Java
Serialization & De-serialization in Java
InnovationM
 
Java reflection
Java reflectionJava reflection
Java reflection
NexThoughts Technologies
 
Chapitre 1 introduction generale
Chapitre 1   introduction generaleChapitre 1   introduction generale
Chapitre 1 introduction generale
Amir Souissi
 
Arquitetura orientada a eventos em ambientes complexos tdc
Arquitetura orientada a eventos em ambientes complexos tdcArquitetura orientada a eventos em ambientes complexos tdc
Arquitetura orientada a eventos em ambientes complexos tdc
Paula Santana
 
GraphQL
GraphQLGraphQL
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
raksharao
 
Orion Context Broker 20220526
Orion Context Broker 20220526Orion Context Broker 20220526
Orion Context Broker 20220526
Fermin Galan
 
Spring framework IOC and Dependency Injection
Spring framework  IOC and Dependency InjectionSpring framework  IOC and Dependency Injection
Spring framework IOC and Dependency Injection
Anuj Singh Rajput
 

What's hot (20)

Rule Engine: Drools .Net
Rule Engine: Drools .NetRule Engine: Drools .Net
Rule Engine: Drools .Net
 
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule SetModSecurity and NGINX: Tuning the OWASP Core Rule Set
ModSecurity and NGINX: Tuning the OWASP Core Rule Set
 
Solid principles
Solid principlesSolid principles
Solid principles
 
Lecture 3 object-oriented design
Lecture 3    object-oriented designLecture 3    object-oriented design
Lecture 3 object-oriented design
 
Introduction to SOLID Principles
Introduction to SOLID PrinciplesIntroduction to SOLID Principles
Introduction to SOLID Principles
 
Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)Enterprise JavaBeans(EJB)
Enterprise JavaBeans(EJB)
 
Handling Billions of Edges in a Graph Database
Handling Billions of Edges in a Graph DatabaseHandling Billions of Edges in a Graph Database
Handling Billions of Edges in a Graph Database
 
Java spring batch
Java spring batchJava spring batch
Java spring batch
 
Attack and Mitigation for Insecure Deserialization
Attack and Mitigation for Insecure DeserializationAttack and Mitigation for Insecure Deserialization
Attack and Mitigation for Insecure Deserialization
 
Java EE _ JSTL (1).pdf
Java EE _ JSTL (1).pdfJava EE _ JSTL (1).pdf
Java EE _ JSTL (1).pdf
 
What is Material UI?
What is Material UI?What is Material UI?
What is Material UI?
 
Avoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promisesAvoiding callback hell in Node js using promises
Avoiding callback hell in Node js using promises
 
Serialization & De-serialization in Java
Serialization & De-serialization in JavaSerialization & De-serialization in Java
Serialization & De-serialization in Java
 
Java reflection
Java reflectionJava reflection
Java reflection
 
Chapitre 1 introduction generale
Chapitre 1   introduction generaleChapitre 1   introduction generale
Chapitre 1 introduction generale
 
Arquitetura orientada a eventos em ambientes complexos tdc
Arquitetura orientada a eventos em ambientes complexos tdcArquitetura orientada a eventos em ambientes complexos tdc
Arquitetura orientada a eventos em ambientes complexos tdc
 
GraphQL
GraphQLGraphQL
GraphQL
 
java Unit4 chapter1 applets
java Unit4 chapter1 appletsjava Unit4 chapter1 applets
java Unit4 chapter1 applets
 
Orion Context Broker 20220526
Orion Context Broker 20220526Orion Context Broker 20220526
Orion Context Broker 20220526
 
Spring framework IOC and Dependency Injection
Spring framework  IOC and Dependency InjectionSpring framework  IOC and Dependency Injection
Spring framework IOC and Dependency Injection
 

Similar to Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)

Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
Carsten Ziegeler
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegeler
mfrancis
 
CIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can DoCIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can Do
ICF CIRCUIT
 
Tracing the Breadcrumbs: Apache Spark Workload Diagnostics
Tracing the Breadcrumbs: Apache Spark Workload DiagnosticsTracing the Breadcrumbs: Apache Spark Workload Diagnostics
Tracing the Breadcrumbs: Apache Spark Workload Diagnostics
Databricks
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
Brennan Saeta
 
Spark Summit EU talk by Qifan Pu
Spark Summit EU talk by Qifan PuSpark Summit EU talk by Qifan Pu
Spark Summit EU talk by Qifan Pu
Spark Summit
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
Shiao-An Yuan
 
Scaling Flink in Cloud
Scaling Flink in CloudScaling Flink in Cloud
Scaling Flink in Cloud
Steven Wu
 
Spock
SpockSpock
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
Thanos Zolotas
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptzand3rs
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
DECK36
 
Managing ADLS gen2 using Apache Spark
Managing ADLS gen2 using Apache SparkManaging ADLS gen2 using Apache Spark
Managing ADLS gen2 using Apache Spark
Databricks
 
OSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
OSMC 2012 | Neues in Nagios 4.0 by Andreas EricssonOSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
OSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
NETWAYS
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
Roy Russo
 
NetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talksNetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talks
Ruslan Meshenberg
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an action
Gordon Chung
 
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan GertisThe Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
HostedbyConfluent
 

Similar to Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013) (20)

EVOLVE'13 | Enhance | Eventing to job Processing | Carsten Zeigler
EVOLVE'13 | Enhance | Eventing to job Processing | Carsten ZeiglerEVOLVE'13 | Enhance | Eventing to job Processing | Carsten Zeigler
EVOLVE'13 | Enhance | Eventing to job Processing | Carsten Zeigler
 
Distributed Eventing in OSGi
Distributed Eventing in OSGiDistributed Eventing in OSGi
Distributed Eventing in OSGi
 
Distributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten ZiegelerDistributed Eventing in OSGi - Carsten Ziegeler
Distributed Eventing in OSGi - Carsten Ziegeler
 
CIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can DoCIRCUIT 2015 - 10 Things Apache Sling Can Do
CIRCUIT 2015 - 10 Things Apache Sling Can Do
 
Tracing the Breadcrumbs: Apache Spark Workload Diagnostics
Tracing the Breadcrumbs: Apache Spark Workload DiagnosticsTracing the Breadcrumbs: Apache Spark Workload Diagnostics
Tracing the Breadcrumbs: Apache Spark Workload Diagnostics
 
Docker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline ExecutionDocker & ECS: Secure Nearline Execution
Docker & ECS: Secure Nearline Execution
 
Spark Summit EU talk by Qifan Pu
Spark Summit EU talk by Qifan PuSpark Summit EU talk by Qifan Pu
Spark Summit EU talk by Qifan Pu
 
Introduction to Apache Kafka
Introduction to Apache KafkaIntroduction to Apache Kafka
Introduction to Apache Kafka
 
Scaling Flink in Cloud
Scaling Flink in CloudScaling Flink in Cloud
Scaling Flink in Cloud
 
Spock
SpockSpock
Spock
 
Solr4 nosql search_server_2013
Solr4 nosql search_server_2013Solr4 nosql search_server_2013
Solr4 nosql search_server_2013
 
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
Bridging Proprietary Modelling and Open-Source Model Management Tools: The Ca...
 
Object Oriented Programming in JavaScript
Object Oriented Programming in JavaScriptObject Oriented Programming in JavaScript
Object Oriented Programming in JavaScript
 
Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)Our Puppet Story (GUUG FFG 2015)
Our Puppet Story (GUUG FFG 2015)
 
Managing ADLS gen2 using Apache Spark
Managing ADLS gen2 using Apache SparkManaging ADLS gen2 using Apache Spark
Managing ADLS gen2 using Apache Spark
 
OSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
OSMC 2012 | Neues in Nagios 4.0 by Andreas EricssonOSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
OSMC 2012 | Neues in Nagios 4.0 by Andreas Ericsson
 
Introduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users GroupIntroduction to Akka - Atlanta Java Users Group
Introduction to Akka - Atlanta Java Users Group
 
NetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talksNetflixOSS Open House Lightning talks
NetflixOSS Open House Lightning talks
 
Anatomy of an action
Anatomy of an actionAnatomy of an action
Anatomy of an action
 
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan GertisThe Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
The Possibilities and Pitfalls of Writing Your Own State Stores with Daan Gertis
 

More from Carsten Ziegeler

Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGi
Carsten Ziegeler
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
Carsten Ziegeler
 
What's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi SpecsWhat's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi Specs
Carsten Ziegeler
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specs
Carsten Ziegeler
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web Console
Carsten Ziegeler
 
OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
Carsten Ziegeler
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content Repositories
Carsten Ziegeler
 
Embrace Change - Embrace OSGi
Embrace Change - Embrace OSGiEmbrace Change - Embrace OSGi
Embrace Change - Embrace OSGi
Carsten Ziegeler
 
JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)
Carsten Ziegeler
 
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and RESTApache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and RESTCarsten Ziegeler
 
Embrace OSGi
Embrace OSGiEmbrace OSGi
Embrace OSGi
Carsten Ziegeler
 
Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)
Carsten Ziegeler
 
Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)
Carsten Ziegeler
 
JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)
Carsten Ziegeler
 
Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)
Carsten Ziegeler
 
JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)
Carsten Ziegeler
 
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Carsten Ziegeler
 

More from Carsten Ziegeler (17)

Service oriented web development with OSGi
Service oriented web development with OSGiService oriented web development with OSGi
Service oriented web development with OSGi
 
Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)Use Case: Building OSGi Enterprise Applications (QCon 14)
Use Case: Building OSGi Enterprise Applications (QCon 14)
 
What's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi SpecsWhat's cool in the new and updated OSGi Specs
What's cool in the new and updated OSGi Specs
 
What's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specsWhat's cool in the new and updated OSGi specs
What's cool in the new and updated OSGi specs
 
Monitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web ConsoleMonitoring OSGi Applications with the Web Console
Monitoring OSGi Applications with the Web Console
 
OSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache SlingOSGi, Scripting and REST, Building Webapps With Apache Sling
OSGi, Scripting and REST, Building Webapps With Apache Sling
 
JCR - Java Content Repositories
JCR - Java Content RepositoriesJCR - Java Content Repositories
JCR - Java Content Repositories
 
Embrace Change - Embrace OSGi
Embrace Change - Embrace OSGiEmbrace Change - Embrace OSGi
Embrace Change - Embrace OSGi
 
JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)JCR In Action (ApacheCon US 2009)
JCR In Action (ApacheCon US 2009)
 
Apache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and RESTApache Sling : JCR, OSGi, Scripting and REST
Apache Sling : JCR, OSGi, Scripting and REST
 
Embrace OSGi
Embrace OSGiEmbrace OSGi
Embrace OSGi
 
Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)Apache Sanselan (ApacheCon US 2007 FFT)
Apache Sanselan (ApacheCon US 2007 FFT)
 
Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)Apache iBatis (ApacheCon US 2007)
Apache iBatis (ApacheCon US 2007)
 
JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)JCR In Action (ApacheCon US 2007)
JCR In Action (ApacheCon US 2007)
 
Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)Apache Portals Panel (ApacheCon US 2007)
Apache Portals Panel (ApacheCon US 2007)
 
JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)JCR In Action (ApacheCon EU 2008)
JCR In Action (ApacheCon EU 2008)
 
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)Maven SCR Plugin (ApacheCon EU 2008 - FFT)
Maven SCR Plugin (ApacheCon EU 2008 - FFT)
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
Vlad Stirbu
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Quantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIsQuantum Computing: Current Landscape and the Future Role of APIs
Quantum Computing: Current Landscape and the Future Role of APIs
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Assure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyesAssure Contact Center Experiences for Your Customers With ThousandEyes
Assure Contact Center Experiences for Your Customers With ThousandEyes
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 

Apache Sling - Distributed Eventing, Discovery, and Jobs (adaptTo 2013)

  • 1. APACHE SLING & FRIENDS TECH MEETUP BERLIN, 23-25 SEPTEMBER 2013 Distributed Eventing and Jobs Carsten Ziegeler | Adobe Research Switzerland 1
  • 2. About 2 §  RnD Team at Adobe Research Switzerland §  Co-founder Adobe Granite §  OSGi Core Platform and Enterprise Expert Groups §  Member of the ASF §  Current PMC Chair of Apache Sling §  Apache Sling, Felix, ACE §  Conference Speaker §  Technical Reviewer §  Article/Book Author
  • 3. Overview 3 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 4. Overview 4 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 5. OSGi Event Admin Publish Subscribe Model 5 OSGi  Event  Admin  Component  A   publish deliver Component  X   Component  Y  
  • 6. OSGi Event Admin Publish Subscribe Model 6 §  OSGi event is a data object with §  Topic (hierarchical namespace) §  Properties (key-value-pairs) §  Resource Event §  Topic: org/apache/sling/api/resource/Resource/ADDED §  Properties: path, resource type etc.
  • 7. OSGi Event Admin Publish Subscribe Model 7 §  Publisher creates event object §  Sends event through EventAdmin service §  Either sync or async delivery §  Subscriber is an OSGi service (EventHandler) §  Service registration properties §  Interested topic(s) §  org/apache/sling/api/resource/Resource/*   §  Additional filters (optional) §  (path=/libs/*)  
  • 8. OSGi Event Admin Publish Subscribe Model 8 §  Immediate delivery to available subscribers §  No guarantee of delivery §  No distributed delivery
  • 9. OSGi Event Admin Publish Subscribe Model 9 §  Immediate delivery to available subscribers §  No guarantee of delivery §  No distributed delivery Discovery  Sling   Job  Distribu3on  
  • 10. Overview 10 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 11. Overview 11 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 12. Installation Scenarios 12 Clustered  JCR   Single   Instance   JCR   Instance   1   Instance   2   Instance   3  
  • 13. Topologies I Apache Sling Discovery 13 Clustered  JCR  JCR   ID  :  A   ID  :  X   ID  :  42  ID  :  1   Single   Instance   Instance   1   Instance   2   Instance   3   §  Instance: Unique Id (Sling ID)
  • 14. Topologies I Apache Sling Discovery 14 §  Instance: Unique Id (Sling ID) §  Cluster: Unique Id and leader                       Cluster  99                                      Cluster  35   Clustered  JCR  JCR   ID  :  A   ID  :  X   ID  :  42  ID  :  1   Single   Instance   Instance   1   Instance   2   Instance   3   Leader   Leader  
  • 15. Topologies I Apache Sling Discovery 15 §  Topology: Set of clusters                       Cluster  99                                      Cluster  35   Clustered  JCR  JCR   ID  :  A   ID  :  X   ID  :  42  ID  :  1   Single   Instance   Instance   1   Instance   2   Instance   3   Leader   Leader   Topology  Topology  
  • 16.                       Cluster  99                                      Cluster  35   Topologies I Apache Sling Discovery 16 Clustered  JCR  JCR   ID  :  A   ID  :  X   ID  :  42  ID  :  1   Single   Instance   Instance   1   Instance   2   Instance   3   Leader   Leader   Topology   §  Topology: Set of clusters
  • 17. Topologies II Apache Sling Discovery 17 §  Instance §  Sling ID §  Optional: Name and description §  Belongs to a cluster §  Might  be  the  cluster  leader   §  Additional distributed properties §  Extensible  through  own  services   (PropertyProvider)   §  E.g.  data  center,  region  or  enabled  job  topics                                       Cluster  99   ID  :  42   Instance   3   Topology   Lead er  
  • 18. Topologies II Apache Sling Discovery 18 §  Cluster §  Elects (stable) leader §  Stable instance ordering                                     Cluster  99   ID  :  42   Instance   3   Topology   Lead er  
  • 19. Topologies II Apache Sling Discovery 19 §  TopologyEventListener §  Receives events on topology changes §  Topology is changing §  Topology changed §  Properties changed                                     Cluster  99   ID  :  42   Instance   3   Topology   Lead er  
  • 20. Overview 20 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 21. Job Handling I Apache Sling Job Handling 21 §  Job : Guaranteed processing, exactly once §  Exactly one job consumer §  Started by client code, e.g. for replication, workflow... §  Job topic §  Payload is a serializable map
  • 22. Job Handling I Apache Sling Job Handling 22 §  Sling Job Manager handles and distributes jobs §  Delivers job to a job consumer… §  …and waits for response §  Retry and failover §  Notification listeners (fail, retry, success)
  • 23. Starting / Processing a Job I Apache Sling Job Handling 23 public interface JobConsumer { String PROPERTY_TOPICS = "job.topics"; enum JobResult { OK, FAILED, CANCEL, ASYNC } JobResult process(Job job); }   public interface JobManager { Job addJob(String topic, String optionalName, Map<String, Object> properties); … }   Star3ng  a  job   Processing  a  job   Note:  Star3ng/processing  of  jobs  through  Event  Admin  is  deprecated  but  s3ll  supported  
  • 24. Starting / Processing a Job II Apache Sling Job Handling 24 @Component @Service(value={JobConsumer.class}) @Property(name=JobConsumer.PROPERTY_TOPICS, value="org/apache/sling/jobs/backup") public class BackupJobConsumer implements JobConsumer { @Override public JobResult process(final Job job) { // do backup return JobResult.OK; } }
  • 25. Job Handling I Apache Sling Job Handling 25 •  New jobs are immediately persisted •  Jobs are “pushed” to the processing instance •  Processing instances use different queues •  Associated with job topic(s) •  Main queue •  0..n custom queues
  • 26. Job Queue I Apache Sling Job Handling 26 •  Queue is configurable •  Queue is started on demand in own thread •  And stopped if unused for some time
  • 27. Job Queue II Apache Sling Job Handling 27 •  Queue Types •  Ordered queue •  Parallel queues: Plain and Topic Round Robin
  • 28. Job Queue III Apache Sling Job Handling 28 •  Limit for parallel threads per queue •  Number of retries (-1 = endless) •  Retry delay •  Thread priority
  • 29. Additional Configurations Apache Sling Job Handling 29 •  Job Manager Configuration = Main Queue Configuration •  Maximum parallel jobs (15) •  Retries (10) •  Retry Delay •  Eventing Thread Pool Configuration •  Used by all queues •  Pool size (35) = Maximum parallel jobs for a single instance
  • 30. Monitoring – Web Console Apache Sling Job Handling 30
  • 31. Monitoring – Web Console Apache Sling Job Handling 31
  • 32. Job Distribution I Apache Sling Job Distribution 32 •  Each instance determines enabled job topics •  Derived from Job Consumers (new API required) •  Can be whitelisted/blacklisted (in Job Consumer Manager) •  Announced through Topology
  • 33. Job Distribution II Apache Sling Job Distribution 33 •  Job Distribution depends on enabled job topics and queue type •  Potential set of instances derived from topology (enabled job topics) •  Ordered: processing on leader only, one job after the other •  Parallel: Round robin distribution on all potential instances §  Local  cluster  instances  have  preference  
  • 34. Job Distribution III Apache Sling Job Distribution 34 •  Failover •  Instance crash: leader redistributes jobs to available instances §  Leader  change  taken  into  account   •  On enabled job topics changes: potential redistribution
  • 35. Sling Job Distribution 35 Topology   Instance   Sling  ID:  1   Job  Manager   Instance   Sling  ID:  2   Job  Manager   Instance   Sling  ID:  3   Job  Manager   Instance   Sling  ID:  4   Job  Manager   Job  Consumer   Topic:  A   Job  Consumer   Topic:  B   Job  Consumer   Topic:  C  
  • 36. Sling Job Distribution 36 Instance   Sling  ID:  1   Job  Manager   Instance   Sling  ID:  2   Job  Manager   Instance   Sling  ID:  3   Job  Manager   Instance   Sling  ID:  4   Job  Manager  A   Job  Consumer   Topic:  A   Job  Consumer   Topic:  B   A:2   Job  Consumer   Topic:  C  Job   Topology  
  • 37. Sling Job Distribution 37 Instance   Sling  ID:  1   Job  Manager   Instance   Sling  ID:  2   Job  Manager   Instance   Sling  ID:  3   Job  Manager   Instance   Sling  ID:  4   Job  Manager  B   Job  Consumer   Topic:  A   Job  Consumer   Topic:  B   B:3   Job  Consumer   Topic:  C  Job   Topology  
  • 38. Sling Job Distribution 38 Instance   Sling  ID:  1   Job  Manager   Instance   Sling  ID:  2   Job  Manager   Instance   Sling  ID:  3   Job  Manager   Instance   Sling  ID:  4   Job  Manager  C   Job  Consumer   Topic:  A   Job  Consumer   Topic:  B   C:4   Job  Consumer   Topic:  C  Job   ?   Topology  
  • 39. Discovery and Eventing 39 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 40. Discovery and Eventing – What’s Next? 40 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing   New  OSGi  Specifica-on     •  Distributed  Even3ng   •  Cloud  Compu3ng  
  • 41. Discovery and Eventing – What’s Next? 41 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing   Job  Distribu-on     •  Improved  load  balancing   •  Pull  based  distribu3on  
  • 42. One More Thing… 42 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing  
  • 43. Job Progress Tracking Apache Sling Job Processing 43 §  Jobs can inform about §  Progress (percentage) §  ETA §  Additional informational messages §  All information is persisted NEW  
  • 44. Improved Failure Handling I Apache Sling Job Processing 44 §  Currently, no history of jobs §  Immediately removed once §  Job succeeds §  Job is cancelled §  What happened? §  What did go wrong?
  • 45. Improved Failure Handling II Apache Sling Job Processing 45 §  Cancelled jobs are kept §  With a reason and log §  Can be retried §  Successful jobs can be kept §  With a message and log NEW  
  • 46. Discovery and Eventing 46 Discovery  Sling   Job  Distribu3on   Felix   OSGi  Event  Admin   From  Even3ng  to   Job  Processing