Andre John Cruz wrote:
> hi PLUGgers,
> thanks for all the input regarding logging. i've already
> set up a working test program using
> open/write/lockf/fcntl/close stuff and simultaneous
> processes block until the others have released the file
> lock.
If this is a trivial case of 1 resource only, it should be ok even with
multiple processes. It becomes non trivial when you have more than 1
resource. Beware of deadlocks.
> however, is this approach scaleable? i haven't seen yet
> (maybe i should right now) how apache does its log files.
Apache pre-forks. I assume all instances of httpd inherit the file
descriptor to the log file, but they probably wait on a lock as well.
> i'm thinking if logging to a database instead can be more
> scaleable than text file logging.
Properly designed DB's (read: PostgreSQL) will probably be more scalable
and robust than your homebrew logging routine.
Brian
_
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]
To subscribe to the Linux Newbies' List: send "subscribe" in the body to
[EMAIL PROTECTED]