Check this: https://github.com/yzITI/srpc! I specifically designed a light-weight script to make this communication as easy as possible.
It's based on HTTP, and the design goal is to make this communication seamless.