Migration - Zanity

From USYVL Development Wiki
Jump to navigation Jump to search

Introduction

Spring 2017 Season - USYVL is moving to a new backend provided by Engage and a front end provided by Zanity.

Have about two months to figure out how to migrate the current schedule content from the old (joomla) setup to the newer (wordpress) setup that Zanity is developing under.

Conference Call 2017-02-23

Conference call with Randy, Aaron and Justin.

  • Anthony and Aaron will work together on the integration
  • Zanity will handle the wordpress coding and page production
  • Aaron will help them navigate the data
    • Aaron will provide in some fashion the mobile website code base
  • Justin was curious about resource footprint
    • Aaron is pretty sure that the size of the data should keep the resource footprint small
      • db itself is only 1Mb
      • PDFs consume about 4Mb of disk space
        • Aaron will test storing the PDFs in the db.

Logistics/Thots on Collaboration - Prepping for discussing with Justin :-)

How best to proceed??

I am open to other ideas, but my time/energy focus are pretty limited, so want to try to minimize efforts for this relatively short transition window.

With the relatively short timeframe we have to work with, I am thinking that the best way forward is to utilize the sqlite3 db that the scheduling workflow system produces to drive the http://m.usyvl.org site. That code is much newer (2013) than the scheduling and workflow codes and has far less accumulated kruft.

I think it has a good chunk of the functionality that USYVL needs. It might even have enough info to recreate the PDFs from (but not sure about that). more on that below as well.

Some ideas:

  • Provide the schedule access through a wordpress plugin driven by the sqlite3 db used for http://m.usyvl.org ?
    • I don’t have experience in doing wordpress plugins, but have done some drupal modules.
    • Thinking that Zanity team could provide a basic framework for a wp plugin using a sqlite db. I could help port stuff into that framework.
    • I would want to be able to setup a local dev/clone of the USYVL site for doing any dev on my part.

Zanity Collaboration

  • Does Zanity team use git? github? bitbucket?
    • If so does Zanity have an available non-public area to establish a repo in to work collaboritively on?
    • I am sbbeachvball on github.
      • Also manager of https://github.com/orgs/USYVL.
        • currently more of a playground, sandbox.
        • I don’t have the two big code (workflow and scheduling) repos stored there because my account is public and there are a few files with hardcoded acct/pw info.
        • But we can use this as long as there is nothing in what we have to do that needs to be private, potentially less of an issue if all the required info is in the sqlite db which would NOT be in repo :-)

Data handling/management

  • If we go with the sqlite db, how should we handle getting the db onto the live site?
    • Do we push the file there?
      • if so how? (ftp, rsync, ssh/scp ???)
    • Pull the file from where it’s generated? (If helpful, I can provide an rsyncd server)

Background on PDFs and file management

  • I currently use an extended FPDF (http://fpdf.org) class to produce PDF files.
    • Really, really like fpdf :-)
  • Previously we would ftp the PDF files to an explicit location on the old joomla server.
    • Index files were produced with fixed paths that would ultimately point at those files.
      • Horrid … absolutely, but dates back to the days (2001?) when usyvl.org was a completely static html site and the schedules were a subsite completely generated by the scheduler system :-)
      • Heavily tweaked over the years (ugly) to accommodate web server/hosting changes.
      • I have been pushing to do something more dynamic for some time now :-)
  • scheduling code:
    • ftp's PDFs and html snippets of index files (headers, etc stripped off) to joomla server which provided wrapper to the content provided
    • ftp's sqlite db to mobile site

So, going forward I am thinking of few possible paths (maybe there are others????)..

  • produce the PDFs on the fly using fpdf
    • not super intensive, but I get nervous about bots or other abuse wasting cycles generating the files on the server in this case. So not my first choice.
    • I think that the sqlite db has enough info to recreate these
      • but I am not absolutely sure about that
      • regardless, I have not created the code to do that.
  • Thinking it may be better to store the PDF streams in a table of the sqlite db….
    • Have not attempted that before, but I think it’s doable.
      • Will obviously make the sqlite file larger, but may still be simpler than dealing with the individual PDF files.
  • another option, if the sqlite db has the required bits, would be similar to option 1
    • use the sqlite db to generate the files in a single pass as part of the workflow after uploading an updated sqlite db.