Page 1 of 1
two users shring the same vars without sockets/data files...
Posted: Sat Apr 22, 2006 9:29 am
by The-Master
hi, i was thinking of a way to share vars with two users, so if a var is changed the change is made for both users... i could do this with the DB but i am short of DB space and what i intend to do with this will need a big amount of tables... rows... and a high cost hosting........
any ideas?
Posted: Sat Apr 22, 2006 9:44 am
by feyd
Unless you have them share the same session (generally a no-no) or have shared memory (which is shared among all php requests) databases or flat files are the only quasi-reliable route really.
Posted: Sat Apr 22, 2006 12:34 pm
by The-Master
well what is the most KB saving choise? DB or flat files?
Posted: Sat Apr 22, 2006 12:49 pm
by John Cartwright
the difference is extremely subtle.. seriously depends on compression of the database
Posted: Sat Apr 22, 2006 3:04 pm
by The-Master
gzip... if there is any other solution you know do tell... i had an idea to make a small exe file with php-gtk and make it like a client that connect to the server and shares the vars... what do you think of the idea?
Posted: Sat Apr 22, 2006 3:51 pm
by onion2k
How much data are you talking about? I've never seen a site that took up more than a few gigabytes .. and that's not really all that expensive to host.
Posted: Mon Apr 24, 2006 1:23 pm
by The-Master
well now i have only 10-12 tables in the DB and each will store alot of data in the future, i am not talking in terms of GB only MB, but what the main problem is that what i am trying to do may cause the DB to recieve data in sizes like 20-100 MB in a second... and that may cuase the server to crash... so what i am asking for is a none-database, none-flat files(not flat files because of it's low security against hostile users...) solution.
Posted: Mon Apr 24, 2006 6:40 pm
by onion2k
The-Master wrote:what i am trying to do may cause the DB to recieve data in sizes like 20-100 MB in a second... and that may cuase the server to crash...
I insert many millions of records into a database occasionally .. usually around 50meg of CSV data .. it's not crashed yet. Mind you, it does take a bit more than a second .. about 30 seconds usually (from the MySQL command line). MySQL is a lot more robust that you might think.