Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

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

by repson (Chaplain)
on May 10, 2001 at 09:45 UTC ( [id://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 script...like "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?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://79332]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 06:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found