.comment-link {margin-left:.6em;}

2005/08/20

async xmlrpc in python?

have been looking into the xmlrpc module in python and was wondering how difficult it would be to use it to buidl a async xmlrpc client.
reason for this? well ive been playing with a socket server for flash(send evil xml \0 byte seperated, greatings to all C coders) and would like to have an easy way to use data from inside zope, this elaves you with two alternatives:
- write a ZODB client
- use xmlrpc to cal zope objects
using a ZODB client seems like the "proper" way of doing this but how much work is it? zope stuff has the slight disadvantage of being quite complex, due to its power that is i believe. this makes it somewhat of a pain to use in a quick proof-of-concept hack, you have to learn before you can go and hack..,]]
so i wonder how much work would it be to make a async version of xmlrpclib? we could use the encoding/decoding features of it so we dont have to bother about the marshalling. it seem pretty straight forward to do. when you call a remote object we marshall the variables et al, stick it in a buffer, open a socket to the server, write our buffer(in a async way), read the repsonse into a buffer(asyncig), we know when we reach the end of the response(length header? its http afterall), close down the socket, unmarshall response, call the callback, c'est bonne? this makes me wonder why has noone done it? does twisted provide soemthing liek this?

oh and we could hide it in a threadpool, but this would be cheatign right?,]]

0 Comments:

Post a Comment

<< Home