gammazero / workerpool

Concurrency limiting goroutine pool
MIT License
1.33k stars 138 forks source link

`[question]` Is it advisable to have nested worker pools in Node.js for handling heavy data operations? #78

Open wojtekKrol opened 2 months ago

wojtekKrol commented 2 months ago

Description

I am developing a Node.js application that involves heavy data processing with three distinct services, each managed by a separate worker pool. Here's the breakdown of the setup:

Current Architecture

In ServiceZ, a task involves checking for duplicates in a database where a specific column is not null. Additionally, I need to handle duplicates where the column is null in returned data to optimize processing and database updates. Given the intensity of these operations, I am considering using a nested worker pool within ServiceZ.

Question

Is it practical to initiate a new worker pool within an existing worker's task in ServiceZ? This new pool would potentially launch single worker instances dynamically to handle specific heavy operations like duplicate checking.

Concerns