two users shring the same vars without sockets/data files...

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
The-Master
Forum Commoner
Posts: 45
Joined: Sun Aug 07, 2005 9:51 am
Location: Israel

two users shring the same vars without sockets/data files...

Post 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?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
The-Master
Forum Commoner
Posts: 45
Joined: Sun Aug 07, 2005 9:51 am
Location: Israel

Post by The-Master »

well what is the most KB saving choise? DB or flat files?
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

the difference is extremely subtle.. seriously depends on compression of the database
The-Master
Forum Commoner
Posts: 45
Joined: Sun Aug 07, 2005 9:51 am
Location: Israel

Post 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?
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
The-Master
Forum Commoner
Posts: 45
Joined: Sun Aug 07, 2005 9:51 am
Location: Israel

Post 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.
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post 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.
Post Reply