struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ram...@nmsworks.co.in
Subject Re: scope and presenting realtime data (fwd)
Date Wed, 26 May 2004 17:38:49 GMT
Dear All,

Thanks for all your feedback.

Based on the discussion i derive following conclusions. please comment on 
their accuracy.

  1. A Data Storage object (Say a HaspMap with the server name as a key 
     and the N value data object as value are stored along with the last 
     updated time) -- we are not going for database to save time on I/O
     and do not want to deal with stale data in database. --

  2. A cleaner thread will wake-up periodically, and remove the server 
     entry which is not being used for the last 'X' minutes 
     -- This we need to do as we are having large number of servers to be 
     monitored --

  3. For each request the bean class need to
	a. poll and get the current value
	b. get the stored data object for the server
	c. if the object exists, add the value and drop the oldest
	   sample if size becomes N+1
	d. if object does not exist, create with the current value
	e. update the value in data storage object 

      
 thanks &  regards
   -Ramudu

 
On Wed, 26 May 2004, Irfandhy Franciscus wrote:

> My advice may sound out of the context,
> 
> but how bout actually storing each last N value to a database. this way 
> you can even have an archive of the Last N value.
> 
> Or if you dont want to setup a database, just write the last N value to 
> a property file or text file.
> 
> Regards,
> Irfandhy Franciscus
> 
> ramudu@nmsworks.co.in wrote:
> > Hi,
> > 
> > Can anyone suggest some approach for this issue.
> > 
> > thanks & regards
> >  -Ramudu
> > 
> > 
> > ---------- Forwarded message ----------
> > Date: Wed, 26 May 2004 14:52:23 +0530 (IST)
> > From: ramudu@nmsworks.co.in
> > Reply-To: Struts Users Mailing List <user@struts.apache.org>
> > To: user@struts.apache.org
> > Subject: scope and presenting realtime data
> > 
> > Hi,
> > 
> > We are developing a web based interface (struts + jsp etc) for realtime 
> > monitoring of server cpu usage.
> > 
> > We have written a bean that will contact the server and get the current
> > cpu usage and return that value. I want to plot a line graph (using
> > jfreechart) with the cpu usage in Y-axis and time in X-axis.  The Graph
> > need to plot the last 'N' values + the current value during each refresh.
> > 
> > The issue is how to remember these last N values. I do not want to assign 
> > session scope for this object as the end-user might monitor for more than 
> > one servers and several users might be using the system at same time.
> > 
> > How this situation is typically handled in the Struts+jsp environment.
> > 
> > thanks & regards
> >   -Ramudu
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message