[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnue-dev] Re: DataObjects.txt

From: Neil Tiffin
Subject: [Gnue-dev] Re: DataObjects.txt
Date: Sun, 23 Dec 2001 09:24:44 -0500

At 1:40 AM -0600 12/23/01, Jason Cater wrote:
On Saturday 22 December 2001 06:42 am, Neil Tiffin wrote:
 After i read the IRC log i look at dataobjects.txt and have some

 1) In larger systems we need to have the ResultSets manipulated as
 subsets. So if i create a ResultSet of 1,000,000 records and I have a
 table in the GUI that displays 15 records I dont want to have to send
 all 1,000,000 records to the GUI.  Now I see that we could use the
 nextRecord() and lastRecord() functions.  But I really think we will
 > need a getNRecords(startAt=0, number=1) function, even if the API is
 not immediately implemented (although it should not be hard to do).

I'm not entirely sure I follow the logic here, although implementing the
requested functionality certainly wouldn't be difficult (i.e., it's a natural
extension of the getRecord(), nextRecord(), and lastRecord() methods.)
However, by its very nature, a ResultSet is a cache of a query-set, so
passing 1,000,000 records back and forth should never happen (unless the
application was really processing 1,000,000 records at a time :)  Based on
your example, if the UI only needed 15 records to be displayed, then only 15
records would be loaded into a ResultSet. Otherwise, I think ResultSets
aren't being used properly.


I have not made it through the excellent response yet, It will take more brain cells that are available right now. But for this part let me explain more clearly and maybe that will help. The situation I am concerned about is this.

I have a list of mail prospects say 2 million. I want all of the ones with a last name of "smith", so I fire off a selection from the gui. Now the GUI is designed to display the name and address of all records returned. Since this list contains the names of the worldwide Smith Family Registry the query returns 1 million Smiths.

Up to this point the ResultSet is still on the server (whatever that is, SQL Server or GEAS lets say).

Now I have to get the name and address (which are in the ResultSet) back to the GUI (the space allocated on the GUI screen is for 15 records).

I see two ways:
1) use the get single record API calls already defined. To display the first 15 names the GUI made 15 calls to nextRecord() and put them in a table on the screen. That works, except (in GEAS/CORBA) I have to marshal at least 15 CORBA objects (slow). However, If I want to skip and go to the middle of the list or page down in increments of 15 records it seems a little kludgy. Because I can only iterate the list by calling nextRecord(). So to bypass 500,000 records I have to marshal 500,000 CORBA objects using nextRecord() and throw them away. Hopefully I have missed something and this is not the case.

2) define a way to pass subsets of the ResultSet back to the GUI. The getNRecords(startAt=0, number=1) API was to solve the limitations in (1). Since it returns a list, only one CORBA object would be marshaled and the GUI could skip all over the place and return as many records as the GUI/client wants. Also Reports could get a page of data at one time instead of having to iterate through the nextRecord() logic each time.

Since i don't know the GUI/Common stuff yet, maybe this is handled a different/better way.
GNU Enterprise

reply via email to

[Prev in Thread] Current Thread [Next in Thread]