Do I want an ACK in my high-level protocol when using TCP?
- From: JC <jason.cipriani@xxxxxxxxx>
- Date: Wed, 17 Dec 2008 22:36:16 -0800 (PST)
I have two applications that must reliably communicate with eachother.
Application A must send requests to application B, and application B
can process the requests in any order, and return the results (request
IDs are used to associate responses with requests). Processing a
command can take anywhere from a few seconds to 10 minutes.
I create two TCP connections between the applications; a request
connection and a response connection. Application A sends requests
over the request connection, and is simultaneously reading responses
from B on the response connection.
My question is, is there any reason why I need application B to send
an acknowledgment to application A when it receives a request? E.g. do
I want to do this:
A -> sends command on request connection
B -> sends ack on *request* connection
... some time later ...
B -> sends response on response connection
Or can I just do this and assume that, because I was using TCP, B
successfully received the request:
A -> sends command on request connection
... some time later ...
B -> sends response on response connection
Currently, commands do not fail, there is no error response. But even
if there were, I think I can have B send the error back as part of the
response on the response connection.
The reason I'd prefer to not have B send an acknowledgment back is
performance - it will be a bottleneck and won't meet the performance
requirements. If I did use the ack, the reason I'd do it on the
request connection instead of the response connection is ease of
implementation -- on both A and B's end.
I'm not really sure what the usual way of doing this is (or if there's
a different approach to using two connections, but using separate
connections for requests and response greatly simplifies the
implementation as well).
Thanks,
Jason
.
- Follow-Ups:
- Re: Do I want an ACK in my high-level protocol when using TCP?
- From: Rick Jones
- Re: Do I want an ACK in my high-level protocol when using TCP?
- From: David Schwartz
- Re: Do I want an ACK in my high-level protocol when using TCP?
- Prev by Date: Re: gdb not catching out-of-bounds pointer
- Next by Date: Re: Do I want an ACK in my high-level protocol when using TCP?
- Previous by thread: GDB verbose print messge
- Next by thread: Re: Do I want an ACK in my high-level protocol when using TCP?
- Index(es):
Relevant Pages
|