[Twisted-Python] Perspective Broker, XMLHttpRequest and JSON

L. Daniel Burr ldanielburr at mac.com
Fri Aug 18 15:44:08 EDT 2006

On Fri, 18 Aug 2006 14:13:15 -0500, Manlio Perillo  
<manlio_perillo at libero.it> wrote:

> radix at twistedmatrix.com ha scritto:
>> On 09:02 am, manlio_perillo at 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  
very different characteristics than HTTP, so you question doesn't really  
sense, as asked.

That said, what you are looking for (callRemote semantics layered over  
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

More information about the Twisted-Python mailing list