[Twisted-Python] Perspective Broker vs XMLRPC for this...

Jean-Paul Calderone exarkun at divmod.com
Thu Sep 21 18:57:56 MDT 2006


On Thu, 21 Sep 2006 20:18:52 +0000 (UTC), Yoheeb <yoheeb at yahoo.com> wrote:
>Hi all,
>
>I have never used twisted, but really would like to.  I am in the middle of
>rough design of an xmlrpc OR OTHER remote method invocation type system.  I am
>debating the use of xmlrpc vs the use of perspective broker.  (for a quick
>prototype I will likely use the python base xmlrpc lib, but just for proof of
>concept)
>
>I need to support both java and python. (and really c/c++ in some fashion would
>be nice also) from both "local" and remote sources.
>
>I really need something that is secure as well, although I can work around
>security with either via pre-post process encrytption techniques as needed.
>
>I will need the ability to expose/hide methods based on the user privledges.  I
>envision a single "services" like tool that populates a list of things you can
>run based on user rights.  For this I need usernames/pwds to somehow be secure
>(md5, rot13, whatever, just something)
>
>I will have connections over vpn, local code calls, and eventually over local
>serial and usb ports. (assuming everthing looks like a simple IP socket stream)
>
>Finally, I have somehting else running a simple xmlrpc server on the system, and
>may want to propogate calls to that with some magic wrapper function. (to be
>specific, I am running a copy of eXist, the xmldb)
>
>Breathe....
>
>Ok, so with all those rough requirements in mind, will PB be worthwhile?  There
>is no preference from the client applications point of view.
>
>Right now I am doing a proof of concept, and have a ton of issues that could be
>neatly solved by a nice RMI system that is secure.

All of this sounds doable, either with PB or with XML-RPC.  Certain parts
will be easier with PB, like permissions (since PB gives you remote objects
which can represent the capabilities available to a particular user - with
XML-RPC you don't have remote objects, but you can cobble together something
equivalent, it'll just be either slightly messier or slightly harder).  Other
parts will be easier with XML-RPC, like accessing the system from a C or C++
application, since there are numerous XML-RPC implementations for those
languages, and as far as I know no complete PB implementation for either.  A
third choice to consider may be AMP, which would be easy to implement in C or
C++ (and someone else may have done it by the time you actually get around to
that part of your project), although it also does not provide a remote object
system natively.

Jean-Paul




More information about the Twisted-Python mailing list