Xojo Conferences
XDCMay2019MiamiUSA

IPC or TCP socket? (Real Studio network user group Mailinglist archive)

Back to the thread list
Previous thread: Can't write to text file?
Next thread: Re: ICPSocket with Separate Apps


Re: ConsoleApp and ServiceApp   -   Rubber Chicken Software Co.
  IPC or TCP socket?   -   James Sentman
   Re: IPC or TCP socket?   -   Norman Palardy
   Re: IPC or TCP socket?   -   Peter Truskier

IPC or TCP socket?
Date: 02.08.09 18:03 (Sun, 2 Aug 2009 13:03:36 -0400)
From: James Sentman
Hi Folks,

I have several apps that connect to each other over TCP sockets
locally on the same machine, but all this talk about IPC sockets
lately and I wonder if I shouldn't revisit that. I used TCP sockets in
the beginning because I was familiar with them and I knew they would
work for what I was going to do. I also imagined a configuration
option to spread the apps among several machines to increase the load
capacity, the socket wouldn't care if the other program was local or
remote, but I've never worked on that as it hasn't come up.

But a lot of people I see here have chosen to use IPC sockets instead
of network sockets for local communications. Is there a benefit to
doing this that I'm not seeing vs regular network sockets? Has anybody
done any benchmarking and are they much faster? Is there less latency
on connection or anything like that? I have had absolutely perfect
behavior from the TCP sockets connecting locally and they feel just
fine speed wise, but always looking to learn something new and make
improvements!

Thanks,
James

James Sentman http://sentman.com http://MacHomeAutomation.com



_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: IPC or TCP socket?
Date: 03.08.09 00:01 (Sun, 2 Aug 2009 17:01:20 -0600)
From: Norman Palardy

On 2-Aug-09, at 11:03 AM, James Sentman wrote:

> Hi Folks,
>
> I have several apps that connect to each other over TCP sockets
> locally on the same machine, but all this talk about IPC sockets
> lately and I wonder if I shouldn't revisit that. I used TCP sockets
> in the beginning because I was familiar with them and I knew they
> would work for what I was going to do. I also imagined a
> configuration option to spread the apps among several machines to
> increase the load capacity, the socket wouldn't care if the other
> program was local or remote, but I've never worked on that as it
> hasn't come up.
>
> But a lot of people I see here have chosen to use IPC sockets
> instead of network sockets for local communications. Is there a
> benefit to doing this that I'm not seeing vs regular network
> sockets? Has anybody done any benchmarking and are they much faster?
> Is there less latency on connection or anything like that? I have
> had absolutely perfect behavior from the TCP sockets connecting
> locally and they feel just fine speed wise, but always looking to
> learn something new and make improvements!
>

I'd expect a well written TCP stack to realize that things are not
going anywhere off the machine and be about as fast as an IPCSocket

The upside to an IPCSocket is that you wont trigger port or firewall
warnings (well you shouldn't in theory)
But, IF you eve decide to distribute across several machines you have
to switch to TCP sockets

Fortunately IPCSockets and TCPSockets have similar enough API's that
switching back and forth can be very close to changing a super and
very little else.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: IPC or TCP socket?
Date: 02.08.09 21:34 (Sun, 2 Aug 2009 13:34:01 -0700)
From: Peter Truskier
On Aug 2, 2009, at 10:03 AM, James Sentman wrote:

> Hi Folks,
>
> I have several apps that connect to each other over TCP sockets
> locally on the same machine, but all this talk about IPC sockets
> lately and I wonder if I shouldn't revisit that. I used TCP sockets
> in the beginning because I was familiar with them and I knew they
> would work for what I was going to do. I also imagined a
> configuration option to spread the apps among several machines to
> increase the load capacity, the socket wouldn't care if the other
> program was local or remote, but I've never worked on that as it
> hasn't come up.
>
> But a lot of people I see here have chosen to use IPC sockets
> instead of network sockets for local communications. Is there a
> benefit to doing this that I'm not seeing vs regular network
> sockets? Has anybody done any benchmarking and are they much faster?
> Is there less latency on connection or anything like that? I have
> had absolutely perfect behavior from the TCP sockets connecting
> locally and they feel just fine speed wise, but always looking to
> learn something new and make improvements!

One definite advantage is that you needn't worry about triggering port
conflicts and/or any obnoxious firewall messages/involvement...

--Peter

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>