You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Andreas Schaefer <sc...@me.com> on 2017/08/01 17:43:46 UTC

Sling Distribution Properties on Distribution

Hi Timothee

We are using Sling Distribution to replicate author nodes to a remote
Sling publish instances and would like to set a replication properties
along the lines of what AEM does (rep:Replicated, rep:ReplicatedBy,
rep:ReplicationRef).

For now we are using the Distribution Event but I would like to
have a more reliable way to do that with something like a call back
on the Forward Agent and the Importer. Also I would like to transfer
and set the actual user name from the Author side as the one
doing the replication on the publish side.

Is that already possible and if not do you consider something like
that to put into place?

Thanks - Andy Schaefer Sr.

Re: Sling Distribution Properties on Distribution

Posted by Timothee Maret <tm...@apache.org>.
Hi Andy,

Thanks for your message. Please find more inputs inline.

2017-08-01 19:43 GMT+02:00 Andreas Schaefer <sc...@me.com>:

> Hi Timothee
>
> We are using Sling Distribution to replicate author nodes to a remote
> Sling publish instances and would like to set a replication properties
> along the lines of what AEM does (rep:Replicated, rep:ReplicatedBy,
> rep:ReplicationRef).


> For now we are using the Distribution Event but I would like to
> have a more reliable way to do that with something like a call back
> on the Forward Agent and the Importer.


I think that leveraging the distribution events is a good way to plug a
callback in order to add properties either on the source or destination
instance.

Could you elaborate on what makes it unreliable ? Do we lack sending a type
of event that would be relevant to your use case ?


> Also I would like to transfer
> and set the actual user name from the Author side as the one
> doing the replication on the publish side.


I think that currently you would need to set the identifier in the content
on the sending instance prior to distributing it.


>
> Is that already possible


Assuming your app is invoking the o.a.s.d.Distributor API, you could
already add the property prior to distributing.

Assuming your app is using existing UIs to distribute content, then I don't
think we currently have an extension mechanism for that. We may allow to
plug an DistributionPackageExporter or another Abstraction, but none is
exported in the current code.


> and if not do you consider something like
> that to put into place?
>

I suggest to first evaluate the possibility to add content prior to
invoking the Distributor API.
If it does fit your bill, we may evaluate the possibility to add an API to
customise content.


>
> Thanks - Andy Schaefer Sr.
>

Regards,

Timothee