[ale] starting point recommendations

Jim Lynch ale_nospam at fayettedigital.com
Wed Nov 7 11:56:19 EST 2007


James P. Kinney III wrote:
> On Wed, 2007-11-07 at 11:13 -0500, Michael H. Warfield wrote:
>   
>> On Wed, 2007-11-07 at 10:24 -0500, James P. Kinney III wrote:
>>     
>>> I have a strong need for a network daemon. Due to portability reasons it
>>> will need to be coded in C (not an area I am familiar enough with).
>>>       
>> 	Does it need to be a standalone daemon?  Can it be something that's
>> simply forked out of inetd / xinetd?  The later will be far far simpler,
>> especially if you are expecting multiple connections (otherwise your
>> daemon will need to manage it's own tasking / threading) or if the load
>> it going to be reasonably light.
>>     
>
>
> Hmm. Good point. This will not be a heavy use process. It needs to be
> able to accept a data request for a running process (output UID and PID)
> and also be able to send a kill to a PID. As such, the data coming in
> must be secure and from known sources only. The gotcha on this is it
> will also need to run on a thin client with an NFS mounted / dir. I need
> to verify if xinetd is even running on that platform. If I don't have to
> handle threading, woohoo!. One less thing to code.
>   
>>> I am looking for recommendations from the C coders on the list for "best
>>> of breed" books to point me down the path to solid, secure network
>>> daemon coding in C for only Linux environments. I have K&R (the bible -
>>> duh!) and "Practical C Programming" by Steve Oualline (O'Reilly) (seems
>>> a bit useful but no network discussions). 
>>>       
Looks like xmlrpc might be a better fit.  There are libraries out there 
that will make the server (and client) tasks fairly easy.  That way you 
really don't have to worry about socket programming at all.  That is of 
course assuming you have control over both the client and server protocol.

Jim.



More information about the Ale mailing list