You are here: Re: Mantain a variable through several scripts like global.asa variables in asp « PHP Programming Language « IT news, forums, messages
Re: Mantain a variable through several scripts like global.asa variables in asp

Posted by Zeppelin on 12/28/05 11:00

> Have you actually MEASURED the performance to prove this?
> Often, even program code isn't stored in memory most of the time

I have no stadistics about this, but every new version of applicattion,
servers goes 100% and crashes down. So we want be prepared.

> If your web server gets restarted (software crash, someone trips
> over power cable, maintenance), your variable goes poof! Is this
> acceptable behavior?

Nowadays, the variable is lost and no problems registered. Only than
first 60 clients don't have the best service ... but its only a few
mseconds...
The script could be improved saving the variable to bd every 10 minutes
;)

I will try with System V shared memory segments (shm_* functions) .

> Global variables are in general bad programming practice. Making
> varibles that are "ultra-global" over all web page accesses by
> unrelated users is asking for even more problems. How, for example,
> do you prevent several simultaneous page accesses from simultaneously
> updating (and screwing up) the variable? There's a reason why
> databases have so many features relating to locking, transactions,
> and consistent views of the data.

The problem is that this script is not a part of a CMS or simmilar
application... it is the minnimun piece of a big system. It has a very
clear mission and does nothing more.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация