On Fri, 18 Aug 2006 14:13:15 -0500, Manlio Perillo
radix@twistedmatrix.com ha scritto:
On 09:02 am, manlio_perillo@libero.it wrote:
Hi.
Is it possible (at least in principle) to serialize objects in JSON and to do requests via HTTP?
That is, to make possible to use Python functions and objects via JavaScript, using Perspective Broker.
Please post to twisted-web about web-related questions in the future.
Well, this is a specific question about Perspective Broker.
No, PB does not know how to talk HTTP or JSON.
Yes, I know. I was just curious to know if PB is extensible so that I can change the serializer and the transport layer.
Perhaps I am being overly particular, but HTTP isn't a transport layer; it is an application protocol. PB is also an application protocol, and it is one with very different characteristics than HTTP, so you question doesn't really make sense, as asked. That said, what you are looking for (callRemote semantics layered over HTTP) does exist: Nevow.Athena gives you exactly what you want. It uses JSON for serialization, provides callRemote semantics, and uses HTTP. It isn't an exact match with PB, of course, but I think it is more than adequate for the uses to which it is put Hope this helps, L. Daniel Burr