Application architecture: Transports, Producers, and Consumers

Hi there,

I am developing a one-to-many application and I have set up the base architecture and logic and I would like to confirm I’m on the right track before proceeding.

A room has a single “host”, who sends media but does not receive. For this user, I have:

  • Created a single Send Transport
  • Created a video producer and an audio producer (on both client and server)

The other users (i.e. the “host watchers”) in the room only receive media.

For these users, I have:

  • Created a single Receive Transport that consumes both of the hosts’ producers (mentioned above)
  • Created two consumers (one for each of the host producers)

Does this overall seem correct for this one-to-many application? The one part I’m concerned with the most is a single Recieve Transport that consumers both of the hosts’ producers. It seems to be functioning properly, but I would like to confirm before proceeding.

Any thoughts or feedback are greatly appreciated.

That’s basically how mediasoup works, yes.

1 Like

The transport is the user<>server connection. You can produce/consume any amount of times based on app code.

For myself, I generally allow 1 broadcast but that can consist of audio only, video only or both but under one transport. Viewers get a transport per published content, so if 12 videos, 12 transports.

I’d say IBC answered this but to further fill your bowl, you want one to many, eventually a single core cuts off, so I’d try to study up on pipetransports, or piping routers locally; utilizing queues so your order of operation doesn’t slip.

1 Like