Hi,

I was working on improving Binary fields by removing the base64 encoding
because it increase by ~4/3 the size and the base64 module has a limited size
for input.
For XML-RPC, we can not send any binary data like that but they have a binary
tag that encode in base64 the content. So I need to have a Python type to
make the difference between string and data. I choose buffer because it is
what use psycopg2 by default.
That works well for XML-RPC and jsonrpc but not for the NetRPC because we use
Pickle and buffer can not be pickled.
So here comes my proposal to drop NetRPC for jsonrpc. I designed NetRPC (at
Tiny) because XML-RPC got some issues and I think now those issues can be
fixed by jsonrpc:

    - XML encoding was slow, json is fast (even faster than Pickle)

    - XML-RPC was opening a socket for each call. This is fixed now (in Python
      >= 2.6) because BaseHTTPServer support "keep-alive".

    - XML was large, json is quiet small and I have added to Tryton's
      BaseHTTPServer the support of gzip encoding.

And one more advantage is the security, json format is really static data
only when for Pickle we needed to ensure about the security of what we decode.


I propose to write a small python module that use httplib to support jsonrpc
request.


PS: being based on HTTP could bring the support of Proxy.
-- 
Cédric Krier

B2CK SPRL
Rue de Rotterdam, 4
4000 Liège
Belgium
Tel: +32 472 54 46 59
Email/Jabber: [email protected]
Website: http://www.b2ck.com/

Attachment: pgpfxWhdXNTFw.pgp
Description: PGP signature

Reply via email to