How to invoke client's callback at server end?
Asked Answered
A

0

0

RPC do things like this:

server define a function foo_max(para)
client call foo_max, send 'max+para'
server get 'max' and call foo_max(para)
server send return val
client get result and return

But this way is not flexible because I must define all functions at server end. My case is that I want to support user-defined callback function at client end, so how can I call the client's callback funciton at server end?

Thanks

Abednego answered 2/11, 2013 at 8:57 Comment(7)
Are you fully aware of the performance and security implications? Do you authentificate clients, and is so, how?Saldana
@delnan I don't get your meaning..Abednego
This allows anyone to execute arbitrary programs on your server. They can do anything, you might as well post the server's login creditals on the internet. Unless, of course, you have a watertight authentification (so that only selected, trusted people can do this), but you don't seem to be a security expert.Saldana
@delnan yes, I am not, so how can I support the case in my question? Need I write all client-required functions at server end?Abednego
Well, you can attempt to sandbox the client's code, but this too requires a lot of expertise and is risky (especially if the client code needs to access data from the server process, so you can't just spawn a separate, sandboxed process). It's probably easiest to manually add all procedures the client needs on the server end, which shouldn't be that hard if you control the server (which you apparently do).Saldana
@delnan situation here is not a web service, the server is only worked for the requiring clients while other clients start other server procs.Abednego
let us continue this discussion in chatAbednego

© 2022 - 2024 — McMap. All rights reserved.