I want to write a pair of applications, one to run on the desktop (probably in .NET, but I'm fine with that part) and one written in JavaScript using Mojo and Prototype to talk to this desktop application via Wifi or direct USB cable connection.
However, I don't even know if its possible to do this via Javascript and the relevant libraries?

Is this possible, and if so, can someone give me some pointers on where to start reading about how this could be achieved?

Thanks