Results 1 to 4 of 4
Hi, I am newbie and need to implement custom component on unix for unidirectional communications.
Client applications all on local box, around 1000 of them, will send short (fixed size ...
- 01-26-2008 #1Just Joined!
- Join Date
- Jan 2008
- Posts
- 2
programming high load unidirectional application
Hi, I am newbie and need to implement custom component on unix for unidirectional communications.
Client applications all on local box, around 1000 of them, will send short (fixed size 8 bytes) data packets to the server.
Send will happen pretty often, thousands per second. Clients are all local applications.
Server component will store this data and process, at some point.
The question is what is the most efficient way to implement such intercommunication,
will unix named datagram socket do that job?
How to ensure reliable data transfer assuming all clients are always connected and may send data?
What mechanism to use for client multiplexing, can fork() be avoided?
Thanks,
Conrad
- 01-26-2008 #2
Is the server also on the same local box?
--
Bill
Old age and treachery will overcome youth and skill.
- 01-27-2008 #3Just Joined!
- Join Date
- Jan 2008
- Posts
- 2
yes server is local too
yes server is local too, all clients and server are on the same box.
Please advice.
- 01-27-2008 #4
You'd have to try several communications approaches to see which one was the highest performance for you, but since everything is on the same box, I'd try a fifo (named pipe) first.
You make it with the mkfifo command. You open it on the server side read only. You open it in each client write only.
The simplest situation is when the server reads eight bytes, processes them, and then goes back to the beginning of the loop to read another eight bytes. Things can get a bit more complicated, but not much, if the server needs to do other things at the same time.
Hope this helps.--
Bill
Old age and treachery will overcome youth and skill.


Reply With Quote