[Red5] Servlet strategy.
Andy Shaules
bowljoman at hotmail.com
Fri Nov 6 10:14:45 PST 2009
Hello,
Just about ready to release the red5 silverlight servlet.
I have a question regarding the best strategy for a critical method. The segment stream during truncation should use a synchronized body to prevent potential transfer errors. However, I do not want to force all the tomcat clients to aquire a lock just to read the segment, essentially creating a bottle neck. There is only one thread that runs periodically that touches the critical section.
I could try to use a flag to signal that garbage is running and ask clients to aquire a lock, but then upon completion would I not have all the clients still competing for that lock, even though the need for it has passed.
Any insightful readers out there care to share some java theory on best pratices here?
I want to avoid reference counting on the samples, synchronized methods for the clients, and double buffering ala' DirectDraw buffer flips.
The error rarely comes up, and just causes an array index out of bounds for the reading client, which is caught, however catching an error that is caused by tromping through my critical section is not an acceptable solution.
Just might have all of you guys playing with silverlight this weekend. ;)
Thanks,
Andy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://osflash.org/pipermail/red5_osflash.org/attachments/20091106/20cb3155/attachment.html>
More information about the Red5
mailing list