[Twisted-Python] how to change an qt4 applicaion using twisted?

Laurens Van Houtven _ at lvh.io
Sun Nov 17 05:34:14 MST 2013


On Sun, Nov 17, 2013 at 11:10 AM, yangyouxiu <yangyouxiu at gmail.com> wrote:

>  Thank you very much.
>
> Is it reasonable to bulid only one protocol to deal with datas tranports
> between client and server ? If in this way, i believe i have to write lots
> of case to deal with the message, such as to call differnent method,it's
> impressive.
> Is there any suggestions?
>

It might be. For simple client<->server interactions using messages, it may
be a much better idea to use some existing machinery instead. Many APIs use
REST. Twisted provides the tools to do REST, but it also provides other
(IMHO better) mechanisms. For example: AMP is a message-based asynchronous
protocol. Alternatively, twisted provides PB, which allows you to share
objects over the wire.

If you like the mental model of a client and a server sending messages to
each other, AMP is probably your thing :)

cheers
lvh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://twistedmatrix.com/pipermail/twisted-python/attachments/20131117/095312d3/attachment.html>


More information about the Twisted-Python mailing list