[Twisted-Python] A C/S Application over Internet

Hi, I want to develop an C/S app over internet using twisted Perspective Broker. The server will run as a windows service, and the clients will be wxPython desktop applications. Has anyone done the same thing or known the trick to do it? Shoud I use PB or Pyro or SPyro? Which is the best? Thanks.

On Aug 27, 2009, at 9:33 AM, 陶艺夫 wrote:
I started with Pyro on a project years ago, and ended up switching to PB in short order. I was less familiar with Twisted at the time, but I still found PB to be superior. Of course, I haven't paid attention to Pyro in years and know virtually nothing of SPyro. Of course, you are coming into a Twisted list and asking if you should use Twisted or something else, so my response is naturally a little biased. ;-) -phil

On Aug 27, 2009, at 10:57 AM, 陶艺夫 wrote:
Great! I also remembered one thing that I found was extremely useful when dealing with a GUI app that communicates over PB. Since PB assumes every remote method call will take an arbitrary amount of time to execute, you can delay the response from the client as long as you need. For example, let's say the server sends a block of text to the client for editing. Your client-side function can create a Deferred, hold a reference to it somewhere, and return that from the client function. PB won't actually send a response until you invoke the callback() method on that Deferred, so you can pop open a GUI window, let the user edit the text (or just sit there staring at it for an hour), and then trigger the callback when the user hits 'Save'. Very useful, although I wrote some incredibly stupid code to emulate this long before I realized how easy it was ;-) -phil

On Aug 27, 2009, at 9:33 AM, 陶艺夫 wrote:
I started with Pyro on a project years ago, and ended up switching to PB in short order. I was less familiar with Twisted at the time, but I still found PB to be superior. Of course, I haven't paid attention to Pyro in years and know virtually nothing of SPyro. Of course, you are coming into a Twisted list and asking if you should use Twisted or something else, so my response is naturally a little biased. ;-) -phil

On Aug 27, 2009, at 10:57 AM, 陶艺夫 wrote:
Great! I also remembered one thing that I found was extremely useful when dealing with a GUI app that communicates over PB. Since PB assumes every remote method call will take an arbitrary amount of time to execute, you can delay the response from the client as long as you need. For example, let's say the server sends a block of text to the client for editing. Your client-side function can create a Deferred, hold a reference to it somewhere, and return that from the client function. PB won't actually send a response until you invoke the callback() method on that Deferred, so you can pop open a GUI window, let the user edit the text (or just sit there staring at it for an hour), and then trigger the callback when the user hits 'Save'. Very useful, although I wrote some incredibly stupid code to emulate this long before I realized how easy it was ;-) -phil
participants (2)
-
Phil Christensen
-
陶艺夫