Skip to content

Net-Centric Computing (CNT 4713) – Project 1.

Notifications You must be signed in to change notification settings

lynkos/web-status-monitor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Web Status Monitor

This project develops a web status monitor (simplified version of uptimerobot.com) to practice web programming and understand the web related protocols: HTTP and TLS/SSL.

  • Implements HTTP client socket to interact with the web server
  • Doesn't use any existing HTTP client library
  • Uses an existing SSL library to help implement the HTTPS client (extra credit)

Requirements

Tip

If you have trouble deciding between Anaconda and Miniconda, please refer to the table below:

Anaconda Miniconda
New to conda and/or Python Familiar with conda and/or Python
Not familiar with using terminal and prefer GUI Comfortable using terminal
Like the convenience of having Python and 1,500+ scientific packages automatically installed at once Want fast access to Python and the conda commands and plan to sort out the other programs later
Have the time and space (a few minutes and 3 GB) Don't have the time or space to install 1,500+ packages
Don't want to individually install each package Don't mind individually installing each package

Typing out entire Conda commands can sometimes be tedious, so I wrote a shell script (conda_shortcuts.sh on GitHub Gist) to define shortcuts for commonly used Conda commands.

Example: Delete/remove a conda environment named test_env
  • Shortcut command
    rmenv test_env
    
  • Manually typing out the entire command
    conda env remove -n test_env && rm -rf $(conda info --base)/envs/test_env

The shortcut has 80.8% fewer characters!

Installation

  1. Verify that conda is installed

    conda --version
    
  2. Ensure conda is up to date

    conda update conda
    
  3. Enter the directory you want web-status-monitor to be cloned in

    • POSIX
      cd ~/path/to/directory
    • Windows
      cd C:\Users\user\path\to\directory
  4. Clone and enter web-status-monitor

    git clone https://github.com/lynkos/web-status-monitor.git && cd web-status-monitor
  5. Create virtual environment from environment.yml

    conda env create -f environment.yml

Usage

  1. Activate monitor (i.e., virtual environment)
    conda activate monitor
  2. Confirm monitor is active
    • monitor should be in parentheses () or brackets [] before your command prompt, e.g.
      (monitor) $
    • See which virtual environments are available and/or currently active (active environment denoted with asterisk (*))
      conda info --envs
      OR
      conda env list
  3. Run monitor.py (urls_file is the path to a file containing a list of URLs)
    python monitor.py urls_file
  4. Deactivate monitor (i.e., virtual environment) when finished
    conda deactivate