<html><body>On 12:26 am, daedalus@eigenmagic.com wrote:<br /><br />&gt;I have had an idea to implement an event manager to glue a few different<br />&gt;system components together, and I am wondering which pieces of twisted<br />&gt;would be best suited to the task, or even if I should attempt it at all.<br /><br />Nothing about what you're suggesting sounds dangerous or weird. &#160;In fact, it really sounds like what Twisted is already :). &#160;If you want to write a layer over it to provide higher-level events, that's fine; most Twisted applications do something of the sort. &#160;The one thing I'd caution you against is attempting to make something at the same level of abstraction as Twisted by building on top of Twisted. &#160;That would just add complexity and overhead without any benefit. &#160;So here are some things you've described which sound, to me, exactly like what Twisted already does:<br /><br />&gt;I have a desire to provide scheduler functionality (at time x, take<br />&gt;action y).<br /><br />This sounds like reactor.callLater(). &#160;(Or if you're talking about persistent scheduling, axiom's IScheduler.schedule).<br /><br />&gt;Data is received from an external entity by a listener.<br /><br />This sounds like IProtocol's dataReceived method.<br /><br />&gt;A program polls for data, succeeds and notifies the event manager of the<br />&gt;data that was polled. The event manager notifies a 'poll storage' object<br />&gt;that stores the data in the database. It could also notify other things.<br /><br />In python, "notifying things" is just calling functions or methods; in the most advanced case, it's still just calling functions or methods which have been placed into a list. &#160;Twisted has lots of such lists, and it doesn't seem worthwhile to me to unify them into a central structure.<br /><br />If it does make sense to you to unify them, you might want to look at Louie: http://pylouie.org/ . &#160;I've never used it and I don't really get what it's for, but several folks that I know seem to like it a lot for gluing events together.<br /></body></html>