tag:blogger.com,1999:blog-8825992.post114334159810139492..comments2019-02-13T20:54:50.768-08:00Comments on Electric Duncan: Twisted JSON-RPCUnknownnoreply@blogger.comBlogger1125tag:blogger.com,1999:blog-8825992.post-1146865257198455892006-05-05T14:40:00.000-07:002006-05-05T14:40:00.000-07:00Ron, let's see if I can answer your question...Abo...Ron, let's see if I can answer your question...<BR/><BR/>About web services and twisted in general: web services are not viewed in an entirely positive light by the twisted community ;-)<BR/><BR/>About JSON-RPC: there's really no spec. There's a guy who has provided one, but parts of it are dependent upon the solution he has in mind (and has impemented). You simply don't need to do some of the things he's defined in the spec when you use a different appraoch (a more sensible approach, in my mind). So, there's no real spec yet, and there's no equivalent of python's stdlib xmlrpclib (which twisted.web.xmlrpc depends upon).<BR/><BR/>I would only feel comfortable submitting the JSON-RPC code for inclusion in twisted if there was a standard or widely-used library upon which it was based.<BR/><BR/>The JSON-RPC server library I wrote simply passes {'method': method_name, 'params': parameters} These's a simple check for errors, but that's about it. If I have the time, I will flesh out this nascent jsonrpclib. If someone else does, and does a good job, I will use that. twisted.web.xmlrpc imports and makes use of xmlrpclib. My twisted jsonrpc code would similarly make use of such a library, swaping my current simplisitc json data and checks with those of a more robust jsonrpc implementation. What I'm trying to say is that the twisted code is good and solid -- for JSON-RPC over HTTP, it shouldn't need to change at all. But we all need a jsonrpclib for this to really be robust.<BR/><BR/>Oh, and another complication with inclusion into twisted: what about JSON-RPC over TCP? There are a whole set of twisted project (code, goals, standards, structure, etc.) qustions that this raises and would not be easily addressed. What's more, it's actually trivial to implement whatever XML-RPC analog one might need in twisted. (I've recently added a highly-customized RPC functionality to a nevow-based project as a child of the main nevow "page.") So, from the eyss of the core twisted crew, it might not seem such a pressing thing to include, since it's so easy to integrate as-needed. With increased popularity and use cases, however, the likelihood of inclusion increases.<BR/><BR/>At any rate, I will post an update to this blog entry with a URL for downloading an .egg I built.Duncan McGreggorhttps://www.blogger.com/profile/17155270977759488515noreply@blogger.com