Monthly Archives: June 2016

Photosphere Viewer

I want to create a vtour application using PhotoSphere-Veiwer which is a open source javascript application that uses the Three.js rendering engine.  It only requires the Photspheres images, 10 of thousands of generated images, xml, html and javascript.

More analysis and design is required but this is looking to be a long term idea I can work on.

-br

Understanding Heroku One-off Dyno and Job Scheduler

I have been working on designing a daily upload node.js application that calls a third-party in order to refresh the application MongoDB datastore. One of the solutions I was investigating was Heroku Worjer Dynos, Background Jobs and Queuing.  I spent several hours of scratching my head trying to figure out how I could add a refresh button feature to my web application using the above pattern.  I decided that it was not really a feature that should be implemented.

What I need to do:

  1. Create a refresh file by call third party service and saving the query results to a JSON flat file
  2. Drop the MongoDB collection.  I don’t have Mongo available to me on the dyno so I will need to connect using headstone (Headless Keystone) script to purge all of the collections documents.
  3. Create a new MongoDB collection using the the JSON flat file as input.  Again headstone (Hedless KeystoneJS) script to insert the documents.
  4. Remove the JSON flat file

With Heroku I will be able to create a One-Off Dyno and Schedule it on a nightly.  Having Papertail enabled to monitor and notify me of any issues.

-br