Re: Developing a network protocol with Python

2005-12-15 Thread Laszlo Zsolt Nagy
Paul Rubin wrote: Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: But how can I transfer pure python objects otherwise? Pyro also uses Pickle and it also transfers bytecode. Pyro in the past used pickle in an insecure way. I'd heard it had been fixed and I didn't realize it still uses

Re: Developing a network protocol with Python

2005-12-15 Thread Irmen de Jong
Laszlo Zsolt Nagy wrote: Mobile objects. Clients and servers can pass objects around - even when the server has never known them before. Pyro will then automatically transfer the needed Python bytecode. I believe that using cPickle and transferring data (but not the code) is still more

Re: Developing a network protocol with Python

2005-12-14 Thread Laszlo Zsolt Nagy
Try Pyro http://pyro.sourceforge.net before rolling your own Python-specific protocol. You are right. I wanted to use pyro before, because it is well tested and it has nice features. Unfortunately, it is not good for me. :-( I already have my own classes. My objects are in object ownership

Re: Developing a network protocol with Python

2005-12-14 Thread Paul Rubin
Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: I already have my own classes. My objects are in object ownership trees, and they are referencing to each other (weakly and strongly). These classes have their own streaming methods, and they can be pickled safely. Standard warning: if you're

Re: Developing a network protocol with Python

2005-12-14 Thread Laszlo Zsolt Nagy
Paul Rubin wrote: Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: I already have my own classes. My objects are in object ownership trees, and they are referencing to each other (weakly and strongly). These classes have their own streaming methods, and they can be pickled safely. Standard

Re: Developing a network protocol with Python

2005-12-14 Thread Paul Rubin
Laszlo Zsolt Nagy [EMAIL PROTECTED] writes: But how can I transfer pure python objects otherwise? Pyro also uses Pickle and it also transfers bytecode. Pyro in the past used pickle in an insecure way. I'd heard it had been fixed and I didn't realize it still uses pickle. I read somewhere

Re: Developing a network protocol with Python

2005-12-13 Thread Laszlo Zsolt Nagy
Tom Anderson wrote: I think to be effective, I need to use TCP_NODELAY, and manually buffered transfers. Why? Because of the big delays when sending small messages (size 1500 bytes). Personally, i'd steer clear of doing it like this, and try to use an existing, language-neutral

Re: Developing a network protocol with Python

2005-12-13 Thread Lawrence Oluyede
Il 2005-12-12, Laszlo Zsolt Nagy [EMAIL PROTECTED] ha scritto: Hello, I would like to develop a new network protocol, where the server and the clients are Python programs. You should use Twisted for this: Writing clients

Re: Developing a network protocol with Python

2005-12-13 Thread Lawrence Oluyede
Il 2005-12-13, Laszlo Zsolt Nagy [EMAIL PROTECTED] ha scritto: I need to send Python objects too. They are too elaborate to convert them to XML. (They are using cyclic weak references and other Python specific stuff.) I can be sure that on both sides, there are Python programs. Is there any

Re: Developing a network protocol with Python

2005-12-13 Thread Irmen de Jong
Laszlo Zsolt Nagy wrote: I need to send Python objects too. They are too elaborate to convert them to XML. (They are using cyclic weak references and other Python specific stuff.) I can be sure that on both sides, there are Python programs. Is there any advantage in using XML if I already

Developing a network protocol with Python

2005-12-12 Thread Laszlo Zsolt Nagy
Hello, I would like to develop a new network protocol, where the server and the clients are Python programs. I think to be effective, I need to use TCP_NODELAY, and manually buffered transfers. I would like to create a general messaging object that has methods like sendinteger recvinteger

Re: Developing a network protocol with Python

2005-12-12 Thread Diez B. Roggisch
Am I on the right way to develop a new protocol? Are there any common mistakes that programmers do? Is there a howto where I can read more about this? If you _must_ develop your own protocol, use at least twisted. But I'd go for an existing solutions out there - namely pyro. No need to invent

Re: Developing a network protocol with Python

2005-12-12 Thread Tom Anderson
On Mon, 12 Dec 2005, Laszlo Zsolt Nagy wrote: I think to be effective, I need to use TCP_NODELAY, and manually buffered transfers. Why? I would like to create a general messaging object that has methods like sendinteger recvinteger sendstring recvstring Okay. So you're really