Dirk Meyer wrote: > Duncan Webb wrote: >> Dirk Meyer wrote: >>> Duncan Webb wrote: >>>> Dirk Meyer wrote: >>>>> Jason Tackaberry wrote: >>>>>> On Sun, 2007-08-26 at 07:59 -0700, Michael Beal wrote: >>>>>>> Wouldn't it make sense to use SQLite for this instead? The record >>>>>>> schedule is currently a simple DB file in XML format being accessed by >>>>>>> multiple threads. I can see where a race condition could be created >>>>>> Freevo 2 will use an sqlite-backed EPG (kaa.epg). >>>>>> >>>>>> I have no idea if it would be worth Freevo 1 going this route. It may >>>>>> well be more work than you'd expect. But on the other hand, I also like >>>>>> the idea of Freevo 1 increasingly using kaa modules, as it's an >>>>>> excellent source of testing for these modules on which Freevo 2 is being >>>>>> built. >>>>> Could be possible. It should be easy to replace the freevo mainloop >>>>> with kaa.notifier at a minimum level so that it will work. >>>>> kaa.notifier running is a must-have for kaa.epg. I could do it. >>>>> Should I? >>>> By all means, yes that would be really good. The recordserver code has >>>> become rather horrid :( >>> Ah, you are talking about the recordserver. Sorry, I meant Freevo >>> itself. The recordserver is using twisted, right? I guess someone >>> should do a rewrite of the communication code using the XMLRPC code >>> From kaa.base and kaa.notifier as loop. >> You mean replacing the rc code, that would be great too. > > I did a small change, patch attached. Do not include it directly, it > breaks helpers using the rc module, I only tested freevo itself. > > I removed the real mainloop part from rc. The event stuff is handled > by kaa.notifier. This means Event object can just call a post() method > on its own, no need for the global rc object. If something wants to > listen to events, add a global eventhandler. I have done this in > main.py, The self.event_callback is removed from rc. If someone else > wants to get notified, run > kaa.notifier.EventHandler(callback_to_call).register() > > Since all plugins require the rc module to call them, there is a poll > function now calling the input plugins and the time based > plugins. This function is called with a 0.01 sec timer. A future > version of Freevo should not require this, plugin can register a poll > function with a timer on their own, they can also register socket > callbacks. For more details see > http://freevo.sourceforge.net/cgi-bin/freevo-2.0/SourceDoc/KaaNotifier > > I hope this small patch is a path for you to get rid of twisted and > give freevo a real mainloop.
Hmm, a bit late with the reply but many thanks for this. In order to proceed with this I'll create a 1.7 branch and install the patch against the main branch. But first I'll read the docs. First, I would like to fix the weather feed problem using the 1click service from weather.com. But I need to get permission from weather.com to use their 1click service. Then I would like to install this patch so that I can get rid of twisted for all the servers except the web server. Duncan ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Freevo-devel mailing list Freevo-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/freevo-devel