Re: [ANN] New Apache Sling PMC Chair: Robert Munteanu

2017-11-16 Thread Timothee Maret
Congrats Robert!

Regards,

Timothee

2017-11-16 15:25 GMT+01:00 Carsten Ziegeler :

> Hi,
>
> it's my pleasure to announce that Robert took up the role as our new PMC
> chair.
>
> Congrats Robert!
>
> Regards
> Carsten
> --
> Carsten Ziegeler
> Adobe Research Switzerland
> cziege...@apache.org
>


Re: Sling Content Distribution: how to use "in-file" queue provider

2017-09-11 Thread Timothee Maret
Hi,

Sorry for late reply, I was on PTO. The In-file queue is only available for
Forward agents.

To enable it, you need to set the 'queue.provider' property to 'In-file' in
your o.a.s.d.a.i.ForwardDistributionAgentFactory configuration.

The checkpoint mechanism should be implemented by [0] despite the comments
in SimpleDistributionQueue.

I don't think there's yet a customer with this setting. It should really be
used only if measurements prove that the queue is the bottleneck in your
setup, that throughput is a real issue in your deployment, that your
deployment can afford losing non checkpointed items and that you setup
custom operations to backup the queue.

Regards,

Timothee

[0]
https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/core/src/main/java/org/apache/sling/distribution/queue/impl/simple/SimpleDistributionQueueCheckpoint.java

2017-08-30 12:26 GMT+02:00 Stefan Seifert :

> this presentation [1] mentions that it's possible to switch the Sling
> Content Distribution from using a Sling Jobs-based queue to an "in-file" or
> "in-memory" queue which is much faster.
>
> but i've not found any hint in the documentation what steps are needed to
> switch to this queue. can you give some hints?
>
> is it recommended to use this alternative queue in production (if the
> possible loss of some events up to the last checkpoint is acceptable)? is
> this the implementation of it [2]? the javadoc states "queue not persisted
> on the repository and therefore not usable for production."
>
> stefan
>
> [1] https://docs.adobe.com/ddc/en/gems/Troubleshooting-Sling-
> Content-Distribution.html
> [2] https://github.com/apache/sling/blob/trunk/contrib/
> extensions/distribution/core/src/main/java/org/apache/
> sling/distribution/queue/impl/simple/SimpleDistributionQueue.java
>
>
>


Re: How to Execute a Sling Replication

2017-08-01 Thread Timothee Maret
Hi Andy,

The 'null' path allows to set repository level permissions.
See also


https://jackrabbit.apache.org/oak/docs/security/permission/differences.html#Repository_Level_Operations

HTH,

Timothee

2017-07-31 17:46 GMT+02:00 Andreas Schaefer <schaef...@me.com>:

