Re: Bidirectional RPC communication, [callback] or client string binding?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Greg

Thank you for the info on why "callback" examples have been removed.

"A better solution is to make server communicate with the client by
returning [out] data, rather then calling back:"
The server can not communicate to the client if it relies on the client
calling the server?

Do you have any other recommendations or references on dynamically
generating endpoints so that the server can connect back to the client in
order to communicate to the client the same way the client communicates to
the server, except the server is a well known endpoint, and the client is a
dynamic endpoint. I.e. both endpoints will act as client and server, but one
will initialte the communication to a well known endpoint, then the other
will connect back.

Pieter


"Greg Kapoustin [MSFT]" <grigorik@xxxxxxxxxxxxxxxxxxxx> wrote in message
news:42ba2790$1@xxxxxxxxxxxxxxxxxxxxx
> As you have remarked, both the [callback] solution and making your client
> a server have some security issues. A better solution is to make server
> communicate with the client by returning [out] data, rather then calling
> back:
>
> - To send server a message, the client calls: InRpc([in] data).
> - To retrieve a message from the server, the client calls: OutRpc([out]
> data).
>
> Depending on your scenario and performance requirements, you can make the
> OutRpc call asynchronous in order to save threads. Client can post OutRpc
> to the server, and the server will complete it when data is available.
>
> Callbacks are strongly discouraged, and hence have been removed from the
> samples.
>
> Greg
>
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
>
> "Pieter" <msnews@xxxxxxxxxxxxxxxx> wrote in message
> news:ezY%23mw5bFHA.2288@xxxxxxxxxxxxxxxxxxxxxxx
>>I am implementing a framework where two local processes communicate to
>>each other using local RPC.
>> The one process will act like a server, the other like a client.
>> The client needs to communicate to the server, and the server needs to
>> communicate to the client, i.e. both client and server need the ability
>> to remotely execute a function.
>>
>> I am considering:
>> a) [callback] interfaces in the client allowing the server to call the
>> client, similar to the client calling the server.
>> b) Let the client send the server a unique string binding to let the
>> server connect to the client.
>>
>> I noticed that the callback SDK example is no longer present in the
>> W2K3SP1 SDK once installed.
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/examples.asp
>> I also know that both callbacks and client string bindings require
>> scrutiny to prevent exploitation.
>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/rpc/rpc/callbacks.asp
>>
>>
>> I welcome your recommendations, cautions, alternatives, and samples.
>>
>> Pieter
>>
>
>


.



Relevant Pages

  • Re: Intermittent Remoting Event Callback Problem
    ... MarshalByRefObj created using the New statement and returned to the client ... a SAO resulting in a callback to a "proxy"/wrapper class. ... to the server upon disconnection. ... reqMsg, IMessage retMsg) ...
    (microsoft.public.dotnet.distributed_apps)
  • Re: Custom COM callbacks
    ... a COM server cleanup connections to a client if the client crashes". ... I have an out of process COM server that provides notifications of events to ... clients via a custom callback interface. ... call Release on the callback interfaces, ...
    (microsoft.public.vc.atl)
  • Re: What doesnt lend itself to OO?
    ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
    (comp.object)
  • This is going straight to the pool room
    ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
    (comp.os.vms)
  • Re: jboss normal client/server communication
    ... > some client side libraries for marshalling and setting up the ... > Setting up a servlet on the server and communicate directly with this ... The servlet could even emit ... > going to run in the same local area network as the server, ...
    (comp.lang.java.programmer)