Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identus Cloud Agent Scalability - Background Jobs #18

Open
essbante-io opened this issue Jul 3, 2024 · 1 comment
Open

Identus Cloud Agent Scalability - Background Jobs #18

essbante-io opened this issue Jul 3, 2024 · 1 comment
Labels
type:roadmap This issue will appear in the [project roadmap](https://github.com/orgs/hyperledger/projects/48)

Comments

@essbante-io
Copy link
Contributor

essbante-io commented Jul 3, 2024

This Epic aims to investigate ZIO Stream and ZIO Kafka as a replacement for the mechanism behind the execution of background jobs.

Currently, each background job is a recurrent ZIO effect created using ZIO#repeat that processes a configurable number of records in parallel during each iteration. This will inevitably lead to conflicts and race conditions as soon as we run two instances of the cloud agent in parallel, as the same record will be processed by those two agents sharing the same DB. The related flows will be executed multiple times, and the same DIDComm message will be sent several times to the DIDComm peer.

This can be solved using a message queueing system like Kafka and leveraging Kafka's consumer groups capability to concurrently distribute the load among multiple agent instances.

At a later stage, using a queuing mechanism like Kafka would allow us to better control - and allocate resources to - the execution of the resource-intensive tasks that put pressure on the system (e.g., generation of AnonCreds credential definitions via the Rust library).

@essbante-io essbante-io converted this from a draft issue Jul 3, 2024
@essbante-io essbante-io added the type:roadmap This issue will appear in the [project roadmap](https://github.com/orgs/hyperledger/projects/48) label Jul 3, 2024
@essbante-io essbante-io changed the title Ensure Identus is highly-scalable by default Identus Cloud Agent Scalability - Background Jobs Sep 3, 2024
@bvoiturier
Copy link

Implementation completed and merged into the Identus Cloud Agent main branch via the following PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:roadmap This issue will appear in the [project roadmap](https://github.com/orgs/hyperledger/projects/48)
Projects
Development

No branches or pull requests

2 participants