[LCP]design issues

Kurt Mueller mu at problemlos.ch
Wed Aug 27 18:48:01 UTC 2003


On Wednesday, August 27, 2003, at 11:46 AM, mehul radheshyam choube 
wrote:
>     i am going to develop a server program for linux platform. the
> scenario is of One Server - Multiple Clients. which of the following
> technology be used - pipes, FIFO, Message Queues or threads? which one 
> is
> the best/widely used?

I suppose you will run this on a UNIX/UNIX-like system.

For a new client/server (CS) programming system we use:

1) INET sockets (remote)
2) UNIX sockets (local)
3) FIFO (local)

If your CS-programmes are not on the same computer, then INET is the 
choice.
If your CS-programmes are always, and ever will be on the same computer,
you can use UNIX sockets or FIFO.
FIFOs are a little bit faster than UNIX-sockets, but with FIFOs
you cannot peek.


But beside that, it depends also on the average/maximum message size,
and if you have also some timing requests.

If the messages are always short (<1024 Bytes), and your programmes
are always and ever will be on the same computer, then message queues
may be the right choice.
But we found, that message queues have no big advantages over sockets 
or FIFOs.

We have no experience in threads.

In a CS-system it is very important to carefully think about what
is to be done by the clients and what by the server.
When the system is in use, it is usually less tedious to modify
clients than the server.



Grüessli
-- 
Kurt Müller, mu at problemlos.ch





More information about the linuxCprogramming mailing list