Centralised "Dashboard" for web application data ?

For questions and postings not covered by the other forums
Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Centralised "Dashboard" for web application data ?

Postby Rich Cassell » Wed Jul 06, 2011 1:48 am

Hi all,

We run 2-3 web applications (JADE Web Enabled Forms) on each of our 12 JADE Databases and have been doing for a few years now. Although, on the scale of things, this doesn't make us large JADE users, we still do struggle to know how many, and which, users are connected to each application at any one time. Each user has their own logon details and we thought it would be useful to be able to quickly see who is logged on, or, details of the last time a particular user had logged on. This information could come in very useful; particularly for when we need to take the services down for releasing etc, or to conduct load tests etc.

As our applications are spread over a number of databases, what we'd really like would be a dashboard-style system running on it's own database which keeps a track of logon and logoff operations on each of the 20-something applications, reporting the username, time & date stamps etc. Ideally the system should really work in real-time (or as close to it as possible), so i'm assuming i should use notifications, but what i don't know is how you can use notifications across databases in this way. Has anybody done anything like this? I'm pretty much open to any suggestions on how to acheive this functionality.

... I hope this makes sense :?

As a related question... Is there any way of detecting whether a browser window has been closed (i.e. exited without the user logging off). This is causing problems as we have no way of knowing whether users are logged on or not... :roll:

Any help will be appreciated,

Thanks,

Rich

User avatar
ghosttie
Posts: 181
Joined: Sat Aug 15, 2009 1:25 am
Location: Atlanta, GA, USA
Contact:

Re: Centralised "Dashboard" for web application data ?

Postby ghosttie » Wed Jul 06, 2011 2:25 am

I created a stats app that displays graphs of bandwidth usage (and some other info) for each active session connected to any of our Web Services apps:
Clipboard01.png
Screenshot
Clipboard01.png (7.91 KiB) Viewed 6767 times
When the WebSession is created it creates a Stats object and sets a reference to the WebSession on it. I implemented processRequest and reply on the subclass of JadeWebService to measure the sizes of incoming and outgoing messages, the amount of processing time for each message etc. and update the Stats object for the current WebSession. In a separate GUI app there's a form with a timer on it that just displays the information from the Stats objects. In order to display the graph of historical bandwidth usage data there's an array of StatsHistory objects on the Stats object. A reference to the User object of the logged-in user and the remote IP are kept on the WebSession subclass in order to be able to display them.

In your case since you're using multiple databases, each of your web apps would need to send stats info to a central dashboard app or the dashboard app would need to query each db for stats info.

In a web app it's difficult to know when the browser is closed. This isn't too important for us, so we just rely on the session expiring after X minutes of being idle. If this is important information to have, you could have the client JavaScript send an AJAX "I'm still here" message to the server every second or something, and assume that the browser was closed if you stop getting those messages.
Last edited by ghosttie on Wed Jul 06, 2011 12:57 pm, edited 1 time in total.
I have a catapult. Give me all the money or I will fling an enormous rock at your head.

murray
Posts: 144
Joined: Fri Aug 14, 2009 6:58 pm
Location: New Plymouth, New Zealand

Re: Centralised "Dashboard" for web application data ?

Postby murray » Wed Jul 06, 2011 9:58 am

Jade notifications only work within a single Jade database.
To collect status information from several databases you will need to use some sort of messaging, e.g. TCP/IP, shared files, Messaging Framework, Email, etc.
Murray (N.Z.)

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Centralised "Dashboard" for web application data ?

Postby allistar » Wed Jul 06, 2011 12:20 pm

Yes. If you want to present information from multiple databases in a single web page, I would recommend using something like AJAX where the user's browser makes connections to the various backend JADE databases. This could be using standard web services, or it could simply return a webpage from a JADE web enabled application.

Rich Cassell
Posts: 77
Joined: Mon Aug 24, 2009 11:22 pm
Location: Nottinghamshire, UK

Re: Centralised "Dashboard" for web application data ?

Postby Rich Cassell » Thu Jul 07, 2011 2:29 am

Hi Allistar,

Wow, that's literally exactly what we are after! thanks very much. Now i know about the Stats object i'll have a play with that and see how i get on. Not so much the graphs, but the data next to it is just what we're after! I think i might try using shared files to allow us to use a centralised dashboard, other than that we could just run an app on each database individual, a bit cumbersome but it'd do the job. Obviously, it's only an internal thing so i shouldn't spend a huge amount of time on the task. ;)

I think your idea of a small AJAX script to say "I'm here" is quite good, it should give us the affect we're after. Not sure how efficient it will be though. Knowing when people have closed the browser is more of an ideal really so isn't hugely important to us either.

I'll start doing some playing and i'll get back to you at some point with how i got on!

Thanks again :D

Rich

allistar
Posts: 156
Joined: Fri Aug 14, 2009 11:02 am
Location: Mount Maunganui, Tauranga

Re: Centralised "Dashboard" for web application data ?

Postby allistar » Thu Jul 07, 2011 9:36 am

Hi Rich,
Another recommendation I can make is to use the ExtJS Javascript framework which will provide you an easy to develop, nice looking UI experience including graphing capabilities. This also makes the communication easier as you could get the JADE apps to simply return JSON data which contains all of the information required for the dashboard. Depending on your level of Javascript/AJAX/ExtJS experience, I think this solution would be the easiest to develop, the most flexible and also look the nicest.

Regards,
Allistar.

User avatar
Dr Danyo
Posts: 56
Joined: Fri Aug 21, 2009 8:59 am

Re: Centralised "Dashboard" for web application data ?

Postby Dr Danyo » Fri Jul 15, 2011 12:44 am

Hi Rich.

In the past we have defined a "status" web service operation that would return details about the web app (number of workers, port number etc), which could also be used as a health check to make sure the app is up and running. If all your web service apps inherit from an abstract class you could very quickly add this functionality to all your apps.

All you need to do then is write a quick app that can invoke the status method given a base url.

- Dr Danyo.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 34 guests