Live data from Hacker News

Piscina – The Node.js Worker Pool

github.com

31–40 of 51 posts

Re: Piscina – The Node.js Worker Pool

#31
post #12
post #10

Earlier quoted context omitted.

Yeah. I built Bree @ https://jobscheduler.net It has support for worker threads + cron + human strings GH: https://github.com/breejs/bree

This is cool. Our use case was very simple so we went with node-schedule but this may have more upsides. I've had trouble with the former. Thanks.

I helped maintain all the Node.js node/cron/agenda libraries. Just switch to Bree and your troubles will be gone.

Re: Piscina – The Node.js Worker Pool

#32
post #18

Earlier quoted context omitted.

To quote Wikipedia, "Romance languages (less commonly Latin languages, or Neo-Latin languages) are the modern languages that evolved from Vulgar Latin between the third and eighth centuries." "Piscina" is also "pool" in Romanian, which is, you guessed, a Romance language.

Got it. In Portuguese they're only known for "Latin languages", which explains my question. ;-)

Not really. I've personally heard the term before. https://pt.wikipedia.org/wiki/L%C3%ADnguas_rom%C3%A2nicas

Re: Piscina – The Node.js Worker Pool

#33
post #2

Does anybody use this or anything similar? If so, what problems are you solving?

At work I use https://github.com/pioardi/poolifier

We have an api used for generating reports from mongo dB to csv, this let's the report process in the background leaving the report api to still handle requests.

Re: Piscina – The Node.js Worker Pool

#35
post #32

Earlier quoted context omitted.

Got it. In Portuguese they're only known for "Latin languages", which explains my question. ;-)

Not really. I've personally heard the term before. https://pt.wikipedia.org/wiki/L%C3%ADnguas_rom%C3%A2nicas

I haven’t. Maybe it’s not a popular term in Brazil.

Re: Piscina – The Node.js Worker Pool

#38
post #14

What would be nice is a way of preventing the same job running multiple times concurrently. Like if I start a job and a job with the same parameters was already started milliseconds ago then it automatically awaits the already running job rather than starting another.

If you can use redis, redlock can be a nice implementation.

Example: https://github.com/fendy3002/NodeLearn/blob/master/Redlock/s...

Re: Piscina – The Node.js Worker Pool

#40
post #37

Earlier quoted context omitted.

JavaScript is single threaded, Node is most certainly not.

Yes it surely is

My "htop" display surely disagrees. So do my node programs that lag out waiting for disk IO thread pool slots. Sounds does node's documentation: https://nodejs.org/api/worker_threads.html
Post reply on HN