Re: Shoutbox without sql dbase

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



f00l wrote:
> I was wondering if anyone has come across (or even using) a shoutbox that
> doesnt require an sql dbase. While it isnt hard to access one id prefer to
> write everything to a file (wanting to learn how to write, append etc
> files)

Think about this very carefully:

Will you *EVER* have two people accessing the same web page at one time,
both of which access the same file, both trying to write or append to it?

For example, would you ever have an employee/helper/intern who was
updating your shoutbox data at the same time you were adding new data?

If the answer to these questions is "Yes" or "Maybe" or even "Not today,
but maybe some day" then writing your own files directly is something you
want to avoid.

Because sooner or later, you are going to have your entire file TRASHED by
the two-person working at once problem.

One person will be writing to the file, and the other person will write to
the file, and the Operating System just plain doesn't like it when you do
that.

If you're lucky, you'll only lose the work of one of the two people.

If you're unlucky, the entire file will be turned into hash -- completely
un-usable.

These kinds of problems are what SQL excels at solving.

So, if you want to learn to read/write/append files, that's good, but
maybe this isn't the best way to go about that.

Assuming that "shoutbox" is some kind of shoutcast server (?) perhaps a
more reasonable task would be to write a cron job that checks for cool new
MP3s and automatically downloads them and writes them into a file.

Or something along those lines.  Something where there is only ONE (1)
user running the script at any given time is the crucial factor in
deciding to use a file instead of SQL database.

> I tried one but for some reason the script processing turned into some
> random java script about symwindow openning etc   -has anyone heard of
> this
> or know what it means?

Can't help you on that part, sorry.

-- 
Like Music?
http://l-i-e.com/artists.htm

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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux