I've been working on a list of ways to improve the PHP web frontend. Just curious what every else thinks of these.
- add support for a caching layer for generated graphs Add code that allows caching of generated graphs, either on the filesystem or in a memcache cache. When generating a graph, serve the cached version if the refresh time for that metric has not passed. When lots of people viewing the same pages in the web frontend, this would sometimes eliminate the need to call rrdtool, or even parse the XML, to serve graphs. - Move the graph.php functionality into an OO class. Create a base class that contains the basic functionality of drawing a graph (like the rrdtool calls). Also provide an interface which custom graphs would implement. People who are providing custom metrics could also provide PHP modules to graph their metrics when custom graphs are appropriate. If all graphs implement a common interface its easier to plug in 3rd-party graphs into your existing web app. Implementing interfaces would require PHP5, since the PHP4 object model doesn't support them. PHP4 will be end-of-life on 12/31/2007 (search for 'PHP 4 end of life announcement' on http://www.php.net/archive/2007.php). Quite a few large PHP projects have committed to being fully PHP5 by February of next year (http://www.gophp5.org/projects). I think moving the ganglia web application in this direction is a good idea. - Provide graphs as a web service This would accept requests for metric data (XML, JSON, whichever), generate a graph, and respond with a URL to the graph. This would make it possible to embed metrics in other web applications (PHP or non-PHP) without much fuss. I'm imagining this would be built around the graphs-as-a-class idea from the previous suggestion. - Allow clients to reload graphs asynchronously. I'm picturing opening a monitoring page, and have the page make AJAX requests back to the server for each of the graphs to be displayed. JavaScript on the client side would refresh each of the graphs according to the refresh schedule of the metric being graphed. The page itself would never refresh, but the graphs would periodically be replaced with fresh data. The 'web service for graphs' idea above would probably be a requirement to make this one fly. Providing some additional 'tooltip' data when rolling over the graph (like when it was last refreshed, or when the next refresh is expected) would probably be nice as well. - Allow rollover effects on graphs which display discrete data. Someone sent a link to a Perl/rrdtool application that had this feature a while ago. If we can't incorporate that project directly, create something similar. ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Ganglia-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ganglia-developers
