Hi Justin,<br><br>The scheduling is easily doable using twisted as a scheduler eg) callLater or task.LoopingCall.<br><br>Writing an event dispatcher isn&#39;t too tough either. A very simple one allows you to register using a hash-able &quot;name&quot; object eg) a string. You call the dispatcher with the same object when you want to notify the registered handlers. Twisted has one see: 
<a href="http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html">http://twistedmatrix.com/docum</a><a href="http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html">
ents/current/api/twisted.python</a><a href="http://twistedmatrix.com/documents/current/api/twisted.python.dispatch.EventDispatcher.html">.dispatch.EventDispatcher.html</a> . That could easily be tied in to generating events from a listener having received data. 
<br><br>It seems that you have various programs that you want to coordinate using twisted. One way to accomplish this is like you said to write an event manager with twisted. Your listeners would connect (how? over sockets using existing protocols or write your own...or use Perspective Broker) to your twisted event manager to generate &quot;received data&quot; events. Your &quot;received data&quot; event handlers could spawn processes and pipe the data to them, or you can use twisted&#39;s adbapi to store the data in the database.
<br><br><br>On 4/11/07, Justin Warren &lt;<a href="mailto:daedalus@eigenmagic.com">daedalus@eigenmagic.com</a>&gt; wrote:<br>&gt; Hi folks,<br>&gt; <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>&gt; <br>&gt; I have programs that poll for data.<br>&gt; I have a database that stores polled information.
<br>&gt; I have programs that listen for data to be provided to them from<br>&gt; external entities.<br>&gt; <br>&gt; I have a desire to provide scheduler functionality (at time x, take<br>&gt; action y).<br>&gt; <br>&gt; It seems to me that I could join all of these things via an event
<br>&gt; manager:<br>&gt; <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 &#39;poll storage&#39; object<br>&gt; that stores the data in the database. It could also notify other things.
<br>&gt; <br>&gt; Data is received from an external entity by a listener. The listener<br>&gt; notifies the event manager of the data. The event manager notifies an<br>&gt; object that stores it in the database, or runs a script, or uploads
<br>&gt; something to flickr, or whatever.<br>&gt; <br>&gt; Time passes. The event manager notifies interested objects that this is<br>&gt; so. They take whatever action they deem necessary.<br>&gt; <br>&gt; None of this is new, so I wonder what others have done in this area? Am
<br>&gt; I heading down a dangerous path? What are the traps for new players? Has<br>&gt; someone already written something that does all of this that I can use,<br>&gt; saving myself time and headaches?<br>&gt; <br>&gt; --
<br>&gt; Justin Warren &lt;<a href="mailto:daedalus@eigenmagic.com">daedalus@eigenmagic.com</a>&gt;<br>&gt; <br>&gt; _______________________________________________<br>&gt; Twisted-Python mailing list<br>&gt; <a href="mailto:Twisted-Python@twistedmatrix.com">
Twisted-Python@twistedmatrix.com</a><br>&gt; <a href="http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python">http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python</a><br>&gt; <br>