Interesting. Are you talking about the latency to spawn new workers, or getting data from the main thread to the worker? To give you an idea, this library uses a lazily initialized thread pool (thread-per-core by default), where tasks are shared between workers (like the Tokio library in Rust). This means workers only need to be initialized once, and passing data via structured clone is usually very fast and optimized in most engines. Better yet is to use ArrayBuffer or SharedArrayBuffer, which can be transferred or shared between threads without any serialization overhead.
It usually came from serializing and deserializing objects which here it’s a shared json buffer? But even then there’s a serialization bottleneck right? You’d have to be mindful about how the context and closures work across boundaries. Then there’s also spinning up the workers, but I suppose you could do this ahead of time. Maybe my complaint is self-inflicted and is ultimately avoidable - but the complexity begins to mount.
There’s also the queuing and blocking nature of web-workers, I wish they could asynchronously process messages the same way js IO works, but that’s not the case. Rather you are batching full units of work. The mental model is different.
Anecdotally in Firefox I must have run into some memory leak issues and had to hard restart.
Ultimately I ended up going with service workers, which yes sounds strange but I found to be much easier to work with. Cancellable requests, async, long living in the background … but maybe it just works best for me ;)
One state in India is particularly strong with its labour centric protectionism. As far as I have seen, most families' earnings come from one family member working in "Gulf". The labour unions there are a big reason why industry hardly ever takes root. One example: https://x.com/Bharatiyan108/status/1948757576427901138
The immigration route only works temporarily, of course: their children will no longer be immigrants and less likely to remain in that business. Hence why relying on immigration to keep replenishing some sector is like having anemia and living off blood transfusions. You’re effectively a vampire.
True, the closest thing i like in the node.js backend world is nestjs. It’s a solid framework for building apis, but as an mvp framework, it’s not quite on the same level as laravel, rails, or phoenix.
Nestjs is popular so there must be something to it. The problem is the complexity. Once you get a certain amount of complexity and meta programming in js you get significant slowdowns. Abstractions are expensive. Also the decorators and DI are weird
I used to feel the same way, but at a certain level of Node.js experience I came to prefer the backend JavaScript idiom. It's much lighter and more pragmatic, and gives the knowledgeable engineer a lot of flexibility. So stick with it.
Quite the opposite IMHO. This helps reduce people who would hypothetically drunk drive on a Saturday evening, which in turn decreases the possibility that someone dies because of that (either the driver or a victim that was just passing / driving by).
Tbh, the sooner we remove the human from the equation, the better. It's scary to think that we allow so many careless people to drive vehicles that can kill people. I'm not talking just about drunk driving, but all the sort of distractions (smartphone, looking somewhere else, ...).
London specifically, AFAIK after midnight has no tube service. This means that Waymo (or whoever takes a similar initiative) actually helps towards creating a public transportation service that is cheaper and even safer than the current one. I'm personally all up for it - don't tax innovation!
> This helps reduce people who would hypothetically drunk drive on a Saturday evening
This was solved by taxis, and now uber, decades ago. If you're dumb enough to drive under influence in 2025 the cure isn't a driverless taxi it's 10 years in jail.
Sadly jail time doesn't often come to those who do it (at least, from experience / hearing stories of intoxicated drivers) and the consequences are paid by those who aren't intoxicated (e.g: getting killed by a drunk driver).
It's definitely not a cure, but removing the human factor (aside from the intoxication part) is anyways a very good goal IMHO.
Oh and btw, I've seen also taxi / uber drivers that were under the influence of alcohol / cocaine. Humans are the problem.
One argument would be that a driver in a cab will pay tax, a robot taxi will pay a lot less. That is quite a lot of money that is funneled to private companies instead of being used to improve our infrastructure.
reply