Monday, May 21, 2012

Recent Entries

May 6

Written by: david
Thursday, May 06, 2010 8:22 PM 

PingAlive breaks down into two areas...

  • The Website (the bit you see).

    This is a DotNetNuke based site. For those who haven't heard off, or used DNN before; its a web site that includes the tools to edit and maintain itself built in. Commonly known as a content management system (CMS). I've added a skin and designed the banner / logo myself.

    The PingAlive pages where you view your sites details were written in Visual Basic .Net. They access an SQL Server database that holds all the details of each site and its reponse times.

    Apart from that, theres not much else to it, just deciding on page structure and also what to bung in there in terms of text etc.
     
  • The Pinger (the bit you don't see).

    This is a very simple program. It ticks every second, and at the start of every two minutes it gets a list of the websites that need 'pinged'. It spreads this list out so it does so many every second. Then on each tick it accesses the sites for that second. This way it uses the minimum resources to actually perform the accesses.

    Each access is done on its own thread since most of the time is spent waiting on a response. Once it gets a response it saves the details in an SQL Server database. If an unforeseen error occurs it is logged to a text file and the application exits. The scheduler tries to kick off a new process every 5 minutes if one doesn't already exist.

    Also there is a little mailer program that monitors a single table within the database every minute. If it finds an entry in the table is uses the data within to format an email to send out, and marks the entry as handled. The pinger program adds entries where required to this table.

    To perform the 'pings' themselves the program basically makes a request similar to what a browser would make to the site. The only major difference is that i use a HEAD request method which only pulls down the header rather than the full page. This keeps my bandwidth down to around half a kilobyte per 'ping'. 

 

Tags:

3 comment(s) so far...

Re: Basic Design

nice project. Only other option I'd like is to be able to set the time between pings.

By boomhauer on   Saturday, February 12, 2011 8:52 PM

Re: Basic Design

Love this project, great job.

By danielobryk on   Monday, September 19, 2011 12:14 PM

Thank you

Great work on this tool! Very useful for sites on shared hosts where access to tweaking the server is restricted.

Thanks for all your hard work :-)

DS

By damiensawyer on   Sunday, April 22, 2012 11:12 PM

Your name:
Your email:
(Optional) Email used only to show Gravatar.
Your website:
Title:
Comment:
Security Code
CAPTCHA image
Enter the code shown above in the box below
Add Comment   Cancel 

Navigation

Archive

Search

Copyright (c) 2012 PingAlive