[Twisted-Python] some general questions

Joachim Boomberschloss boomberschloss at yahoo.com
Wed Feb 23 10:39:47 EST 2005


Hello,

I'm considering to write a commercial network
application in Twisted, and would like to understand
it a little better. I have several questions for which
I didn't find answers by skimming over the
documentation. I'd be happy to add them to the FAQ
later!

1. I've used Pyro in the past for networking in
Python, and it has a nice name server that enables
each part of the application know the others by acting
as a central directory of server addresses. Is there
anything comparable in Twisted, or maybe a different
idiom, other than specifying explicitly in the client
configuration the addresses of servers?

2. Pyro also uses a UDP broadcast mechanism to make
the name server accessible from every computer in a
network, which relieves clients from requiring an
explicit specification of the name server's location,
which makes it possible to write more friendly,
out-of-the-box applications. Is there an
implementation of such a thing in Twisted? If not, how
complicated is it to make?

3. In the howtos, all client logic is defined before
running a reactor (in the protocol or using
deferreds); In the case of a GUI client, I would like
communication with servers to be trigerred by user
actions. How do I define such events?

4. How do I make clients that are also servers? For
example, a GUI that acts as a front-end to remote
servers, but also accepts random requests (such as
chat).

5. It is often desired to send a message to a remote
server without requiring any response other than a
confirmation that the message was sent. In a previous
project, I made a mechanism that accepts such
messages, and tries to send them periodically until it
succeeds. The sending function is not concerned with
the consequences of the request because it is assured
that the message with be eventually sent, thus it can
send such messages using a simple function call, and
without worrying about the results (i.e. catching
exceptions, or adding errbacks). Is there anything
comparable in Twisted?

6. As I understand it there are three ways to
construct a Twisted application: (i) writing a tap
plug-in (I think) and using mktap, then running it
with twistd, (ii) writing an application configuration
file (tac), then running with twistd, and (iii) making
a runnable script using reactor.run. What are the
benefits of writing a tap plug-in compared with an
application configuration file, and what are the
benefits of using twistd compared with making an
executable script?

7. I want to eventually produce a stand-alone
installable application that will be expected to run
out-of-the-box. I thought about using py2exe, but
couldn't find much information about using it and
Twisted together. Are there other common methods to
achieve stand-aloneness with Twisted?

Thanks,

Joe



		
__________________________________ 
Do you Yahoo!? 
Read only the mail you want - Yahoo! Mail SpamGuard. 
http://promotions.yahoo.com/new_mail 




More information about the Twisted-Python mailing list