Monday, 10 April 2017

host frontend for image procsessing pipeline

What I have

  1. I have an image processing pipeline on my EC2 server that gets executed by the invocation of python abc.py. The execution time is between 30 seconds to 100 seconds.

  2. I have a website that takes an image as an input from a user via image upload option.

What I want

I want to have a website that gives anyone to upload an image on it and thereafter my pipeline on EC2 machine should prcocess it and show the output to user.

How I am currently doing this Right now I have used nodeJS to directly do ssh into the remote machine, go to specified location within machine, execute the command & return the output to frontend.

What is the issue

The problem is that current architecture timeouts if the processing takes more than 30 seconds. I tried increasing timeout but that didn't help.

I am advised to host an API onto that EC2 machine and then call this API instead of doing ssh. I know, still the timeout issue will persist.

What is an ideal way to do this considering my image processing backend is in python?

Till now I have thought about socket.io

Thanks



via Guru

No comments:

Post a Comment