Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Java (http://www.velocityreviews.com/forums/f30-java.html)
-   -   Re: Sockets for inter-process communication (http://www.velocityreviews.com/forums/t123847-re-sockets-for-inter-process-communication.html)

Frank D. Greco 06-29-2003 06:00 PM

Re: Sockets for inter-process communication
 
"Jeremy" <jeremys@uci.edu> 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 06-30-2003 03:47 AM

Re: Sockets for inter-process communication
 
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 <fgreco@REMOVEcrossroadstechNOSPAM.com> wrote in message news:<81aufvsb4suae03fg4a70e00vab1pgg5pv@4ax.com>. ..
> "Jeremy" <jeremys@uci.edu> 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 |
> +=========================================+



All times are GMT. The time now is 05:32 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.