Re: what is going on with gtk.php.net?
| From: | Richard Thomas | Date: | Thu, 22 Jul 2004 16:43:51 +0000 |
| Subject: | Re: what is going on with gtk.php.net? | ||
| References: | 1 2 3 4 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-4843@lists.php.net to get a copy of this message | ||
I could see such a solution being a problem with a application that is used by multiple people, it would be very easy if your keeping the connection open to load a db server down with hundreds of connections that are only used a few times a hour.
Such a "hack" doesn't seem like it would scale very well at all. It seems to me you would be better off with a diffrent form of communication between the applications, like possibly a tcp connection.
This would also then allow you to centralize data handling, making the end user application more "lightweight" and allow caching of the result set at that central script again reducing the load on the database.
A good example.. Large company address book, employees work 9-5, so a majority of your "initial" activity would occur between 8:55-9:00. 1000 employees connecting to the db and performing a query to load there address books for the data, then every time the address book changes each one has to reperform the query.
Instead using some tcp setup it would happen more streamlined.
1. People connect, First person that makes request causes query, Final dataset built, cached and then sent.
2. Everyone else pulls a simple dataset out of the tcp server memory, low overhead.
3. Ability to send "broadcasts" over the tcp connection letting people know there are updates to the address book. Instead of everyone pooling the server now you have told everyone there is a update, Next time they open there address book it will pull it.
tony@php.net wrote:
On Thu, 2004-07-22 at 09:11, Anders K. Madsen wrote:-- Richard Thomas Cyberlot Technologies Group Inc. 507.398.4124 - VoiceOn Thu, 22 Jul 2004 12:57:46 +0700 (SE Asia Standard Time) xaviero1412@yahoo.com.au (Xaviero) wrote:I'm working on one at the moment :)so, tony, could u write some article bout php-gtk that explain how to build an application such like address book that connect to mysql server ?Well, PHP-GTK is just an extension of PHP, so any PHP/MySQL tutorial would do in your case.Almost, however you need to be aware that a gtk app is likely to be open on someones desktop all day, and may only be used for a few minutes at a time. When you come back to it your db handle has gone stale. I always extend my basic db class with a gtk specific one that checks the connection is alive before I use it. tony