Hi Bertrand,

I think this scenario could be easily supported by Sling Replication, one
could fire replication related events [1] via ReplicationEventFactory [2]
once a replication request is received by a replication agent (and / or in
other scenarios).
The problem I see here, as far as I understood eventing, is related to the
fact that events are not guaranteed to be "consumed" in the exact same
order they were "generated" and I think this would be a problem for
flushing a cache consistently or am I missing something?

Regards,
Tommaso

[1] :
https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/event/ReplicationEvent.java
[2] :
https://svn.apache.org/repos/asf/sling/trunk/contrib/extensions/replication/src/main/java/org/apache/sling/replication/event/ReplicationEventFactory.java


2014/1/8 Bertrand Delacretaz <[email protected]>

> Hi,
>
> This is about SLING-3309 - I'm wondering if the custom cache flushing
> service that Marius needs should really be in Sling, or if that should
> rather be a custom service that he implements outside of Sling.
>
> IIUC the scenario is as follows:
>
> 1) Changes are made to Sling content
>
> 2) The replication subsystem detects the changes and generates add/delete
> events
>
> 3) You need to make HTTP requests with custom headers/payload to an
> external system to signal the changes
>
> The way we usually do things in Sling, for 3) I would use an OSGi
> whiteboard pattern where you register a service that declares that
> it's interested in add/delete events for certain content paths. The
> replication subsystem then calls all such services when
> add/delete/other events occur.
>
> Would the replication subsystem support this?
>
> -Bertrand
>

Reply via email to