Dan,
The bandwidth configuration is designed to use a tree hierarchical structure
to manage bandwidth. This model is intended to restrict the child node so
that the bandwidth consumed by the child nodes will not exceed the total
configuration of the parent node.
For example, the stream object is the child of connection object. The
bandwidth consumed by stream object can't exceed the bw configured for
connection.
Take a look at the interface: org.red5.server.api.IBWControllable. Each
bandwidth controllable has a parent. The hierarchy designed on trunk is just
for Connection (1) --> Stream (*).
It's interesting to make SubScope as a parent to Connection. That will solve
the problem you mentioned below. As of now, the Scope class does not
implement IBWControllable but it's not hard to do so. (Just follow the way
RTMPConnection does it)
After making Scope bandwidth controllable, you can change the
RTMPConnection.getParentBWControllable() method (to override the class might
be a better choice though) to return the scope the connection belongs to.
(The default implementation return null, which means the bandwidth limit
from parent is unlimited.)
You might also want to make the whole Scope hierarchy as the same tree
hierarchy as IBWControllable. You can simply return the parent scope in
Scope.getParentBWControllable() to accomplish this goal.
One thing you should notice is that the bandwidth control framework design
in Red5 server is very flexible and it might not be suitable to define
strictly one unique model to fit all needs (one might want a client-based
bandwidth configuration: Client(1) --> Connection(*) --> Stream(*).). It'll
be better to get more user inputs to nail down a suitable solution.
On 5/28/07, Dan Rossi <[EMAIL PROTECTED]> wrote:
Hi i was wondering how the bandwidth configurer is suppose to work, ie
is it application wide or per connection ?
public void setOverallBandwidth(long value)
{
getChannelBandwidth()[IBandwidthConfigure.OVERALL_CHANNEL] =
value * 1024;
}
public void setInitialBandwidth(long value)
{
getChannelInitialBurst()[IBandwidthConfigure.OVERALL_CHANNEL] =
value * 1024;
}
I have these but im not sure if they affect just the connection or the
entire app. Im trying to set these on a per subscope basis. So
connections so one sub scope is shaped different to another subscope.
And for instance if the bandwidth does get shaped on the particular sub
scope it will either stop further connections or just simply shape the
streams.
Let me know having to work out how to setup some config which gets
loaded into a hashmap on app startup which can be called on room
connections. Our current setup has bandwidth limits of 7MB per "sub
scope" on a windows media server.
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org
--
I cannot tell why this heart languishes in silence. It is for small needs it
never asks, or knows or remembers. -- Tagore
Best Regards
Steven Gong
_______________________________________________
Red5 mailing list
[email protected]
http://osflash.org/mailman/listinfo/red5_osflash.org