<html><body>On 12:26 am, daedalus@eigenmagic.com wrote:<br /><br />>I have had an idea to implement an event manager to glue a few different<br />>system components together, and I am wondering which pieces of twisted<br />>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.  In fact, it really sounds like what Twisted is already :).  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.  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.  That would just add complexity and overhead without any benefit.  So here are some things you've described which sound, to me, exactly like what Twisted already does:<br /><br />>I have a desire to provide scheduler functionality (at time x, take<br />>action y).<br /><br />This sounds like reactor.callLater().  (Or if you're talking about persistent scheduling, axiom's IScheduler.schedule).<br /><br />>Data is received from an external entity by a listener.<br /><br />This sounds like IProtocol's dataReceived method.<br /><br />>A program polls for data, succeeds and notifies the event manager of the<br />>data that was polled. The event manager notifies a 'poll storage' object<br />>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.  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/ .  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>