From: "M. Edward (Ed) Borasky" Date: 2006-09-19T22:35:16+09:00 Subject: Re: a server that will serve http page created from data collected by "rsh" rajibsukanta@yahoo.co.in wrote: > 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 > > > 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. 2. 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. 3. 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.