Ok, so I'll attempt to answer this one. Some of it will be pseudocode, and some will be actual code.
The basic pipeline would be:
Once the request has been made and received by the web service, your back end code will need to generate a Shell script command to call an instance of your blender application on the server.
Syntax would something like:
blender -b scene.blend -P pythonscript.py -o //outputpath -F PNG -x 1 -a -- camVar1 camVar2 camVar3
- scene.blend is your scene file on the server
- pythonscript.py is your launch script that will process your input
- everything following the "--" are raw input variables and the camVar values are written into the command from the backend code
Your pythonscript.py file will start like this:
# these variables are read backwards from the end of the shell command
camVar1 = sys.argv[-3]
camVar2 = sys.argv[-2]
camVar3 = sys.argv[-1]
See also: How to pass command line arguments to a Blender Python script?
Then in the same python script you can set the camera properties from the input variables, and render out the image to the output folder.
The web service backend would have to be monitoring the output path for the rendered image to be written, and then serve it back to the initial web request. It may not be fast enough for an immediate web response, so you may have to serve the image via a image link notification.