Dashboard Deployment Guide

Preface

This document is a deployment guide for Push Framework Remote monitoring dashboard. It is intended to help the developer activate monitoring, setup the dashboard and extend this latter with new remote control commands.

Introduction

Push Framework is a self profiling library. While this introduces a certain performance overhead, profiling on a production release server is something many professionals approve. The library can be configured to constantly collect performance values, statistics information and send them to a remote observer.
This guide assumes you already finished writing and deploying your Push Framework- based server.

Understanding the picture

When monitoring is active, remote Dashboard can connect to your server at a specified port called the monitoring port, monitor and pilot it.
The Dashboard contains a “command console”, so you can send commands and have them executed server-side.
There is a predefined list of commands, but the most important is that you can extend these commands with new ones.
Some of these commands relate to the activation/deactivation of profiling.
Profiling can also be activated programmatically via a public API :

void Server::enableProfiling( unsigned int samplingRate ).

The server then constantly collects performance indicators and report them at a predefined rate to all connected Dashboards in real time so they can be visualized and examined.
The server is able to collect Visitor statistics, Bandwidth statistics and Performance statistics. Please refere to the Dashboard User Guide to understand the usage of the Dashboard.

Activating monitoring

To enable remote Dashboard to connect and execute remote commands, you must use the following API :

//Assuming server is your Server instance
 server.enableRemoteMonitor(monitoringPort, password);

the password protects other people who knows your server address from accessing the server via the Dashboard since they are required to enter a valid password.
The monitoring port is the one that your server will listen to for incoming Dashboard connections requests.
The server does not collect and send statistics untill profiling is programmatically or remotely activated. To activate profiling via API, call : server.enableProfiling(samplingRate); The framework will constantly record all activities and measure different indicators then report them each period of time equal to the sampling rate. To activate/deactivate profiling using the Dashboard remote control console, tape :
“profiling enable” or “profiling disable”

Deploying the Dashboard

The Dashboard is a Flash Applet written in Flex. Thus, it can be deployed at a webserver for ease of access.
It is important to note that once the Applet is accessed, it establishes a direct connection with your server. There is no connection between the webserver hosting the Applet and your Push Framework-based server. The webserver merely enables you to download the Applet and launch it in the browser. The Dashboard is a free addition to the Push Framework library, however, its source code is not disclosed. Download it here.

Deploying the Flex License Server

Unfortunately, Flash Applet that establish connection to an application other than the webserver from which they were downloaded are obliged to seek a sort of permission. This Adobe’s rule means that in order for the Dashboard to succeed a connection to PF-based server, a cross-domain policy file should be serviced by the same machine on which the PF-server is running.
Fortunately, we’ve developed the Flex licence server and made it free and open source. It is a small program which you easily configure to listen on a particular port.

Deploy it on the same machine as your Push Framework-based server. It will service a cross-domain policy file that the Dashboard needs to have when it tries to connect to your server.

If you don’t deploy this server, you get a connection error in the Dashboard.

Download it here. The source code can be found at this repository : https://pushframework.svn.codeplex.com/svn/samples and benchmarks/flexpolicyserver

Connecting with the Dashboard.

Open the Dashboard, wait for the Applet to load. “Connect to Server” window will show up :

  • Server address : this is the IP or domain name for your PF-based server
  • Monitoring port : this is the port that your PF-based server uses to listen for Dashboard connections
  • Policy port : this is the port for the Flex Policy Server that should be deployed on the same machine as youur Pf-based server.
  • Password : this is the password by which protected access to your PF-based server.

Remote control extension

The Dashboard contains a forth tab called “Remote control”. It contains a console window and a command edit box.
Commands written in the command box are sent to server for interpretation and execution.
There is a few commands available : like the “info” command, the “enable profiling” command etc
To extend your server with other commands, just override the following function :

bool Server::handleMonitorRequest( const char* command, char* lpOut )
Share
PDF Printer    Send article as PDF