Re: Adding a realtime monitoring console
| From: | Eric Emminger | Date: | Tue, 07 Sep 2004 01:52:48 +0000 |
| Subject: | Re: Adding a realtime monitoring console | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-196006@lists.php.net to get a copy of this message | ||
Hi Kelly,
> Assuming the app always attempts communication with registered listeners,
> and then must timeout and unregister a dead listener...at that point
> aren't we just at my preferred solution: socket communication?
I don't know much about sockets, so I couldn't say. If the console
will connect via ssh, isn't that a stateful TCP connection? Can you
keep that connection open with a "keep-alive" or "heartbeat"? Can the
ssh server notify the application when the ssh session dies? How
expensive is it for the application to discover a dead listener?
> A log can be generated from the history table I have implemented. I'm
> developing an application framework and performance is my primary concern.
> The file I/O overhead concerns me unless I were able to leverage it.
Unless you're confident that performance problems will occur, I would
encourage you to completely ignore performance, develop the simplest
implementation and test, measuring actual performance.
> Do you have any links where I might find the pattern described in more
> detail? If nothing else, maybe the article contains ideas that can help
> kick-start another idea....Thanks...!
http://www.dofactory.com/Patterns/PatternObserver.aspx
Just google "event listener pattern" or "observer pattern".
Also, you may find Extreme Programming to be useful.
http://www.extremeprogramming.org/
Eric