raven icon indicating copy to clipboard operation
raven copied to clipboard

Design Discussion: Implementing Queueing logic to enable parallel run of index and download logics

Open oreenlivnicode opened this issue 2 years ago • 0 comments

Problem Statement:

We are aiming to improve the system by running the index and download logics in parallel. To achieve this, we need to implement a queueing mechanism that can effectively manage these two processes.

Proposed Solution - Use Redis Sets as Queues

How it works:

Utilize a Redis set (or two sets, one for workflows and one for actions) to queue items for processing. Download logic will insert items to these sets after it downloads it. Index logic will pop items from these sets and index them.

Pros:

Simplicity: Easy to implement and manage. No Duplicates: Sets prevent duplicate items by default.

Cons:

Ordering: Redis sets do not guarantee order, which could be an issue if ordering is essential.

What do you think?

oreenlivnicode avatar Sep 27 '23 15:09 oreenlivnicode