[PHP-DB] Re: Load balancing and SQLite

2004-05-15 Thread Hans Lellelid
Hi all,
I think Justin's absolutely right: don't use SQLite if you're doing the 
type of project where you need load balancing.

As for NFS, I haven't had major problems with it myself, but it's always 
called the Network Failure System by many people I trust. It can (will) 
also cause quite a bit of extra network traffic, especially since your 
database engine will reside on a different machine than the database 
file, likely causing reading of large quantities of data over the 
network that just get thrown out by sqlite engine.
ALso ...
I don't know about SQLite specifically, but I wanted to mention that 
using NFS w/ these database systems can lead to trouble.  Notably, you 
*cannot* use NFS w/ BerkeleyDB databases on account account of physical 
drive requirements -- e.g. ability to map drive sectors into RAM, etc. 
I don't know if SQLite is similar to BerkeleyDB, but as they are both 
embedded db systems I wanted to point that out.

Cheers,
Hans
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Re: Load balancing and SQLite

2004-05-15 Thread Justin Patrin
Andy Ladouceur wrote:
Hey everyone,
Currently planning out the databases for a large project, and have 
decided to use separate SQLite database files for each users hit 
statistics. The problem is, there are two webservers, with a load 
balancer. I'm wondering what suggestions people might have on accessing 
the sqlite databases from either webserver? (As I can't write them to 
the same disk the webserver is on, without needing to copy it to the 
other webserver as well.) I _might_ have access to a third system, which 
I could use for a dedicated database server, but is NFS a viable 
solution? Would there be a noticeable performance impact when opening 
the database files remotely?

Thanks in advance for any responses,
Andy
Short answer: if you have more than a simple project and / or one 
webserver, you don't want to use SQLite.

If you're worried baout load balancing I doubt you really want to be 
using SQLite. It's meant as a simple system. If you're making a large 
project, you probably want to go with a better system, at least mysql. 
That way, you can run the DB server on one machine and have both access 
it. You could even run the DB on one of the webservers and have both 
webservers use it.

As for NFS, I haven't had major problems with it myself, but it's always 
called the Network Failure System by many people I trust. It can (will) 
also cause quite a bit of extra network traffic, especially since your 
database engine will reside on a different machine than the database 
file, likely causing reading of large quantities of data over the 
network that just get thrown out by sqlite engine.

--
paperCrane 
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] date and time problem

2004-05-15 Thread Bruno Ferreira
Kim Jacobs - MWEB wrote:
I have a script which pulls a date(date default NULL) and a time (time default NULL) 
from a MySQL database, now I would like to display that date and time in a 'pretty' 
format.
I've been able to show the date nicely with the help of this:
$ntime=strtotime($row['date'] $row['time']);
$ndate=date('D d F Y H:i',$ntime);
This shows the date in a 'nice' format (2004-05-10 20:40:00 is shown as Mon 10 May 
2004 00:00), however, it shows the time as 00:00 for all of the games no matter what 
the time is. How do I get it to show the date as 20:40 or 20h40 or 8:40 PM?
If I change the lines to this:
$ntime=strtotime("$row[date] $row[time] GMT");
$ndate=date('D d F Y H:i',$ntime);
the only difference is that it now shows Mon 10 May 2004 02:00 (probably because we 
are 2 hours ahead of GMT)
Any ideas please?
Thanks
K
   

   Well, a solution could easily be arranged to use both fields, but 
really, the best thing to do is to just use a DATETIME field in MySQL 
instead of using both DATE and TIME fields. That will save you a lot of 
headaches now and in the future.

Bruno Ferreira
---
[This E-mail scanned for viruses by Declude Virus]
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP-DB] Load balancing and SQLite

2004-05-15 Thread Andy Ladouceur
Hey everyone,
Currently planning out the databases for a large project, and have 
decided to use separate SQLite database files for each users hit 
statistics. The problem is, there are two webservers, with a load 
balancer. I'm wondering what suggestions people might have on accessing 
the sqlite databases from either webserver? (As I can't write them to 
the same disk the webserver is on, without needing to copy it to the 
other webserver as well.) I _might_ have access to a third system, which 
I could use for a dedicated database server, but is NFS a viable 
solution? Would there be a noticeable performance impact when opening 
the database files remotely?

Thanks in advance for any responses,
Andy
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php