Networking Forums

Networking Forums > Computer Networking > Linux Networking > Messaging Protocol

Reply
Thread Tools Display Modes

Messaging Protocol

 
 
Dan N
Guest
Posts: n/a

 
      10-23-2006, 12:48 PM

I want to send simple messages over a network using a tcp-ip client-server
model. Client makes tcp connection to server, sends some data, and waits
for an application level acknowledgement from the server that the message
has been received. Is there some standard application level protocol to
do this?

Dan
 
Reply With Quote
 
 
 
 
Moe Trin
Guest
Posts: n/a

 
      10-23-2006, 08:02 PM
On Mon, 23 Oct 2006, in the Usenet newsgroup comp.os.linux.networking, in
article <(E-Mail Removed) t>, Dan N wrote:

>I want to send simple messages over a network using a tcp-ip client-server
>model. Client makes tcp connection to server, sends some data, and waits
>for an application level acknowledgement from the server that the message
>has been received. Is there some standard application level protocol to
>do this?


[compton ~]$ whatis telnet nc
telnet (1) - user interface to the TELNET protocol
nc (1) - TCP/IP swiss army knife
[compton ~]$

Netcat (nc) for the server, telnet for the client?

Old guy
 
Reply With Quote
 
Dan N
Guest
Posts: n/a

 
      10-24-2006, 12:38 AM
On Mon, 23 Oct 2006 15:02:41 -0500, Moe Trin wrote:


> Netcat (nc) for the server, telnet for the client?


Thanks for the suggestions. Telnet probably isn't very suitable, too much
overhead with logins etcetera. I'm thinking that maybe http is the way to
go. I'll write a short C program to send the message as an http POST.
Could even use Apache to read it.

What I need is pretty basic, send a message and get an acknowledgement
back. It would be easy enough to write this, but I was wondering if
there was already some standard protocol that I could use. No use
re-inventing the wheel.

Dan
 
Reply With Quote
 
Thomas Schodt
Guest
Posts: n/a

 
      10-24-2006, 04:20 AM
Dan N wrote:
> On Mon, 23 Oct 2006 15:02:41 -0500, Moe Trin wrote:
>> Netcat (nc) for the server, telnet for the client?

>
> Thanks for the suggestions. Telnet probably isn't very suitable, too much
> overhead with logins etcetera.


Logins?
What logins?

> I'm thinking that maybe http is the way to
> go. I'll write a short C program to send the message as an http POST.
> Could even use Apache to read it.
>
> What I need is pretty basic, send a message and get an acknowledgement
> back. It would be easy enough to write this, but I was wondering if
> there was already some standard protocol that I could use. No use
> re-inventing the wheel.


Both telnet and netcat will allow you to do that
you probably don't have to roll your own.
 
Reply With Quote
 
Dan N
Guest
Posts: n/a

 
      10-24-2006, 06:13 AM
On Tue, 24 Oct 2006 05:20:39 +0100, Thomas Schodt wrote:

> Both telnet and netcat will allow you to do that
> you probably don't have to roll your own.


Thanks. I'll have a closer look.

Dan

 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      10-24-2006, 12:15 PM

Dan N wrote:

> I want to send simple messages over a network using a tcp-ip client-server
> model. Client makes tcp connection to server, sends some data, and waits
> for an application level acknowledgement from the server that the message
> has been received. Is there some standard application level protocol to
> do this?


HTTP is probably a good choice. It is an application-level protocol
that has well defined requests and replies.

It really depends upon several things:

1) Do you need pipelining? That is, is it important to be able to issue
a request that might take a long time and be able to issue other
requests while the first one is being processed? Do you need to be able
to receive the replies out of order?

2) How large are the requests and the replies? What format are they in
and how are they structured? (Text? Binary? XML?)

3) Will a client typically be making a single reply or a series of
replies? Is it too expensive to have the overhead of establishing a TCP
connection for each request/reply pair?

4) How important is performance over simplicity or ability to
debug/trace?

5) What authentication requirements do you have?

If the 'conversation' is not a stream of logically distinct requests,
HTTP may not be a good choice. If requests change the logical state of
a connection, HTTP may not be a good choice.

