A server that will serve http page created from data collec

Dear Group,

I am planning to develop an application in WINDOWS OS using ruby.

The front end of the application will be an web browser.

It is actually an NETWORK MONITORING SYSTEM comprising of about 80 UNIX
machine.
in each of the machine every five minutes a text file is generated
which gives the exception report of call failures of a TELECOM
subscribers divided into various categories like DIAL CODE,VOICE
CALL,DATA CALL etc .

The whole idea is to coallate these files from 80 machines and
represent them in web browser in tabular fashion in about 20 user PCs.

After some home work … i have encapsulated following thoughts

1> I need a server application that will run in each users’ PC which
will be reponsible for
a> Collecting the 80 files … for this I think the server will
need to use “rsh” service of WINDOWS.
b> Parse through these files and compare with the previous 5minutes’
data to see if there is any addition or deletion of failure case and
create/append/modify the html file accordingly to serve

2>The front end or the client application will be the standard web
browser. Here the users will point their browser to the “localhost” to
the appropiate location and the server will serve the file which will
update every 5 minutes.

I hope i could clearly state what I am trying to acheive.

With this background . I would share the confusions that i have from
implementation perspective.

1> With The standard WEBBRICK/MONGREL servers … will I be able to do
the rsh stuff?

2> What do you recommend to for data management … The data that flows
in every 5 minute will be small chunks like max 50 lines … should i
use YAML or MYSQL ?

3> Doing “rsh” will require system calls and that means threading will
be of not much help. Instead I need to fork subprocesses … but in
WINDOWS env … can it be done?

Thanks

Rajib

On 9/19/06, [email protected] [email protected] wrote:

It is actually an NETWORK MONITORING SYSTEM comprising of about 80 UNIX
machine.
in each of the machine every five minutes a text file is generated
which gives the exception report of call failures of a TELECOM
subscribers divided into various categories like DIAL CODE,VOICE
CALL,DATA CALL etc .

The whole idea is to coallate these files from 80 machines and
represent them in web browser in tabular fashion in about 20 user PCs.

The obvious first thought is to use DRb. Another possibility is:
Build a web server (use Rails if you like) on a Unix machine that can
access the 80 managed Unix machines via ssh. Have the server pull the
80
text files from the managed machines every five minutes via a cron
script.
You have no rsh, no Windows problems, only an ssh public key (that of
the
server) installed on each of the 80 machines. If you’re concerned about
race
conditions on the managed servers, have them rsync their files to the
central server. (The downside is that you now need to install (and
manage)
80 public keys on the server- not too bad.)

Run your collation script on the server- the data format doesn’t matter
very
much but I would consider XML. Replicate the central server for
redundancy.
On the 20 Windows clients, you run nothing but a browser to the Rails
app.

A message-queueing solution would have made this even easier.

[email protected] wrote:

which gives the exception report of call failures of a TELECOM
a> Collecting the 80 files … for this I think the server will

use YAML or MYSQL ?

This looks like a good candidate for Rails to me. The Model would be the
database of systems to be monitored and the status values you want to
retain from them. The View is of course the browser page. And the
Controller is whatever actions your users want to be able to take.

The questions:

  1. Since you’re planning to do this on Windows, you could start with
    Instant Rails. That will give you Mongrel, weBRICK and Apache for web
    servers. The “rsh stuff” is outside of the web server. It happens on
    different TCP ports and will be executed outside the web server.

By the way, there are security issues with “rsh”. You’ll want to use
something more secure. You could use “ssh”, like most of the
Internet-based Subversion and CVS repositories do.

  1. There are really two options for data management that make sense to
    me. If you start with Instant Rails, you’ll have MySQL already, so you
    might as well use it. But the other option is a little more
    “interesting”, though outside the typical Rails (but not Ruby) realm.

There’s an open-source tool called “RRDTool” that is designed to be a
back end for exactly this type of application! There is a Ruby interface
to it but as far as I know nobody has interfaced it to Rails. It does
have some packages available for exporting an RRD (Round Robin Database)
to conventional databases, so you could use RRDTool for your monitoring
data collection and management functionality and Rails for the analysis
and presentation.

  1. Windows Ruby and Windows Ruby on Rails are both capable of doing
    this. However, if you use RRDTool, that will take care of the background
    work for you.

[email protected] wrote:

/ …

I hope i could clearly state what I am trying to acheive.

So, you want each of 20 user machines to individually collect stats from
80
computers and generate a Web page summarizing the results. Yes?

Why don’t you have one machine collect the stats every five minutes and
serve the Web page to the others in some secure way? This would prevent
a
lot of redundant net traffic.

If you used SSH, you could deliver the Web page without an HTTP server
to
any calling PC with the appropriate credentials. No Web server, one host
machine, very secure. Simple.

If the Web page turned out to be local, you could still do without the
Web
server. Since the page is local to the client machine, you could simply
provide a file URL instead of a HTTP URL. Much simpler. If the page is
accessed via SSH, same thing – no Web server required.

And, as someone else has pointed out, rsh is a bad idea.