Runtime ECS/channels for streaming

I'm searching for runtime module system which handles various types of channels, including channels suitable for video streaming. I need to instantiate new modules at runtime, and to "hot-plug" new channels between existing modules, from the modules themselves. Each module could have its own thread or process.

To clarify what I mean, an example with a P2P videoconferencing program:

  • The main module launches child modules:
    • server (listens to the network)
    • GUI
    • video acquisition (gets raw images from the webcam)
    • video encoding (encodes raw images into video stream)
  • Video acquisition module sends its data to video encoding module.
  • Each time the server receives a new connection:
    • it creates new modules:
      • client (sends packets to the peer)
      • video decoding (decodes video stream into raw images)
    • it creates new channels:
      • video decoding module -> GUI module
      • video encoding module -> client module
  • The user can create new modules and change channels to add an encryption layer or to add a screen capture source, for example.
  • New modules (e.g. loaded from a .so library) can be added easily since all the plumbing is made at runtime.

A module could register to the module handler the list of the channels it accepts. (e.g. the audio player module only accepts 2 inputs: a ring buffer channel and a standard u8 channel for volume)

Does such a crate exist? (even in other languages, it can be interesting if I have to implement it myself)

1 Like

It seems that the API abstraction layer written by @elois in Duniter could do the job?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.