Protocol for communicating over socket ?
-
Hi, I've been searching the web for months but although there is a lot of stuff to find about sockets between client and server, I've found very little on designing a protocol to talk over this socket. For what i need (basic question/response and synchronizing data, which i currently do using xml), there is little to find. And so i learned a lot of hard lessons involving recoding a lot of the app due to stupid errors which i did not forsee due to lack of experience. Does anyone know some sources for more information about this subject or have a view on protocols for client/server apps? It's my first Client/Server application and I feel like i am in the dark.
-
Hi, I've been searching the web for months but although there is a lot of stuff to find about sockets between client and server, I've found very little on designing a protocol to talk over this socket. For what i need (basic question/response and synchronizing data, which i currently do using xml), there is little to find. And so i learned a lot of hard lessons involving recoding a lot of the app due to stupid errors which i did not forsee due to lack of experience. Does anyone know some sources for more information about this subject or have a view on protocols for client/server apps? It's my first Client/Server application and I feel like i am in the dark.
A 'Protocol' is nothing more than an agreed upon conversation. When you walk up to someone and say hello and expect a hello in response you have a protocol. You are free and open to do what you want really but since you are shuffling files back and forth perhaps you want to look at an established file transfer protocol. Loop up RFC 959 for FTP[^] and start reading.
-
A 'Protocol' is nothing more than an agreed upon conversation. When you walk up to someone and say hello and expect a hello in response you have a protocol. You are free and open to do what you want really but since you are shuffling files back and forth perhaps you want to look at an established file transfer protocol. Loop up RFC 959 for FTP[^] and start reading.
Hmm.. I understand that. Seeing I come from a system administrator background I have enjoyed reading a couple of the RFC's in the past ;-) However: I am not transmitting files over the socket. The actual question is: are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?
-
Hmm.. I understand that. Seeing I come from a system administrator background I have enjoyed reading a couple of the RFC's in the past ;-) However: I am not transmitting files over the socket. The actual question is: are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?
Noctris wrote:
are there gotcha's in protocol design (for instance i found out that having an parameter to let the client detect when the command is done is an abolute must).?
Not sure what that means.
Noctris wrote:
It's my first Client/Server application and I feel like i am in the dark.
Not unusual, it's a large subject.
Noctris wrote:
I've found very little on designing a protocol
Yeah I don't remember ever seeing anything like that. Try looking at existing protocols rather than looking for something that teaches protocols. I suggest you start with some simple application level protocols like HTTP/FTP/POP3 of course...
Noctris wrote:
what i need (basic question/response and synchronizing data, which i currently do using xml)
That sounds like SOAP so you may not need to create your own protocol. It's difficult to say for sure with the limited information you provided.
led mike