Re: RPC versus windows sockets

From: Greg Kapoustin [MSFT] (grigorik_at_online.microsoft.com)
Date: 11/06/04

  • Next message: Greg Kapoustin [MSFT]: "Re: rpc - duplicate symbols for app both client and server"
    Date: Fri, 5 Nov 2004 16:14:06 -0800
    
    

    I am not sure what exactly you are referring to by the "difference in
    handling."

    If you use RPC over ncacn_ip_tcp, then sockets will be used as the
    underlying communication mechanism, but RPC will provide you with some
    high-level services on top of the transport. For instance, RPC will take
    care of data marshalling, SSPI calls to establish the security context and
    encrypt/decrypt data, connection, and thread management.

    These additional services will have some performance cost. The overhead is
    dependent on the scenario, but should not be more than a few 10's of %'s
    over a special-purpose socket implementation. Also, you need to consider
    whether you require this high-level functionality, and if so, the time and
    resources to implement it yourself. For instance, if you send structured
    data, you need to develop some marshalling mechanism, which can be very
    tricky to write. This alone may be a sufficient reason to use RPC in some
    cases.

    I your scenario is super-performance-critical, you should prototype
    equivalent socket-based and an RPC-based implementation and compare them to
    determine whether the overhead is acceptable to you. You may discover that
    the RPC implementation performs better than a socket implementation that has
    not been tuned.

    If you are sending across a bytestream and do not need any high-level
    functionality, sockets may be sufficient.

    The search through this newsgroup and the web should yield some other
    discussions on this subject.

    Greg

    -- 
    This posting is provided "AS IS" with no warranties, and confers no rights.
    "Frank Franzoni" <franzoni@gepasoft.de> wrote in message 
    news:cmffn5$o2e$04$1@news.t-online.com...
    > Hello,
    >
    > I have to develope a 'little' client/server application.
    > I must decide whether to use rpc or windows sockets for communication.
    > I am interested especially in differences between security, performance 
    > and handling.
    > Can anybody tell me about his experiences or recommend me sources in the 
    > internet?
    > Thank you and sorry for my bad english.
    >
    > Greetings Franzoni Frank
    >
    > 
    

  • Next message: Greg Kapoustin [MSFT]: "Re: rpc - duplicate symbols for app both client and server"

    Relevant Pages

    • Re: Using COM for interprocess communication?
      ... the best replacement for a socket is not RPC ... I suggest you use pipes instead. ... These are much closer to sockets ... I have a client/server application which I want to ...
      (microsoft.public.win32.programmer.ole)
    • Re: [NFS] [PATCH 002 of 13] knfsd: SUNRPC: allow creating an RPC service without registering with po
      ... Sometimes we need to create an RPC service but not register it with the ... The NFSv4 callback server should _NOT_ be registering its listening ... * Make any sockets that are needed but not present. ... static int make_socks ...
      (Linux-Kernel)
    • Re: Dynamic C to C Data Transfer
      ... analysis on individual or a small group of financial instruments ... "remote procedure calls" (RPC) just off the top of my head, ... For now I consider RPC, sockets, file writing hack, and INI techniques ... appear to be working on (a distributed automatic stock trading ...
      (comp.lang.c)