If requests are like 'do this', 'do this', and 'give me this', HTTP
makes logical sense. If they're more like 'log in', 'acquire permission
to do X', and 'register for notifications if Y happens', then HTTP
makes much less sense.

DS

 
Reply With Quote
 
Dan N
Guest
Posts: n/a

 
      10-25-2006, 02:13 AM
On Tue, 24 Oct 2006 05:15:25 -0700, David Schwartz wrote:

> HTTP is probably a good choice. It is an application-level protocol
> that has well defined requests and replies.



> Is it too expensive to have the overhead of establishing a TCP
> connection for each request/reply pair?


Thanks for the suggestions. The tcp overhead might be a problem though.
The data transfer is pretty simply, mostly client to host at regular
intervals. But the client needs an ack to know that the message got there.

Dan



 
Reply With Quote
 
Alan Connor
Guest
Posts: n/a

 
      10-25-2006, 03:11 AM
On comp.os.linux.networking, in
<(E-Mail Removed)>, "Moe Trin" wrote:

> On Mon, 23 Oct 2006, in the Usenet newsgroup
> comp.os.linux.networking, in article
> <(E-Mail Removed) t>, Dan N
> wrote:
>
>>I want to send simple messages over a network using a
>>tcp-ip client-server model. Client makes tcp connection to
>>server, sends some data, and waits for an application level
>>acknowledgement from the server that the message has been
>>received. Is there some standard application level protocol to
>>do this?

>
> [compton ~]$ whatis telnet nc telnet (1) - user interface to
> the TELNET protocol nc (1) - TCP/IP swiss army knife [compton
> ~]$
>
> Netcat (nc) for the server, telnet for the client?
>


Netcat can be used for both server and client.

From the README (which is the manual):

Netcat can be used as a simple data transfer agent, and it
doesn't really matter which end is the listener and which end
is the client -- input at one side arrives at the other side as
output.

/quote

Connect to pre-arranged port on 'server' (where nc is listening)
and send 'some data' (a file) and have the 'server' send a file
(acknowledgement) back to the 'client' which would then send
whatever message (file) it had to the 'server'.

Fairly simple bash scripts. I don't know if you have ever tried
to script with telnet, but it is much simpler with nc and runs
much faster.

Alan

--
http://home.earthlink.net/~alanconnor/contact.html
http://home.earthlink.net/~alanconno...val/index.html
http://home.earthlink.net/~alanconno...nix/index.html
 
Reply With Quote
 
Alan Connor FGA
Guest
Posts: n/a

 
      10-25-2006, 03:11 AM
Thanks Beavis.
 
Reply With Quote
 
David Schwartz
Guest
Posts: n/a

 
      10-26-2006, 08:25 AM

Dan N wrote:

> On Tue, 24 Oct 2006 05:15:25 -0700, David Schwartz wrote:


> > HTTP is probably a good choice. It is an application-level protocol
> > that has well defined requests and replies.


> > Is it too expensive to have the overhead of establishing a TCP
> > connection for each request/reply pair?

>
> Thanks for the suggestions. The tcp overhead might be a problem though.
> The data transfer is pretty simply, mostly client to host at regular
> intervals. But the client needs an ack to know that the message got there.


Then HTTP is probably just fine. You can use keep-alives (they are
enabled by default in HTTP/1.1) to re-use the TCP connection.

DS

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Real Time Messaging Protocol (RTMP) 2Sweet Windows Networking 2 04-02-2008 01:08 PM
Protocol Chart - Learn how to use a Protocol Analyzer news.comcast.giganews.com Windows Networking 0 08-21-2004 04:35 PM
Protocol Chart - Learn how to use a Protocol Analyzer news.comcast.giganews.com Wireless Networks 0 08-21-2004 04:35 PM
Protocol Chart - Learn how to use a Protocol Analyzer news.comcast.giganews.com Windows Networking 0 08-21-2004 04:34 PM
TCP/IP protocol missing from ME's protocol install options Hayse Windows Networking 1 07-21-2003 10:48 PM



1 2 3 4 5 6 7 8 9 10 11