[Twisted-Python] Need help for structured application development
Einar S. Idsø
einar.twisted at norsk-esport.no
Thu Feb 18 17:41:56 EST 2010
On Thu, Feb 18, 2010 at 11:36 AM, Johann Borck
<johann.borck at densedata.com> wrote:
> Einar S. Idsø wrote:
>> [...] I guess I need a factory that launches server checker
>> objects not as a result of a TCP/UDP connection, but as a result of
>> new servers being detected.
> How does this detection work? Are those servers based on twisted? Also,
> do you control them (start/stop/configuration), do you have access to
> the machines they're on, or are you detecting them over network only?
Johann: Thanks for your response. I do control these services myself,
and they run on our own hosts, but they are created and spawned via an
external web interface which also has a Soap API. I do not plan on
starting/stopping them via this application I'm developing. I just
need to get the list of servers and start polling them. I get the list
by calling the Soap webservice. It simply outputs a list of servers,
and it is my job to query each and every one at specific intervals for
I was thinking I would have the Soap-query run as a timed function
every few minutes, and compare the new list with the old to work out
any new/removed servers. Whenever a new server is identified, I will
spawn a new object to deal with it, including, but not limited to,
polling at given intervals. What kind of object should this be? A
ClientFactory? Another kind of object that is already defined
somewhere in Twisted? A completely custom object, built from scratch?
I am leaning towards ClientFactory, but I am definitely not certain.
Glyph: Thanks for letting me know I'm at least asking correctly :)
More information about the Twisted-Python