Rob Shortt wrote: > Use a Twisted reactor for the main/event loop. This should make > freevo more responsive and keep it from blocking on stupid things > like network activity. It will also let us easily turn Freevo main > into a XML-RPC server for receiving communications from > recordserver.
It would also make it possible to spend more time searching bugs. Let me explain: I may repeat myself but threads are bad. Remember the bug where Aubin got a STOP event on each second mp3 he played. It worked for me and was a threading bug I found after several hours. Or the bug when playing stopped after 5 seconds? Again, it worked for me and was a threading problem. I spent hours to find these bugs and tried to remove all threads from Freevo. The two remaining threads are checked spending hours of checking. To make it worse: twisted uses threads I don't know about. I need to read the twisted code to find bugs. I won't do that! If a rpc is called in the recordserver, is it a thread? If a second rpc comes in at the same time, are this two threads? On thread in sequence? If they are two threads, what happens if they both try to write a file at the same time? Do you lock? What if objects inside memory? Locking? Were? When do we need this? So as conclusion: do not add a twisted main loop to Freevo. We may need more time to keep us from blocking, but we save much more time searching bugs. At the university I work, we developed and use mbus (www.mbus.org). Since we all hate threads, it's 100% thread free and there is also a python interface. Communication over mbus is: secure, fast, language independent (C/C++/Perl/Python) and supports rpc based communication. A co-worker using Freevo now ordered a DVB-T card. As I told him we use twisted for the recordserver, he said he would try to find a better way. Dischi -- In the beginning, there was nothing, which exploded. -Terry Pratchett ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ Freevo-devel mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/freevo-devel