NSSTC / sim-ecs

Batteries included TypeScript ECS
https://nsstc.github.io/sim-ecs/
Mozilla Public License 2.0
84 stars 12 forks source link

Implement threading #10

Closed minecrawler closed 2 years ago

minecrawler commented 4 years ago

Browsers can use WebWorkers and NodJS can use a Cluster.

Ideas:

minecrawler commented 4 years ago

Better: set up a worker per system and use the communication channel to sync the data set. Then execute the workers per execution group in the execution pipeline, so that everything inside a group is truely executed in parallel.

Which still asks for a way to sync the components :/

I also wonder how efficient syncing would be, especially for worlds where the groups are small, but there is plenty of data to sync.

minecrawler commented 2 years ago

I think, since 2020Q2 a lo happened and with v0.5.0, a lot of things are in place to come up with a more concrete plan.

What's left is to create an API for scheduling and syncing multiple worlds easily and still have a certain degree of determinism and overview. Spawning of threads (service workers or process-clusters) should be under the hood, just for the extra comfort!