Subject Re: [firebird-support] Re: Multithreaded Database
Author Iwan Cahyadi Sugeng
On 9/12/07, Roman Rokytskyy <rrokytskyy@...> wrote:

> Well, you can't avoid to create multithreaded application simply
> because your programming language will require this. Look, when you
> have something like this (Java syntax, but it does not matter):
>
> ResultSet rs = statement.executeQuery("SELECT * FROM some_big_table");
> while(rs.next()) {
> ...
> }
>
> At the point when the executeQuery is called, your program stops until
> the response comes from the server. Assume that the execution returns
> from the call instantly, however the server has not finished computing
> the data. Then your program must wait until the data come by looping
> internally and checking some flag like statement.areDataThere(). At
> the end your code will look like old message handler code from the
> Borland Pascal 7.0 for Windows 3.1.
>
> The multithreaded application is much more easy approach to code and
> to debug.
>
> The only thing that Firebird could have improved at this place is that
> same connection can be used by multiple threads simultaneosly. However
> the implementation effort and the complexity for multiplexing the
> network socket is so high, that it is much more better to invest that
> time in more important areas, especially when opening a new connection
> in Firebird is very cheap operation.
>
> Roman




Sorry for asking more technical in delphi, hope you understand delphi.

Actualy i'm not yet fully understand multithreading, especially the
multithread type on RemoteDataModule. I'm using them to connect my
3-tier application. I Set Multiple Instance and Single Threading
Model. What is this meant? Is my server application is multithreaded,
means every client application connection will create one thread or
will only create single thread for all connection?
>
> I Need to ask this, because i want to know that, is my applicatin will behave like the one u mention, ie, will wait for every operation to complet or not. Thanks for the help
>
>

--
Iwan Cahyadi Sugeng