How is parallelism implemented in the ECS?

(Erlend Sogge Heggen) #1

Suskeyhose:
Is there a good place to start to understand how parallelism is implemented in the ECS? I recently wrote a generic ECS in C and I was thinking about how I could make it parallel without making it basically functional, and I’m curious what others have done.

1 Like

(Erlend Sogge Heggen) #2

happens:

And <@189169310680219649>, there was a blog article on specs, it’s pretty old tho: http://kvark.github.io/ecs/rust/2017/03/08/specs.html
There’s a few good links in there though I think, and it explains some thoughts behind the development

Also the specs book could be a useful resource: https://slide-rs.github.io/specs/01_intro.html

specs uses rayon behind the scenes iirc, so that might also be worth a lot: https://github.com/rayon-rs/rayon

azriel:

shameless plug, this slide may be useful:

https://gitpitch.com/azriel91/ecs_paradigm/master?grs=github&t=sky#/20/2

Kae:

For the actual dispatcher scheduling, might want to check out how shred divides systems into groups and stages to make it safely parallel. Comments in this file
https://github.com/slide-rs/shred/blob/master/src/dispatch/stage.rs#L1

2 Likes