Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Monitoring a Web Based Application

Options
  • 30-10-2007 4:56pm
    #1
    Closed Accounts Posts: 18


    Hi,
    Anyone got any thoughts on whether this is feasible - I realise it's a bit vague...

    The user side is a web based app where a user logs in and starts a "session" - where they have x amount of time, say 24 hours, to complete questions/tasks etc.

    In the background is an app that monitors this web app and all its users and it has features like notifying (via email/text whatever) the user and/or the admin that they haven't done anything in 23 hours and their session window is about to close. Basically it constantly monitors the database of the main web app and carries out set actions based on results of that monitoring.

    I think my main query surrounds the feasibility of that "monitor" application, having something constanstly checking the data in the database, seems like it might tie up all resources on the server or the DB - maybe it could be run at set intervals of say 30 minutes ? Or maybe its more of a web server module type application?

    Or maybe I'm going mad...


Comments

  • Registered Users Posts: 3,594 ✭✭✭forbairt


    Depending on what you're using .. windows or unix/linux ...



    My Unix / Linux solution would be a script that would get run every x minutes this would be done via a cronjob ...

    It scans the database ... finds out who's been naughty or nice .... and hey presto it bangs off an email depending on the size of the database / userbase I'd set it to email at maybe 5 minute intervals.

    You may also want to set up emails to only send every 20 seconds / 30 seconds depending on your server setup (for example sending out 500 emails every few minutes is probably not the best idea on a shared hosted site)

    hope thats of some help

    Windows has something similar Windows Schedule Task ... but its been a while since I've played with it. It would basically mean doing something similar


  • Closed Accounts Posts: 18 hurlerman


    Thanks for the thoughts.
    It's at such an early stage I'm still open to Windows with .Net or Php/Mysql on Unix.
    I've been leaning along the same lines - Running a script at regular intervals be that with windows task scheduler or cron

    Could have dedicated hosting servers if needed eventually so don't have to be worried about shared hosting restrictions, then again if it was to make use of the existing mail server it'd probably wreck it with that volume


  • Registered Users Posts: 413 ✭✭ianhobo


    hurlerman wrote: »
    Thanks for the thoughts.
    It's at such an early stage I'm still open to Windows with .Net or Php/Mysql on Unix.

    As regards .NET, you should just be able create a thread which has the processing/scanning code in it. Send it to sleep for X minutes


  • Registered Users Posts: 9,557 ✭✭✭DublinWriter


    hurlerman wrote: »
    Or maybe I'm going mad...
    Smacks of bad design to be honest.

    Instead of having a monitoring application, have the main application write user-generated events to an audit log table.


  • Closed Accounts Posts: 362 ✭✭information


    hurlerman wrote: »
    The user side is a web based app where a user logs in and starts a "session" - where they have x amount of time, say 24 hours, to complete questions/tasks etc.

    You could set the session timeout to 23 hours and then catch the session timeout and execute your code.

    Puts all the monitoring on the server which does it anyways.


  • Advertisement
  • Registered Users Posts: 2,931 ✭✭✭Ginger


    .NET Framework has monitoring tools built in and you can also use perfomance counters on Windows to do all your monitoring


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    Actually what could be done.

    When someone starts the test, the information gets saved to the database at certain intervals (be it change of page for example) and each time information is saved, either a trigger or stored proc checks to see if its still in date otherwise doesnt allow the save and notifies people.

    If email info is saved then you can run a SQL Server agent job to perform an email to people etc using SQL Mail or Database Mail.

    Being honest, you may have to look at the business cases for such a design. Server loads and data volatility etc would also have to be looked at.


  • Closed Accounts Posts: 18 hurlerman


    Thanks for the replies.

    It's not something that has been designed yet, it's at more of a can it be done stage.

    Of course I've thought of user event driven montoring but that won't suffice.
    If a user hasn't done anything in X amount of time I need the system to recognise this and do some action. I can't wait for user actions to trigger these checks.

    As an example - you know those tamagotchi games - where you have to constantly tend to your pet and if you don't he'll die or whatever - well it's loosely based on that (and no I'm not trying to reproduce some kind of tamagotchi game)


  • Registered Users Posts: 2,931 ✭✭✭Ginger


    THen you are looking at polling


  • Registered Users Posts: 9,557 ✭✭✭DublinWriter


    hurlerman wrote: »
    Of course I've thought of user event driven montoring but that won't suffice.
    If a user hasn't done anything in X amount of time I need the system to recognise this and do some action. I can't wait for user actions to trigger these checks.
    Then you'll have to use a combination of audit logging (for user generated events) plus polling (to check and see if the session is dead).

    The polling part of the equation will depend on what type of session management you are using, which in turn may be implemented by what ever web server you end up using.


  • Advertisement
  • Closed Accounts Posts: 18 hurlerman


    Thanks guys.

    I needed another set of opinions and thoughts.


Advertisement