Niall wrote:
>> On Fri, 11 Feb 2000, John McCormac wrote:
>> > fewer open database connections to achieve the results. (There is a very
> > good explanation of this in Philip Greenspun's article on
> > Oracle/AOLserver on the Linuxworld site or in his Database Backed
> > Websites book at http://photo.net/wtr/ ) The number of connections open
> > to the database would be the critical aspect of such a design and
> > AOLserver wins on this.
>> Read the book again John - the important aspect here, and the one which
> philg harps on about is NOT the number of connections open but the fact
> that in the AOLserver there is a pool of open connections, and when a TCL
> procedure requires a database connection, it just asks for one from the
Yep I was a less than clear about it - I should not reply when I am half
asleep. :-) The reuse of persistant connections considerably reduces the
number of connections required. Trying to do the same thing with Apache
produces a higher number of connections due to each one being set up and
then torn down again. The recent article in Linux World actually
explains it better than the book. Out of habit, I'd tend to look at it
as a loading problem.
> inadvertently :-) However, it is of course integrated into AOLserver and
> thoroughly tested. But you do have to program in TCL rather than Perl :-(
Perl is a good language for many things like a Swiss Army Knife of
programming, but tcl is a fairly nifty language for messing about with
webpages (ie reusing other people's web data) and implementing something
that approaches ASP (both ASP and the persistant connections ideas were
bought by Microsoft rather than developed by them.) What surprised me
about it was the ease with which something could be accomplished. Some
of the boxes here suffer from clock drift so I have a tcl script on a
cron job synching a box with net time. I was using the Perl script from
Linux journal (which works well) but a few seconds with tcl produced a
script that did the same thing:
#!/usr/bin/tclsh
set sockid [socket ntp.maths.tcd.ie 13]
gets $sockid newdate
puts $newdate
set e [exec date -s $newdate]
The tcl code appears leaner, (I was worried that it was too lean), than
the Perl equivalent. What would really be interesting would be if
someone could achieve something approaching AOLserver's pooling with
Apache and mod-tcl.
Regards...jmcc
--
********************************************
John McCormac * Hack Watch News
jmcc at hackwatch.com * 22 Viewmount,
Voice: +353-51-873640 * Waterford,
BBS&Fax: +353-51-850143 * Ireland
http://www.hackwatch.com/~kooltek
********************************************
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6
mQCNAzAYPNsAAAEEAPGTHaNyitUTNAwF8BU6mF5PcbLQXdeuHf3xT6UOL+/Od+z+
ZOCAx8Ka9LJBjuQYw8hlqvTV5kceLlrP2HPqmk7YPOw1fQWlpTJof+ZMCxEVd1Qz
TRet2vS/kiRQRYvKOaxoJhqIzUr1g3ovBnIdpKeo4KKULz9XKuxCgZsuLKkVAAUX
tCJKb2huIE1jQ29ybWFjIDxqbWNjQGhhY2t3YXRjaC5jb20+tBJqbWNjQGhhY2t3
YXRjaC5jb20=
=sTfy
-----END PGP PUBLIC KEY BLOCK-----
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!