Overview of Services under Rainier

From USYVL Development Wiki
Jump to navigation Jump to search

Introduction

This information originally compiled on 2015-02-19 in preparation for a meeting.

The major headings below this introductory section are ordered by where they fit in temporally in the USYVL workflow (not by creation date or importance).

Possibly Migrating away from Rainier

Such a migration would be an opportunity to:

  • re-architect how the data and products are dealt with
    • utilize a single db end to end - event creation, integrated web distribution of schedules, via both desktop and mobile
    • Generate site pages and pdfs on the fly

Challenges in such a migration:

  • providing a few key tools
    • Intersite tournament scheduler that tracks how many away vs home games
    • Intersite pool editor - to create entries in pool layout db for new cases
  • expressing the data for the above tools concisely, accurately and in a way that allows for expansion
  • simplifying/automating things where they can be
    • Tournament Pool Layouts
  • duplicating some of the batch/bulk processing that current system does
    • 95% of work is done with pressing a series of buttons and verifying that there are no errors along the way
  • handling the odd-duck cases and one-off situations.
    • Programs where the schedule structure is different (ie: only one court, used over the course of several hours instead of the usual: multiple courts over 1 hour)
    • Extended events
  • teambuilder (from Rainier)

Other Opportunities

  • Open source any additions/external mods for the h2 site

Workflow

Originated in 2008 while looking for a solution to USYVL issues with tracking progress for programs.

  • Program coordinators work from a single, shared excel spreadsheet.
  • No Centralized progress status/summary information

Created a database structure designed to create tasks and allow them to be completed. DB tables covered:

  • programs
  • facilities
  • users
    • program coordinators - programs assigned to them via administrator
  • School districts
  • holidays - used to restrict event creation during certain periods

Summary

  • About 21000 lines of code.
  • Probably half is relatively unused now
  • Of the remaining, probably 40% is kruft at this point.

What is provided

  • Organize Intersite Tournament Schedule
    • what sites play each other on a given day
    • done at program level
    • needs to be done pre-season
  • Create events based on the above scheduling to import into Rainier
    • start date, stop date defined
    • skip "holiday" dates
    • 1000+ events per season typical (50+ sites * 16-18 days per season)

How it's provided

  • Local sqlite databases with various tables and a spreadsheet style editor
  • Geocoding to get locations
  • Tournament scheduling tool
    • Utilizes geocoded locations
    • Two stage proximity algorithm determines viable candidates
    • Create pull down menus of viable candidates
  • Event export - db based
    • Intrasite events created in table
    • Intersite events created
      • Table triggers replace conflicting Intrasite events with the Intersite event
    • is CSV of events

Scheduling

During the Spring 2005 Season USYVL was still using hand crafted schedules. Pretty sure it was at one of the Ventura tournaments that I approached Randy about exploring digital generation of the schedules as PDFs. It looks like I started exploring that more heavily during the Fall 2005 season as reflected in emails between Aaron and the site maintainer at the time, Bonnie.

Summary

  • Created in ~Fall 2005 to work with CMI and output a completely static html subsite of the main usyvl site at the time.
    • Initially used pdflib, migrated to fpdf later
    • Used the raw input text files, derived data using php in an ad hoc db style
  • Modified in Fall 2008 to add support for Rainier
  • Modified in 2009 to get input directly from workflow during the stint with Active
  • Modified in 2009 (?) to get output into something joomla could work with (strip away outer html).
  • Currently ~37,000 lines of code
    • probably 20-25% of the total is semi duplicated code - similar functionality but input and/or output is in an alternate format.
    • probably 40% of that remainder is kruft from the various input/import system changes over time
    • probably about 30% of that remainder could be done away with a rewrite using a database
      • instead of dealing directly with the 2 imported reports and then deriving various subsets of the data into secondary input files
    • probably 50% of that remainder is support for having to, in essence, reverse engineer the database contents via the 2 reports

The scheduling code has the most kruft and has the greatest need for a complete rewrite due to its history. It started out as almost a proof of concept, with a very limited scope and then major stuff has been tacked on over the years. It's been a part time, incremental build over the course of ten years, with lots of external changes forcing kludgey code adaptation. Some parts of the code are clever, but a lot of the logic is now widely distributed in the code.

Provides

  • Data consistency checks for Rainier
    • Event consistency
      • Rainier has no way to track scheduled events between programs (Intersite Tournaments)
        • Scheduling code relies on event naming conventions to determining those match-ups
        • So, if events have been updated since the workflow import, the data can easily be inconsistent
    • Team information consistency
      • Detect default team names that have not been updated
      • Detect missing information (Division not set)
  • Round Robin tournament schedule for each division's Intrasite events
    • Attempts merge of divisions with one team into another division
    • produces PDFs
      • multipage PDF with 1 sheet per day containing all the divisions
    • produces sqlite db table for export to mobile site
  • Division based Tournament Schedules for Intersite events
    • Utilizes a pool layout DB - probably the best way forward
      • USYVL personnel provide a tournament pool breakdown for a specific configuration, reused for other tournaments with the same configuration
  • Instructional Summary - Daily entries associated with dates and with Intersite events reflected (as opposed to USYVL Redbook with is just Practice 1, Practice 2, Game day 1, etc...)
    • PDF produced
    • HTML produced
  • Geocoding
    • embedded google maps provided on each program page
    • maps.google.com links provided for each program that has to travel on the Intersite Tournament page
  • Provides filtering for when Intersite Tournament Schedules are actually opened for download
    • To avoid different locations/users downloading early revisions of schedules that end up getting changed
  • FTPs files (PDF, indexes, etc...) to live FTP site

How its Provided

  • Rainier database is reconstructed from 2 CSV reports (programs, events) exported from Rainier
  • Instructional Summary
    • Matches program event entries to db based version of the USYVL redbook
      • Relies on Event Name conventions, so is a bit shakey

Mobile Site

Summary

  • Created in May 2013
  • 2800 lines of code
  • Easily replaced if the db structure can provide the information

What it provides

  • Daily schedules on cell phones
  • Can pull all matches for a given team for the entire season
  • Instructional summaries on cell phones
  • Tournament schedules on cell phones
  • Limited location support
    • Goal is to provide user with information based on location and date
  • Scorekeeper app (not widely used, but a fun jquery app).

How its provided

  • Uses Mobile Web Framework (MWF)
  • Uses a single sqlite3 database created during Scheduling processing
  • Uses AJAX for some tasks
  • Uses page templating