[Twisted-Python] some general questions
Kevin Dangoor
kid at kendermedia.com
Wed Feb 23 11:45:16 EST 2005
Joachim Boomberschloss wrote:
>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?
>
>
Twisted Spread offers the Perspective Broker, which I think would be
similar to Pyro:
http://twistedmatrix.com/products/spread
It's async, which is probably a big difference in programming style.
What I've read about Pyro also seems to imply shuttling of code back and
forth which is not something PB does.
>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?
>
>
Some people have integrated pyzeroconf with twisted. Zeroconf (aka
Rendezvous) is a protocol for discovering services on your network (it's
how Apple's products like iTunes work).
>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?
>
>
Not sure I understand the question here. I don't believe that using
Twisted changes how you receive your events. It changes all of your
network access to be asynchronous, but otherwise the rest of your code
sure work as you're used to.
>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).
>
>
You just set up your client software to listen on a port, providing a
particular service.
>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?
>
>
py2exe works fine with Twisted (as does py2app on the Mac)
Kevin
More information about the Twisted-Python
mailing list