sling content distribution without Sling (just jackrabbit oak)?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sling content distribution without Sling (just jackrabbit oak)?

Eugen Stan-2
Hello,

I'm designing a distributed micro-service architecture around Sling and
Oak. We need to be able to synchronize some parts of the repository
across multiple services. I think that Sling Content Distribution
bundles are a very good fit, however the applications that we have are
not OSGI and I don't plan to use Sling with them.

Does Sling Content Delivery work outside OSGI ? If it does it's a bummer
since IMO there is potential for use cases where plain old Oak/JCR apps
need to sync content between them. 

*My use case:*

We currently have around 5 services that need to access the same
content. One service will handle authoring and we will probably use
Sling for that. The others will sync published content and read it. The
content is small, around 100MB, up to 1GB and is updated infrequently -
a few times a week

I don't wish for the services to share a MongoDB repo since it will make
maintenance a bit harder to do on mongo and it will also put a lot of
stress when doing migrations.

Using a solution that distributes content with Sling Content
Distribution we can have each application with it's own segment based
repository and synchronize them on command (push or pull).

The issue is that the services are not OSGI and we don't plan to make
them since we don't have the resources / talent to do so.

I also believe that this functionality is quite generic in nature and it
should not be limited to Sling only.

Maybe it works without full blown Sling and in that case it just needs
some marketing ( hence this message)


Thanks,

Eugen





signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sling content distribution without Sling (just jackrabbit oak)?

Robert Munteanu-2
Hi Eugen,

On Wed, 2018-02-21 at 16:10 +0200, Ioan Eugen Stan wrote:

> Hello,
>
> I'm designing a distributed micro-service architecture around Sling
> and
> Oak. We need to be able to synchronize some parts of the repository
> across multiple services. I think that Sling Content Distribution
> bundles are a very good fit, however the applications that we have
> are
> not OSGI and I don't plan to use Sling with them.
>
> Does Sling Content Delivery work outside OSGI ? If it does it's a
> bummer
> since IMO there is potential for use cases where plain old Oak/JCR
> apps
> need to sync content between them.

(snip)

No, I don't think it works without OSGi. Maybe your scenario would work
with the vault rcp command.

  http://jackrabbit.apache.org/filevault/usage.html

Robert
Reply | Threaded
Open this post in threaded view
|

Re: sling content distribution without Sling (just jackrabbit oak)?

Eugen Stan-2
Hi,

Thank you. I've tried FileVault and I think I can implement a procedure
with it. I'll see if I can make VLT produce a zip archive that I can
publish.

Roight now I am working on migrating the content structure from the EMF
structure to a new JCR structure.

So far I like how things have progressed and the JCR API is ok to work
with (It could use an upgrade, Java has evolved, it would be great for
JCR to evolve as well :D).

Regards,


On 27.02.2018 18:08, Robert Munteanu wrote:

> Hi Eugen,
>
> On Wed, 2018-02-21 at 16:10 +0200, Ioan Eugen Stan wrote:
>> Hello,
>>
>> I'm designing a distributed micro-service architecture around Sling
>> and
>> Oak. We need to be able to synchronize some parts of the repository
>> across multiple services. I think that Sling Content Distribution
>> bundles are a very good fit, however the applications that we have
>> are
>> not OSGI and I don't plan to use Sling with them.
>>
>> Does Sling Content Delivery work outside OSGI ? If it does it's a
>> bummer
>> since IMO there is potential for use cases where plain old Oak/JCR
>> apps
>> need to sync content between them.
> (snip)
>
> No, I don't think it works without OSGi. Maybe your scenario would work
> with the vault rcp command.
>
>   http://jackrabbit.apache.org/filevault/usage.html
>
> Robert


signature.asc (499 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: sling content distribution without Sling (just jackrabbit oak)?

Robert Munteanu-2
On Tue, 2018-02-27 at 20:02 +0200, Ioan Eugen Stan wrote:
> So far I like how things have progressed and the JCR API is ok to
> work
> with (It could use an upgrade, Java has evolved, it would be great
> for
> JCR to evolve as well :D).

Glad to hear you'll be putting this to good use :-) . Yes, the JCR API
has not changed in some time, but that's the issue with backwards
compatibility. There's also the Sling Resource API, but if you're not
using OSGi for now that's out of the question.

Robert
Reply | Threaded
Open this post in threaded view
|

Re: sling content distribution without Sling (just jackrabbit oak)?

Marius Petria-2
In reply to this post by Eugen Stan-2
Hi Ioan,

As Robert already mentioned SCD is heavily dependent on Sling and OSGI.

However, in your use case you could still leverage SCD by using it on author and implement a thin importer on publish.

1. use SCD forward agent on author that will point to your custom importers on publish.
2. Implement your own thin importer http service on publish (it should just be able to receive and install a vault package). (some older, but smaller versions, of the importing part can be found in [1] and [2]).

Marius

[1] https://github.com/apache/sling-org-apache-sling-distribution-core/blob/1455f191ded8b1336b007259bd7fee7d93c549f8/src/main/java/org/apache/sling/distribution/servlet/DistributionPackageImporterServlet.java
[2] https://github.com/apache/sling-org-apache-sling-distribution-core/blob/319b5e7d1b621507d4dd451cea22e6759cbc0a43/src/main/java/org/apache/sling/distribution/serialization/impl/vlt/FileVaultContentSerializer.java#L106


On 2/21/18, 4:10 PM, "Ioan Eugen Stan" <[hidden email]> wrote:

    Hello,
   
    I'm designing a distributed micro-service architecture around Sling and
    Oak. We need to be able to synchronize some parts of the repository
    across multiple services. I think that Sling Content Distribution
    bundles are a very good fit, however the applications that we have are
    not OSGI and I don't plan to use Sling with them.
   
    Does Sling Content Delivery work outside OSGI ? If it does it's a bummer
    since IMO there is potential for use cases where plain old Oak/JCR apps
    need to sync content between them.
   
    *My use case:*
   
    We currently have around 5 services that need to access the same
    content. One service will handle authoring and we will probably use
    Sling for that. The others will sync published content and read it. The
    content is small, around 100MB, up to 1GB and is updated infrequently -
    a few times a week
   
    I don't wish for the services to share a MongoDB repo since it will make
    maintenance a bit harder to do on mongo and it will also put a lot of
    stress when doing migrations.
   
    Using a solution that distributes content with Sling Content
    Distribution we can have each application with it's own segment based
    repository and synchronize them on command (push or pull).
   
    The issue is that the services are not OSGI and we don't plan to make
    them since we don't have the resources / talent to do so.
   
    I also believe that this functionality is quite generic in nature and it
    should not be limited to Sling only.
   
    Maybe it works without full blown Sling and in that case it just needs
    some marketing ( hence this message)
   
   
    Thanks,
   
    Eugen