You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Marius Petria (JIRA)" <ji...@apache.org> on 2018/10/10 14:15:00 UTC

[jira] [Commented] (SLING-7754) Implement passive DistributionQueue in the repository

    [ https://issues.apache.org/jira/browse/SLING-7754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16645022#comment-16645022 ] 

Marius Petria commented on SLING-7754:
--------------------------------------

[~marett] I created a DistributionQueue implementation based on Resources in (/var/sling/distribution/queues)

A queue is structured the same way as sling events (bucketed by create date). The order is maintained by the repository, it is the order in which the items are written to the repository. There is also a cleanup task that removes empty folders that runs every 5 minutes. The code is in [1] if you want to have a look.

{code}
queueRoot (sling:OrderedFolder)
- 2018 (sling:OrderedFolder)
   - 10 (sling:OrderedFolder)
        - 10 (sling:OrderedFolder)
            - 17 (sling:OrderedFolder)
               - 59 (sling:OrderedFolder)
                 - distrq-guid (nt:unstructured)
{code}


[1] https://github.com/apache/sling-org-apache-sling-distribution-core/pull/12

> Implement passive DistributionQueue in the repository
> -----------------------------------------------------
>
>                 Key: SLING-7754
>                 URL: https://issues.apache.org/jira/browse/SLING-7754
>             Project: Sling
>          Issue Type: Improvement
>          Components: Content Distribution
>            Reporter: Marius Petria
>            Assignee: Marius Petria
>            Priority: Major
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> In order to minimize dependency on Sling Jobs and improve performance we should offer an implementation passive queues in JCR.
> Passive queues are distribution queues [1] for which no queue processor is defined. They are only used to store items and do not need rebalancing between instances. They just need to be stored and fetched (FIFO semantics) and this can easily be implemented in JCR with a simpler implementation that does not use querying (querying for jobs is problematic like OAK-7495 shows).
> [1] https://github.com/apache/sling-org-apache-sling-distribution-core/blob/master/src/main/java/org/apache/sling/distribution/queue/spi/DistributionQueue.java



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)