> Hi Timothee
>
> I saw in the sample configuration’s Init class that there is this line:
>
> AccessControlUtils.addAccessControlEntry(session, null,
> serviceUser.getPrincipal(), new String[]{ Privilege.JCR_ALL }, true);
> Any idea what this does with the absolute path set to null?
>
> Thanks - Andy Schaefer
>
> > On Jul 26, 2017, at 1:52 AM, Timothee Maret <tma...@apache.org> wrote:
> >
> > Hi Andy,
> >
> > 2017-07-25 18:30 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >
> >> Hi Timothee
> >>
> >> I am slowly getting there. As much as I love OSGi for its extensibility
> as
> >> much
> >> I hate it when it goes wrong.
> >>
> >> Turns out for the Forward Distribution Agent I need a Distribution
> Package
> >> Builder
> >> which is not configured in the Sample but I could also not find it in
> the
> >> IT tests.
> >>
> >
> > The Distribution Package Builder configuration should be located here
> >
> > https://github.com/apache/sling/blob/trunk/contrib/
> extensions/distribution/sample/src/main/resources/
> SLING-CONTENT/libs/sling/distribution/install.notshared
> >
> > or here
> >
> >
> > https://github.com/apache/sling/tree/trunk/contrib/
> extensions/distribution/sample/src/main/resources/
> SLING-CONTENT/libs/sling/distribution/install.shared
> >
> > The configuration is only installed on the instance if the run mode
> > ('notshared' resp. 'shared') is selected.
> >
> >
> >>
> >> After having a closer at the IT tests I figured out that I also need to
> >> set the
> >> run mode ‘notshared’.
> >
> >
> >> This did the trick and now I have the author configuration up and
> running.
> >>
> >
> > Excellent!
> >
> >
> >>
> >> I let you know if I run into other issues.
> >>
> >
> > Sure, happy to help.
> >
> > Regards,
> >
> > Timothee
> >
> >
> >>
> >> Thanks - Andy
> >>
> >>> On Jul 25, 2017, at 7:22 AM, Timothee Maret <tma...@apache.org> wrote:
> >>>
> >>> Hi Andy,
> >>>
> >>> Indeed, I am referring to the curl command you shared.
> >>>
> >>> Regarding the unsupported operation exception, I think you are on the
> >> right
> >>> track when thinking that the agent is not started.
> >>> An agent configuration refers to set of services. The agent is only
> >> started
> >>> if all the referenced services are available.
> >>> The likely reason for your agent not to be started, is that one or more
> >>> references are not satisfied.
> >>>
> >>> In order to figure out what reference may be unsatisfied, you may want
> to
> >>> look at the agent component you are configuring in the OSGI components
> >>> console (path is /system/console/components). The references marked as
> >>> "Unsatisfied" must be resolved, typically by adding a configuration for
> >> the
> >>> missing referenced service.
> >>>
> >>> HTH,
> >>>
> >>> Timothee
> >>>
> >>> 2017-07-24 21:32 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >>>
> >>>> Hi Timothee
> >>>>
> >>>> Thanks for the quick reply. If you are referring to:
> >>>>
> >>>> curl -v -u admin:admin http://localhost:8080/libs/
> >>>> sling/distribution/services/agents/publish -d 'action=ADD' -d
> >>>> 'path=/content/sample1’
> >>>>
> >>>> then it does not work on my installation. I get a ‘Unsupported
> Operation
> >>>> Exception: create’ which
> >>>> I think happens because the call to the agent is ignored. One thing I
> >>>> noticed is that this node
> >>>> in Composum is never resolved (spinner keeps on spinning).
> >>>>
> >>>> With the investigation into the Default Distribution Component
> Provider
> >> is
> >>>> will also check out
> >>>> this as I think they are related.
> >>>>
> >>>> - Andy
> >>>>
> >>>>> On Jul 24, 2017, at 11:13 AM, Timothee Maret <tma...@apache.org>
> >> wrote:
> >>>>>
> >>>>> Hi Andreas,
> >>>>>
> >>>>> The documentation could indeed be improved in this area.
> >>>>>
> >>>>> I think your use case matches forward distribution. You could look at
> >> the
> >>>>> curl commands in
> >>>>>
> >>>>>
> >>>>> https://github.com/apache/sling/tree/trunk/contrib/
> >>>> extensions/distribution#forward-distribution
> >>>>>
> >>>>> Regards,
> >>>>>
> >>>>> Timothee
> >>>>>
> >>>>> 2017-07-24 16:46 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >>>>>
> >>>>>> Hi
> >>>>>>
> >>>>>> I managed to build and install the Sling Distribution including
> >>>>>> the sample package. Everything looks fine but I am not sure
> >>>>>> how to start a replication of a given node.
> >>>>>>
> >>>>>> I want to replicate a given node on the Author to the Publish
> >>>>>> instance(s) defined in the used agent. How would I do that
> >>>>>> from the command line?
> >>>>>>
> >>>>>> Thanks - Andy Schaefer
> >>>>>>
> >>>>
> >>>>
> >>
> >>
>


Re: How to Execute a Sling Replication

2017-07-26 Thread Timothee Maret
Hi Andy,

2017-07-25 18:30 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:

> Hi Timothee
>
> I am slowly getting there. As much as I love OSGi for its extensibility as
> much
> I hate it when it goes wrong.
>
> Turns out for the Forward Distribution Agent I need a Distribution Package
> Builder
> which is not configured in the Sample but I could also not find it in the
> IT tests.
>

The Distribution Package Builder configuration should be located here

https://github.com/apache/sling/blob/trunk/contrib/extensions/distribution/sample/src/main/resources/SLING-CONTENT/libs/sling/distribution/install.notshared

or here


https://github.com/apache/sling/tree/trunk/contrib/extensions/distribution/sample/src/main/resources/SLING-CONTENT/libs/sling/distribution/install.shared

The configuration is only installed on the instance if the run mode
('notshared' resp. 'shared') is selected.


>
> After having a closer at the IT tests I figured out that I also need to
> set the
> run mode ‘notshared’.


> This did the trick and now I have the author configuration up and running.
>

Excellent!


>
> I let you know if I run into other issues.
>

Sure, happy to help.

Regards,

Timothee


