So, I've been pondering how to expose the visualisations as a service. As I mentioned, cost is a slight concern as the generated files are so large. I want this to be a free service, but I don't want to pay a large amount for it. For a fun project to share, I'm willing to pay for it but only up to a point.
The generated AVIs are going to be too big to fit on the EC2 instances 12GB free after Windows has consumed 18GB of the 30 available. This will require attached EBS storage. Cursory investigation shows I could attach a 50GB drive for about £2.50 a month. Cool.
The next concern is bandwidth. If users will be downloading 20GB files for each visualisation, that's going to add up. I haven't found another (free) library for generating the video files that can use compression so, how about zipping them up?
Good news, an 18GB AVI zips to about 0.5GB. Bad news, it took about 3 minutes.
So far, the visualisations vary from 1 minute long to 4 minutes. The average across them is about 2 minutes. Let's look at the worst case scenario.
A slightly improved version of this visualisation comes in at 41GB as an AVI (ouch) and is about 3 minutes 20 seconds long. Zipping this reduces it to about 0.9GB, but took an astonishing 15 minutes, 30 seconds to do so. Locally. On a high-end MacBook Pro. Fans ablazing all the while.
At this point, I think I need to find another library to natively output an MP4 or something similar with adjustable lossy compression rather than an AVI. But, for the purposes of this post let's crack on.
At the moment, we are at just shy of 19 minutes (3:20 video length, 15:30 to zip) to generate the video and then compress it. I suspect this would be rather longer on a free tier EC2 instance, but I'll work with the numbers I have for now.
No-one is going to stare at a web page for nearly 20 minutes waiting for it to output something for them. And this is assuming they are the only user - there's no queue of visualisations being generated ahead of them. Another option would be to allow them to upload a file and get an email when it is complete. I think this would work quite well, but I'm very wary of handing over my email address to unknown sites and am making the assumption that many other people would be also.
Given all of this, I'm thinking VaaS, while a fun idea probably isn't economically viable.
But, for fun, I'm just going to ponder the architecture given a money-no-object scenario...