Edit: I should also point out that there is a fairly well-established protocol for online latex compilers, namely that of the CLSI (https://github.com/scribtex/clsi), which is maintained by jpallen at ShareLaTeX. So, it should be straightforward to do this in a vendor-neutral way.
Edit: I should also point out that there is a fairly well-established protocol for online latex compilers, namely that of the CLSI (https://github.com/scribtex/clsi), which is maintained by jpallen at ShareLaTeX. So, it should be straightforward to do this in a vendor-neutral way.