 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Chip Guest
|
Posted: Wed Jul 02, 2003 8:40 am Post subject: Newbie: transfert optimisation |
|
|
I am considering building a multi-tier app with SOAP (to route without
problem through firewalls).
In my tests, the client app has to display a grid of about 30 rows.
The total number of rows in the table is 10,000.
I only need to display what I see onscreen. So my client app should download
only 30 rows, right?
In fact, it downloaded all 10,000 rows before displaying it. I can tell that
it is very slow on an ADSL link.
May be am I using the wrong component or the wrong methods?
As a newbie, I am rather confused by all the possibilities of Delphi as to
generating distributed apps.
May be someone can give me some clue?
|
|
| Back to top |
|
 |
Wayne Niddery [TeamB] Guest
|
Posted: Thu Jul 03, 2003 1:01 am Post subject: Re: Newbie: transfert optimisation |
|
|
Chip wrote:
| Quote: | I am considering building a multi-tier app with SOAP (to route without
problem through firewalls).
In my tests, the client app has to display a grid of about 30 rows.
The total number of rows in the table is 10,000.
I only need to display what I see onscreen. So my client app should
download only 30 rows, right?
In fact, it downloaded all 10,000 rows before displaying it. I can
tell that it is very slow on an ADSL link.
May be am I using the wrong component or the wrong methods?
As a newbie, I am rather confused by all the possibilities of Delphi
as to generating distributed apps.
|
In general when designing a mutlitier app, especially if it must work over a
low bandwith, you *must* prevent the possibility of bring so many records -
what can a client possibly do with 10,000 rows? The request for records
should always include conditions that limit the result to only a few
records.
There are a lot of possibilities and these change depending on what database
you are using and what middle ware (DataSnap?). First, if using
ClientDataset, look at the PacketRecords property. If you set this to a
positive numberm you will only get this many records at a time (incremental
fetching as needed). However using this will make the connection to the
server stateful. You can also use an exported function from the server to
return datapackets of whatever size you want - sending it parameters of
where to start and end, this can be kept stateless. Finally, some databases
support fetching slices, e.g. Using Interbase (version 6.5 or later) you can
use the ROWS feature to return any slice of a larger result set.
--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
Powered by Delphi and IB: http://www.logicfundamentals.com/RadBooks.html
"Democracy, without that guarantee of liberty, is merely a method of
selecting tyrants." - Alan Nitikman
|
|
| Back to top |
|
 |
Chip Guest
|
Posted: Thu Jul 03, 2003 3:33 pm Post subject: Re: Newbie: transfert optimisation |
|
|
| Quote: | There are a lot of possibilities and these change depending on what
database
you are using and what middle ware (DataSnap?). First, if using
ClientDataset, look at the PacketRecords property. If you set this to a
positive numberm you will only get this many records at a time
(incremental
fetching as needed). However using this will make the connection to the
server stateful.
Thank you Wayne for your knowing reply. |
I am considering using DataSnap. Why shouldn't I use statefulness for the
sake of simplicity, even if it impacts performance?
| Quote: | You can also use an exported function from the server to
return datapackets of whatever size you want -
sending it parameters of
where to start and end, this can be kept stateless.
Maybe you can tell me (very motivated newbie) more about exported functions? |
Should I rewrite each time the server app, or just the client?
| Quote: | Finally, some databases
support fetching slices, e.g. Using Interbase (version 6.5 or later) you
can
use the ROWS feature to return any slice of a larger result set.
Fine, but is the middlware (sigh), like DataSnap always necessary? I have |
tried Interbase and it seems to be terrific in term of performance and
stability.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|