Re: Multiuser application


Jorge Ferreira wrote:

> You're quite right. It´s the B option. Because, i did posted the data
> and it appears automatically to the user that posted it

because he has the data in his dataset. This user does not need the
RDBMS behind to give him the data

> but not to the others.

you're thinking about it as if the users would be working live on the
database, but what is happening in reality is that they work on a
snapshot of it. See my comments below

> Can you clear this doubt to me? I don't know how Delphi
> works with Databases...does it make some sort of Table mapping when
> loading? So that the user don't have to load data each time it makes
> a refresh? And then each new register or deletion, it will work with
> the Table of Delphi and not the Table in SQL Server. Is this what is
> happening?

more or less. You're using datasets (or derivates like Table or Query)
to access to the data. What you do is to define a SQL sentence which at
some point is executed in the RDBMS, returning a result set which is
stored in the dataset.

The user sees this data, *not* the data in the RDBMS. This could seem
weird, but it's designed that way to avoid too high traffic between the
tiers of your app, and to also avoid complicating data integrity

Say you are working on a table with 2000 records. Not too big. If you
want to work live on it, you will necessary be sending and receiving
data constantly. If every record is, f.e., 4KB big, we're speaking
about 8000KB. This is still not too much for a LAN, but already a bit
for a WAN. But say now you have 20 users working at the same time on
the database. That would make 160000KB being sent at every moment. Of
course, you would need to use where clauses to minimize the number of
records to be retrieved, but still you'll likely have too much traffic.
Imagine the case for large apps with thousands of users and tables of
ten-thousands of records. You could think about requesting it only
every x secs but, how to choose the time frame? And wouldn't this be as
working on a snapshot?

> Then...
> I will make the necessary preparations not to use the Table
> components but Query components. It will slow down the program but
> not too much (considering the amount of users). Nobody ever told me
> not to use table components in the case i want it to be multiuser.

i doubt it will slow down the program. In fact, i think it could even
make it faster, if you use appropiate where clauses. The problem with
Table components is that they try to load all the records (which is ok
for desktop apps), while it is always better to load *only* those which
you really need

Best regards :)

Guillem Vicens
Dep. Informática Green Service S.A.
in order to contact me remove the -nospam

Relevant Pages

  • Re: Whose Fish?
    ... That would be much more in line with your Table Oriented Programming ... currently programming) non CRUD business apps. ... intuitive way, as it is with a good object model, ... I might load CustomerInfo with read only ID ...
  • Re: HTML Transcription of Mastering Machine Code on Your ZX81 or ZX80
    ... It is possible to load flash-apps in that by right clicking on it and selecting "Load file..." ... If the app doesn't appear in APPS menu after loading it you could try resetting or restarting the emulator. ...
  • Re: Slightly OT
    ... Are there any Fedora 16 apps that would provide testing and reports please? ... I have been asked to test whether sites we are building with Drupal 7 will load rapidly, and what the response time may be for each page when accessed with a minimal or older style computer which is on dial up, etc, possibly with less than optimal copper to exchanges and homes, etc. ... Under the rule, Cheap, Fast Reliable, choose any two, I would also like to test conditions with possibly less than reliable and/or cheap isps ...
  • Re: Pentium 450 performance video
    ... Anyone in this group can load up ... >> a bunch of apps, on any computer, and quickly toggle between them. ... > With a 30-40% average cpu load and flat page file activity, ... There is no discredit in anything I have said. ...
  • Re: Help with Db design please ...
    ... minimize the load on Oracle? ... You're assuming that the RDBMS is going to be the bottleneck. ... the RDBMS ceases to be the bottleneck (except in high load cases like ... equivalent feature. ...