top | item 25936957

(no title)

fookyong | 5 years ago

Founder here - thanks for giving that a try!

It's a good question.

There's still a lot to be optimized on the video side of things. But the reason it took 2 minutes is because of things like:

- Checking the video length before rendering - Converting to a standardized format so that the renderer doesn't trip up - Handing off to AWS Lambda, which involves some network I/O - Handing back to my Rails app

So there's a lot of back-and-forth right now that could be optimized.

It will scale nicely under high workloads because my main Rails app isn't really doing much except handing off to AWS Lambda, but this means there is a speed hit both in terms of the I/O and also the Lambda being underpowered.

You can actually see the two main processes happening if you watch the progress bar on the video demo.

You'll notice that the first 50% is a bit slow - that's my Rails app doing some validations, conversions, and packaging things up nicely for the Lambda.

The last 50% seems to move faster - that's the Lambda rendering the final video and then passing it back to Rails.

There's definitely a lot of scope for speeding things up in the first 50%.

As for disrupting long-running processes, I can safely deploy my Rails app any time as it's not performing any of the rendering jobs (on images or video) it's just acting as the job expeditor and receiver of webhooks.

discuss

order

No comments yet.