>
> Thanks - Andy
>
> > On Jul 25, 2017, at 7:22 AM, Timothee Maret <tma...@apache.org> wrote:
> >
> > Hi Andy,
> >
> > Indeed, I am referring to the curl command you shared.
> >
> > Regarding the unsupported operation exception, I think you are on the
> right
> > track when thinking that the agent is not started.
> > An agent configuration refers to set of services. The agent is only
> started
> > if all the referenced services are available.
> > The likely reason for your agent not to be started, is that one or more
> > references are not satisfied.
> >
> > In order to figure out what reference may be unsatisfied, you may want to
> > look at the agent component you are configuring in the OSGI components
> > console (path is /system/console/components). The references marked as
> > "Unsatisfied" must be resolved, typically by adding a configuration for
> the
> > missing referenced service.
> >
> > HTH,
> >
> > Timothee
> >
> > 2017-07-24 21:32 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >
> >> Hi Timothee
> >>
> >> Thanks for the quick reply. If you are referring to:
> >>
> >> curl -v -u admin:admin http://localhost:8080/libs/
> >> sling/distribution/services/agents/publish -d 'action=ADD' -d
> >> 'path=/content/sample1’
> >>
> >> then it does not work on my installation. I get a ‘Unsupported Operation
> >> Exception: create’ which
> >> I think happens because the call to the agent is ignored. One thing I
> >> noticed is that this node
> >> in Composum is never resolved (spinner keeps on spinning).
> >>
> >> With the investigation into the Default Distribution Component Provider
> is
> >> will also check out
> >> this as I think they are related.
> >>
> >> - Andy
> >>
> >>> On Jul 24, 2017, at 11:13 AM, Timothee Maret <tma...@apache.org>
> wrote:
> >>>
> >>> Hi Andreas,
> >>>
> >>> The documentation could indeed be improved in this area.
> >>>
> >>> I think your use case matches forward distribution. You could look at
> the
> >>> curl commands in
> >>>
> >>>
> >>> https://github.com/apache/sling/tree/trunk/contrib/
> >> extensions/distribution#forward-distribution
> >>>
> >>> Regards,
> >>>
> >>> Timothee
> >>>
> >>> 2017-07-24 16:46 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >>>
> >>>> Hi
> >>>>
> >>>> I managed to build and install the Sling Distribution including
> >>>> the sample package. Everything looks fine but I am not sure
> >>>> how to start a replication of a given node.
> >>>>
> >>>> I want to replicate a given node on the Author to the Publish
> >>>> instance(s) defined in the used agent. How would I do that
> >>>> from the command line?
> >>>>
> >>>> Thanks - Andy Schaefer
> >>>>
> >>
> >>
>
>


Re: How to Execute a Sling Replication

2017-07-25 Thread Timothee Maret
Hi Andy,

Indeed, I am referring to the curl command you shared.

Regarding the unsupported operation exception, I think you are on the right
track when thinking that the agent is not started.
An agent configuration refers to set of services. The agent is only started
if all the referenced services are available.
The likely reason for your agent not to be started, is that one or more
references are not satisfied.

In order to figure out what reference may be unsatisfied, you may want to
look at the agent component you are configuring in the OSGI components
console (path is /system/console/components). The references marked as
"Unsatisfied" must be resolved, typically by adding a configuration for the
missing referenced service.

HTH,

Timothee

2017-07-24 21:32 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:

> Hi Timothee
>
> Thanks for the quick reply. If you are referring to:
>
> curl -v -u admin:admin http://localhost:8080/libs/
> sling/distribution/services/agents/publish -d 'action=ADD' -d
> 'path=/content/sample1’
>
> then it does not work on my installation. I get a ‘Unsupported Operation
> Exception: create’ which
> I think happens because the call to the agent is ignored. One thing I
> noticed is that this node
> in Composum is never resolved (spinner keeps on spinning).
>
> With the investigation into the Default Distribution Component Provider is
> will also check out
> this as I think they are related.
>
> - Andy
>
> > On Jul 24, 2017, at 11:13 AM, Timothee Maret <tma...@apache.org> wrote:
> >
> > Hi Andreas,
> >
> > The documentation could indeed be improved in this area.
> >
> > I think your use case matches forward distribution. You could look at the
> > curl commands in
> >
> >
> > https://github.com/apache/sling/tree/trunk/contrib/
> extensions/distribution#forward-distribution
> >
> > Regards,
> >
> > Timothee
> >
> > 2017-07-24 16:46 GMT+02:00 Andreas Schaefer Sr. <schaef...@me.com>:
> >
> >> Hi
> >>
> >> I managed to build and install the Sling Distribution including
> >> the sample package. Everything looks fine but I am not sure
> >> how to start a replication of a given node.
> >>
> >> I want to replicate a given node on the Author to the Publish
> >> instance(s) defined in the used agent. How would I do that
> >> from the command line?
> >>
> >> Thanks - Andy Schaefer
> >>
>
>


Sling events Barrier synchronization

2012-07-18 Thread Timothee Maret
Hi,

I would require to execute tasks mixing parallel and sequential execution 
(Barrier synchronization).
As an example, we could take the following queue of tasks:

queue: --(task1)--(task2, task3, task4)--(task5)--(task6,task7)

Group of tasks = (task1, …, taskn)
Groups of tasks are executed sequentially
Tasks in a group are executed in parallel

I could achieve this by wrapping each task in a Callable,  submitting them to 
an ExecutorService and implementing the barrier synchronization based on the 
Future returned by the executor.
However, I noticed the sling's ThreadPool [0] is only processing Runnable (no 
Callable) and thus I am wondering if there is a better way to enable this 
synchronization in Sling (maybe using event queues).
Otherwise, it would be easy to add the Callable support.

Regards,

Timothee.

[0] org.apache.sling.commons.threads.ThreadPool