Remix.run Logo
jkhdigital 2 hours ago

This article concludes with the following statement:

> So much of development is trade-offs, and you have to choose according to the situation, which ultimately comes down to the developer’s experience and judgment.

It’s a great article, but I think it is a bit behind the ball in framing scheduling problems as a matter of “experience and judgment”. The problem of allocating work to a scarce resource is one of the oldest and most well-studied in all of computer science. It would make sense to go consult a textbook on the matter before trying to reinvent the wheel.

spockz an hour ago | parent | next [-]

Well yes. But most of those studies assume/assert control over the environment. In this case you are running in the browser and you have to deal with the primitives it gives you. Both in compute management (threads/workers), communication (RPC, messages, shared memory, sockets), as scheduling (like having yield or not.

I’m not sure whether inventing a setup like green threads in JavaScript/workers would even be possible.

That is not to say that we should just forget about those learnings though.

TonyStr 2 hours ago | parent | prev [-]

Do you have any suggestions for books on the topic?