Wowza Community

Calling a method on clients or calling it by Remote Shared Object, which is faster?

Suppose I have 100 clients which I want to call a method on. Do you know if it generally is faster to call the method by looping through all clients and calling the method by client.call(“Methodname”, …) or will the execution time be faster when the clients subscribe to a Remote Shared Object, listen for variable changes and execute the desired method on variable change. Would it make any difference?

Thank you for any answer or other suggestions.

Hi,

I think this is something that you may need to test by adding timing information to the messages and see how long they take to get to the clients.

Generally, I would have thought that client.call would be more efficient but rso is easier to set up if you don’t need any server side interaction.

Also take a look at the appInstance.broadcastMsg methods. There is one for sending a message to all connected clients or two for sending to a list of clients. These basically wrap the client.call method loop that you would need to do into a single method.

Roger.