Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> a network service

sigh solving the same problems over and over and over

inetd, xinetd, djb's tcpserver, probably others and heck, even systemd have all offered well tested and hardened solutions this this problem.

Every generation rewrites Unix badly



Couldn't he just wrap his Haskell executable in inetd?

I don't know whether m0nastic is doing that, but I don't think writing a program in Haskell precludes the use of inetd, etc.


Yes, that was my point.

Although I might suggest that inetd is an bit anachronistic.

Here's DJB's take - http://cr.yp.to/ucspi-tcp.html

" Many sites are replacing inetd with tcpserver, for several reasons:

* inetd is unreliable under high loads. It cuts off service for 10 minutes if it receives ``too many'' connections in 1 minute.

* inetd does not provide effective resource management. It will happily use up all your memory if you are running a popular service.

* inetd has trouble with sudden bursts of activity. Its listen() backlog is typically only 5 or 10 and cannot be raised.

"

Personally I use tcpserver. I have an SMTP server I wrote in awk - http://www.proweb.co.uk/~matt/awk/smtpd.awk I ran this as the main SMTP server for production web site for about 5 years.

and a web server in rc shell script http://www.proweb.co.uk/~matt/rc/webserver.rc

They don't have to know anything about being network programs.


amusingly I've just spotted a bug in the smtp code. a missing _ for logging unexpected EOF reading from the client. Not fatal but maybe useful for spotting spammers.

I've inspired myself to resurrect using this instead of Postfix for incoming mail. See if I can get it hooked up with spamassassin.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: