Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: Should I use IPC? Perhaps something else...*shrug*

by repson (Chaplain)
on May 10, 2001 at 09:45 UTC ( #79332=note: print w/replies, xml ) Need Help??

in reply to Should I use IPC? Perhaps something else...*shrug*

I've got just one question on this program...

Why do you need to keep on reading from the logfile when no clients are requesting updates? It would seem better/easier to simply keep the logfile filehandle open then check for new data on it when a client sends a request. This way the program only needs one loop, and you avoid any unnecessary IPC headaches.

  • Comment on Re: Should I use IPC? Perhaps something else...*shrug*

Replies are listed 'Best First'.
Re: Re: Should I use IPC? Perhaps something else...*shrug*
by snafu (Chaplain) on May 11, 2001 at 03:12 UTC
    Good question. The way the server works is that everything that goes on on the server gets logged. I not only want this script to interact with the client but I also want the script to help me "watch" the server which can only be done by watching the logfle. Interacting with the client is just part of the responsiblities of this script.

    Another reason is that the client won't be able to interact with the script via the network until he/she requests help from the script. This means that the client needs to type a request (which gets logged) first using a command (defined in the "server_help" or something) and that the script watches for. The fact that the client program has the ability to send udp messages is usually not known by the client user. At least not until the client user makes that request that will then get logged on the server which will then be caught by the logwatcher and in turn react by telling the client user how to talk to the script via the network. Every subsequent request should be made via the clients' ability to send network messages but I could fall back on the log at any time. Redundant? Yes...necessary? I think so.

    I hope this all made sense. I started it before work and then finished afterward.

    - Jim

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://79332]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (4)
As of 2018-01-21 04:08 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (227 votes). Check out past polls.