Re: Sockets for inter-process communication

Discussion in 'Java' started by Frank D. Greco, Jun 29, 2003.

  1. "Jeremy" <> sez:

    >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)?


    Not sure about Windoze, but on Solaris, intra-machine sockets
    are a special case at the low-level, so they are very fast.

    Sockets are good inter-app communication mechanisms on the
    same machine. So are MappedByteBuffer's (ie, mmap). Do
    you mean java-to-java or java-to-nonjava?

    Inter-thread communication??? Why? All non-locals are all
    in the same heap.

    Frank G.
    +=========================================+
    | Crossroads Technologies Inc. |
    | Enterprise Java Engineering |
    | Web: www.CrossroadsTech dot com |
    | Email: fgreco @ crossroadstech dot com |
    +=========================================+
    Frank D. Greco, Jun 29, 2003
    #1
    1. Advertising

  2. Frank D. Greco

    Keeger Guest

    Windows also has named (and anonymous) pipes. They are implemented
    using sockets. It's a little less work to setup.

    As for java inter-thread comm, i think that comes down to design and
    such. Using sockets can make it easier to control synchronization,
    without the overhead of using the synchronize() stuff. that's one
    thought off the top of my head. :)

    Frank D. Greco <> wrote in message news:<>...
    > "Jeremy" <> sez:
    >
    > >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)?

    >
    > Not sure about Windoze, but on Solaris, intra-machine sockets
    > are a special case at the low-level, so they are very fast.
    >
    > Sockets are good inter-app communication mechanisms on the
    > same machine. So are MappedByteBuffer's (ie, mmap). Do
    > you mean java-to-java or java-to-nonjava?
    >
    > Inter-thread communication??? Why? All non-locals are all
    > in the same heap.
    >
    > Frank G.
    > +=========================================+
    > | Crossroads Technologies Inc. |
    > | Enterprise Java Engineering |
    > | Web: www.CrossroadsTech dot com |
    > | Email: fgreco @ crossroadstech dot com |
    > +=========================================+
    Keeger, Jun 30, 2003
    #2
    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. Sudsy
    Replies:
    0
    Views:
    963
    Sudsy
    Jun 28, 2003
  4. Hugo Ferreira
    Replies:
    0
    Views:
    792
    Hugo Ferreira
    Dec 4, 2006
  5. Gabriel Genellina
    Replies:
    0
    Views:
    533
    Gabriel Genellina
    Dec 4, 2006
Loading...

Share This Page