[OGo-XML-RPC] Re: [OGo-Users] Idea / supporting o

Helge Hess xmlrpc@opengroupware.org
Sat, 19 Jul 2003 18:44:12 +0200


On Samstag, 19. Juli 2003, at 1:04 Uhr, Tupshin Harper wrote:
> Looking at the list of methods, it looks reasonably complete (at least 
> enough to keep me busy for a while). I would be interested in your 
> thoughts on what a better XML-RPC api would look like,

Well, several things, eg currently the XML-RPC daemon mostly uses a 
"generic" mapping between the DocumentAPI document objects and XML-RPC 
dictionaries.
This results in XML-RPC structures which are not necessarily optimized 
towards XML-RPC clients (eg difficult to construct in a Python prompt).
On the other side, because the mapping is so easy, this is the reason 
why it is quite complete.

Simple example: qualifiers need to be specified as dictionaries, like 
(from mind):
   {
     op = "AND";
     qualifiers = (
       { key="name"; op="="; value="donald" },
       { key="birthday" op="<"; value="20020808T1212Z" };
     );
   }
instead of just a string:

   "(name='donald' AND birthday=(date)'20030808T1212Z')"

which could be easily parsed by the server. SandStorm contains a lot of 
work which tries to improve on that.

Another point is, that - as usual for most XML-RPC servers - the API is 
attached to a single URL, eg /RPC2. I would personally like to see a 
mixture between REST and XML-RPC approaches which would lead to several 
advantages.
This is the core of the ZideStore/SOPE "idea", it maps OGo data into an 
URL tree, you might also want to take a look at this:

   http://developer.skyrix.com/01_objc/05_sope/sopeintro.html

I would like to see an API which doesn't dismiss HTTP basics, like URL 
trees. Eg to search for appointments in a group calendar, I would use

   /zidestore/so/helge/Sales/Calendar

as a base URL and then an XML-RPC call like "array search(string 
title)". At the same time this method could be called using REST, like:

   POST /zidestore/so/helge/Sales/Calendar?Cmd=search&title=sss

(yes, like in Zope ;-)

One advantage of using the URL space is, that we could more easily 
create a URL tree which spans multiple servers in a distributed 
setting.

> and what benefits you see in the pluggable approach in respect to 
> XML-RPC.

Simple: extensibility. But it wouldn't be to difficult to split the 
skyxmlrpcd into bundles either.

> In answer to your specific question, the operations supported by 
> xmlrpcd look like they are a relatively close match to my ultimate 
> needs, though I don't have enough knowledge of the breadth of Ogo's 
> features to know how complete they are yet. I certainly wouldn't mind 
> moving those into ZideStore, but I'm completely unqualified to assess 
> the pros and cons of that yet. I'll certainly let you know what I find 
> as I move forward.

OK. I suggest that you just use the current XML-RPC API. We can improve 
on what is missing or too difficult if you find some issue. Neither 
ZideStore nor SandStorm is stable from an API point of view, but the 
XmlRpcAPI one is.
Also it covers almost all aspects of OGo.
Ergo: the way to go for clients which want to get something stable fast.

Hopefully Bjoern manages to upload the English XML-RPC API reference to 
the website on Monday.

best regards,
   Helge
-- 
OpenGroupware.org	- http://www.opengroupware.org/