Re: Sockets for inter-process communication

Discussion in 'Java' started by Sudsy, Jun 28, 2003.

  1. Sudsy

    Sudsy Guest

    Jeremy wrote:
    > Is this terribly inefficient? What I mean is - using a network socket to
    > exchange objects with another app or thread on the same machine. Is there a
    > more efficient way to do this? Any good reading on inter-app communication
    > (or inter-thread communication within the same VM)?
    >
    > Thanks,
    > -Jeremy


    Someone already mentioned using PipedInputStream/PipedOutputStream for
    inter-thread communication. Jon Cruz also alluded to the fact that the
    typical TCP/IP protocol stack is smart enough to know when the source
    and destination are the same machine (even with different addresses)
    and can "short-circuit" the processing so that packets never actually
    get transmitted on the physical interfaces.
    An additional wrinkle in the *NIX environment is named pipes, accessed
    using AF_UNIX in the socket call. These are usually very efficient. Of
    course they're also are limited to inter-process communication on the
    same host.
    Always cheaper to use kernel memory, don't you know...
    Sudsy, Jun 28, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Knute Johnson
    Replies:
    0
    Views:
    827
    Knute Johnson
    Jun 27, 2003
  2. Jon A. Cruz
    Replies:
    0
    Views:
    734
    Jon A. Cruz
    Jun 28, 2003
  3. Frank D. Greco
    Replies:
    1
    Views:
    2,206
    Keeger
    Jun 30, 2003
  4. Hugo Ferreira
    Replies:
    0
    Views:
    791
    Hugo Ferreira
    Dec 4, 2006
  5. Gabriel Genellina
    Replies:
    0
    Views:
    532
    Gabriel Genellina
    Dec 4, 2006
Loading...

Share This Page