Please take our Survey
logo       

Choosing A Webhost:
A web hosting service is a type of Internet hosting service that allows individuals and organizations to provide their own website accessible via the World Wide Web. Web hosts are companies that provide space on a server they own for use by their clients as well as providing Internet connectivity, typically in a data center. Web hosts can also provide data center space and connectivity to the Internet for servers they do not own to be located in their data center, called colocation. more...

Re: Re: [dev-groupware] Java OpenGroupware API - EarlyAccess Release: msg#00040

cms.opengroupware.xmlrpc.devel

Subject: Re: Re: [dev-groupware] Java OpenGroupware API - EarlyAccess Release

On Friday, August 29, 2003, at 09:47 PM, murphee (Werner Schuster) wrote:
Helge Hess wrote:
On Wednesday, August 27, 2003, at 02:51 PM, Werner Schuster wrote:
Maybe I should be more specific why I think that one needs to be careful in choosing the API. The problem with the JOGI API (and the xmlrpcd) is that it always retrieves full OGo document objects which is expensive.

Well, is there a way around that?

Hm, yes two things:
a) implement a server side XML-RPC method which does exactly what is required for the "foreign" API - makes most sense since it can be efficiently implemented using OGo commands
b) most fetch specification support the "attributes" key which you can use to list the attributes you actually require

So for example if you just want to display lastname, firstname and email address, you should only query those items from the XML-RPC daemon.

er... OK, I just went through the XML-RPC documentation again, but
couldn't find any way to limit the results returned by a fetch or get;

Try adding the "attributes" key with an array value listing the required attributes.

How can I tell the Xml-Rpc Daemon to return only a subset of a document;
eg. if I call person.fetch, how can I limit the resulting documents
to, say, "Name" and "Nickname"?

I think by adding "attributes = (nickname, lastname)". Not sure though, would need to try out myself ... Anyway, this has still the overhead of the OGo document API.

This could either mean introducing something like a "PersonFragment" object (like there are DocumentFragments in DOM) in the JOGI API or just use XML-RPC directly in the "target" API since full document objects are not required anyway.

hm... well, the encapsulationt hat JOGI offers should make that easy;
I mean, if you fetch() an object, you could simply fetch the Id, and if
eg. some "name" field (or whatever) is queried with eg. "getName()",
this would result in a call that fetches only the name;

Which would be highly inefficient as it would result in "attribute-count x records" queries. You basically need to allow the user to fetch "fragments". Since this breaks encapsulation, it basically destroys a "neat" object model. It can be fixed by "upgrading" fragments to full objects (you might want to study object database technology if you have some sparetime ;-)

Anyway. My whole point is that there is no "one-API-that-fits-all". JOGI is excellent if you need what it does. It might be wrong if you have specific needs. Eg Glow will perform a very specific kind of query so you should map it to a very specific implementation to gain good results.

ZideStore has a lot of technology in that direction. It basically does a query analysation phase to determine the most effective internal OGo command for a given fetch-specification/attribute set.

Anyway, I am getting a bit offtopic for the OO.o Groupware list,
let's continue on the Xml-Rpc list at OG.o.

Yup. I think Colm is subscribed there as well.

Regards,
Helge

--
OpenGroupware.org XML-RPC
xmlrpc@xxxxxxxxxxxxxxxxx
http://mail.opengroupware.org/mailman/listinfo/xmlrpc



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
solaris.opensol...    editors.vim/200...    web.turbogears....    jakarta.ant.dev...    mathematics.max...    text.unicode.ge...    lang.ruby.core/...    xfce.announce/2...    network.centeri...    php.cvs.pear/20...    user-groups.lin...    kde.devel.quant...    file-systems.ar...    redhat.fedora.t...    apple.fink.auto...    gnome.orbit.gen...    qplus.devel/200...    culture.transpo...    video.dri.user/...    operators.nanog...   
Home | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe

Navigation