On Sun, Nov 17, 2013 at 11:10 AM, yangyouxiu <yangyou...@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
_______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python