Re: Sockets for inter-process communication
> 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)?
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
Always cheaper to use kernel memory, don't you know...
|All times are GMT. The time now is 05:03 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.