|
|
Choosing A Webhost: |
Re: Java OpenGroupware API - annotations: msg#00007cms.opengroupware.xmlrpc.devel
Werner Schuster wrote: One thing that bothers me about the Iterators, is that you cannot Well, I don't know the Iterator API, only the Enumerator one (which is also available in Objective-C). You could easily extend the Enumerator interface to include the size (eg this is pretty usual in SQL enumerators since most database send the size in advance). We return a java.util.List on purpose, since this allows us to choose the This still has the problem that all the objects (therefore the whole database) will end up in the RAM. Eg if you use JOGI to implement some kind of integration or export tool or for writing some JSP which formats the result in XML, this will blow up your memory usage unnecessarily. In any way you could still provide a convenience method which returns an array but the Enumerator should be the primary implementation since it is more low level. Another advantage is that the Enumerator improves concurrency and therefore reduces latency. While one thread may continue reading XML records from the socket, the main thread may already convert the records into objects. (yes, I see that you could also write an array which fetches incrementaly and blocks if some record is not yet available - but why adding that complexity?). This brings the benefits of giving the user a List (like, allowing Again, if you have thousands of records this will hit you big time because indexed access is wrong(tm) for big collections. Well, my idea of some lazy List implementation would work the sameso the client gets the iterator and each element is read when its Well, IMHO its the wrong approach. Why artificially hide the fact that the IO is happening in a streamed way? This should be the primary interface and you may provide convenience methods on top of it. Again, your approach is likely to result in huge RAM requirements unless you make the list extraordinarily smart ;-) (just giving hints on issues which already hit us in the Objective-C APIs as well ...) think "org.opengroupware.ogojogi" BTW: why ogojogi instead of just "org.opengroupware.jogi"? regards, Helge -- http://www.opengroupware.org/ -- OpenGroupware.org XML-RPC xmlrpc@xxxxxxxxxxxxxxxxx http://mail.opengroupware.org/mailman/listinfo/xmlrpc
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Java OpenGroupware API - annotations, Werner Schuster |
|---|---|
| Next by Date: | Re: Java OpenGroupware API - annotations, Burkhard Sell |
| Previous by Thread: | Re: Java OpenGroupware API - annotations, Werner Schuster |
| Next by Thread: | Re: Java OpenGroupware API - annotations, Burkhard Sell |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
Free MagazinesCisco NewsReceive 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 |