Earlier quoted context omitted.
JavaScript is single threaded, Node is most certainly not.
Yes it surely is
Piscina – The Node.js Worker Pool
41–50 of 51 posts
Re: Piscina – The Node.js Worker Pool
#42Could i use it on a serverless platform ?
I did something similar
https://github.com/tim-hub/pambdajs
but I haven't done the comparison on aws lambda yet
Re: Piscina – The Node.js Worker Pool
#43The reason is: don’t wanna be boring from what I could glean.
Re: Piscina – The Node.js Worker Pool
#44What 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.
Re: Piscina – The Node.js Worker Pool
#45Neat! I’m friends with the creator of this and teased him a bit about the name (so many of these projects have weird names now a day) The reason is: don’t wanna be boring from what I could glean.
Re: Piscina – The Node.js Worker Pool
#46Neat! I’m friends with the creator of this and teased him a bit about the name (so many of these projects have weird names now a day) The reason is: don’t wanna be boring from what I could glean.
"piscina" in Italian means "pool". A library for worker pools simply named "pool" in Italian doesn't seem that strange :)
Re: Piscina – The Node.js Worker Pool
#47It's not clear when or how serialization happens.
Supposedly at some point the message I am sending to the worker is serialized, but this is not made clear to the user and it's not made clear when this happens.
A well-designed library would synchronously serialize the given object the moment it is passed in or let the user explicitly handle serialization. But I don't think that's what is happening here.
It appears messages are serialized only eventually and when they are finally sent off to a worker.
If you accidentally pass mutable state in here, you're in for a really confusing and fun debugging session. Likely it'll be a production-only bug too, because during development and testing you're unlikely to have the kind of message volume required to run into some modified-before-sent condition.
CTRL-F "mutable" and CTRL-F "serialize" gives no results, so I don't think the designers thought of this or thought to warn users.
Re: Piscina – The Node.js Worker Pool
#48Re: Piscina – The Node.js Worker Pool
#49Is it just me, or do I see a trend in naming projects using romance language words (Italian/Spanish/France)? Does it sound more exotic? Are these words less crowded?
You needn't use your real name, of course, but for HN to be a community, users need some identity for other users to relate to. Otherwise we may as well have no usernames and no community, and that would be a different kind of forum. https://hn.algolia.com/?query=community%20identity%20by:dang...
Re: Piscina – The Node.js Worker Pool
#50Does anybody use this or anything similar? If so, what problems are you solving?
I’m guessing the fact that node is single threaded