What I’m Up To: TimeScrub.js

Because I’m in a college class called Advanced FOSS, I get to periodically pick cool things to work on and pretend it’s work.  This is the most recent 4 week project I’m proposing.  It’s been in the back of my mind for a while now, and I’m fairly excited to get an excuse to finally sit down and do it.


TimeScrub.js is going to be a middleware API that records and saves output from simulations (or any program with regular output) over time.  TimeScrub.js exports these “ticks” into a format that can be re-read into another program, like a visualizer, or the original program, allowing for time-travel within simulations.

The goal with TimeScrub.js is to be extremely tight, well-encapsulated, and non-intrusive. I want to encourage simulations to separate into a model-view-controller design pattern.  A simulation could be run in advance to being displayed, allowing better data and visualizations to be shown to the end user.

I’m also am interested in seeing how it could be implemented in deterministic simulations for time-travel, allowing users to go back in time, change a variable, and then re-run the simulation to see what changed.

What I’m using:  

I plan on using Node.js and pure JavaScript.  My secret goal behind this is to figure out in broad terms how to set up a Node.js server and get everything running smoothly in it.  The actual JavaScript parts don’t scare me much, I’m fairly confident I’ll be able to implement the actual library without much trouble at all.

Where I’ll be bundling the final product:

I’ll obviously have the source code available at GitHub, but I’ll also be targeting NPM, the package manager for Node.js.  Targeting Node.js works into the core ethos of the project – the idea is that you run a simulation on dedicated hardware, and either plug the hardware into a monitor and set yourself up with a c

Target Hardware :

I want everything to run on Raspberry Pi.  Since in the back of my head I’m hoping someone could use this software in something like a virtual aquarium or terrarium

Temporary Milestones : 

I’ll have about 4 weeks to get the project to completion.

  • Week 1 (Next week): Planning, pre-documentation.  In the interest of keeping everything scoped well, I don’t want to start coding until I have my entire featureset planned out.  Along with that, I want to have a general idea of how I’m going to do that – ie, what data structures I’ll use, and what things I should be asking for help with.
  • Week 2: Setting up Node.js – I want to get a better sense of what the platform is capable of, and I want to make sure that I understand the inner workings behind what I use.
  • Week 3: Implementation.  I’ve started thinking about what the core features should be and building some data structures in the back of my head, but all of this will obviously be more fleshed out during week 1.
  • Week 4: Packaging, setting up post-documentation, setting up additional tickets on GitHub.  I’m developing this for a couple of reasons, but one of them is that I know I’ll get use out of it.  In the interest of allowing others to do the same, I want the both setup and documentation to be simple, elegant, and easy to follow.  The less work it is for someone I haven’t met to set this up as middleware in their own projects, the better.

Who I’m working with : 

I plan to leverage some of the students in class to a small degree; one of my roommates is a prolific Node.js user, and I know he’ll be able to help me out occasionally when I run into issues.

I also want to get some feedback/advice from one of the professors at my college by the name of Cody Van De Mark.  He’s an amazing coder, with a great understanding of the backend server stuff that I’ve yet to really explore.


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">