You know duckman it is not this dangerous to call server methods from a client. Look at Corba and you'll have perfect secure language where client calls server methods. You have a local representation of the object situated on the server on the client and the client communicates with the server using the ORB. It is adapted for Java, C, C++,.... modules.
If the C can communicate with a Java program using Corba why not Javascript? For the moment I'm using the classic method to call my methods but I think that building a system allowing a secure communication between Javascript and other languages using Corba concepts would be a very interesting project.
If you want more details just look on the Internet, you'll find all you want.
ciao
ovidiu