List Info

Thread: New feature: deferred results




New feature: deferred results
user name
2006-11-24 20:56:59
Hi,

Red5 supports a new feature starting from r1572:
"Deferred results".

Methods that are known to run quite some time can move their
actual
processing to a background thread and return an instance of
"org.red5.server.net.rtmp.DeferredResult" instead
of the real result.
Later when the result of the method is available, the thread
can
use "DeferredResult.setResult(Object)" to send it
to the client.

Using this technique, the IO thread that originally invoked
the
method can be released a lot earlier and doesn't have to
wait for
the result.

Joachim

_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

New feature: deferred results
user name
2006-11-26 10:10:56
Hi,

Red5 supports a new feature starting from r1572: "Deferred results".

Methods that are known to run quite some time can move their actual
processing to a background thread and return an instance of
"org.red5.server.net.rtmp.DeferredResult" instead of the real result.
Later when the result of the method is available, the thread can
use "DeferredResult.setResult(Object)"; to send it to the client.

Using this technique, the IO thread that originally invoked the
method can be released a lot earlier and doesn't have to wait for
the result.
Great feature ! 
Thanks


Joachim

_______________________________________________
Red5devs mailing list
 Red5devsosflash.org">Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

New feature: deferred results
user name
2006-11-26 10:14:16
Joachim Bauch wrote:

> Using this technique, the IO thread that originally
invoked the
> method can be released a lot earlier and doesn't have
to wait for
> the result.


I bet this helps to decrease both cpu and memory usage when
streaming? ;)

-- 
Red5 wiki and bug tracker:
jira.red5.org | wiki.red5.org [use JIRA account]

Russian Flex knowledge base:
flexwiki.novemberain.com

Chasing the beauty in programming:
www.ruby-lang.org | www.rubyonrails.org

_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

New feature: deferred results
user name
2006-11-26 10:10:56
Hi,

Red5 supports a new feature starting from r1572: "Deferred results".

Methods that are known to run quite some time can move their actual
processing to a background thread and return an instance of
"org.red5.server.net.rtmp.DeferredResult" instead of the real result.
Later when the result of the method is available, the thread can
use "DeferredResult.setResult(Object)"; to send it to the client.

Using this technique, the IO thread that originally invoked the
method can be released a lot earlier and doesn't have to wait for
the result.
Great feature ! 
Thanks


Joachim

_______________________________________________
Red5devs mailing list
 Red5devsosflash.org">Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

New feature: deferred results
user name
2006-11-26 10:14:16
Joachim Bauch wrote:

> Using this technique, the IO thread that originally
invoked the
> method can be released a lot earlier and doesn't have
to wait for
> the result.


I bet this helps to decrease both cpu and memory usage when
streaming? ;)

-- 
Red5 wiki and bug tracker:
jira.red5.org | wiki.red5.org [use JIRA account]

Russian Flex knowledge base:
flexwiki.novemberain.com

Chasing the beauty in programming:
www.ruby-lang.org | www.rubyonrails.org

_______________________________________________
Red5devs mailing list
Red5devsosflash.org
http://osflash.org/mailman/listinfo/red5devs_osflash.org

[1-5]

about | contact  Other archives ( Real Estate discussion Medical topics )