What kinds of Software do you create in D.

Patrick Schluter Patrick.Schluter at bbox.fr
Tue Nov 2 17:54:09 UTC 2021


On Tuesday, 2 November 2021 at 16:48:21 UTC, H. S. Teoh wrote:
> On Tue, Nov 02, 2021 at 01:40:46PM +0000, Adam D Ruppe via 
> Digitalmars-d wrote:
>> On Monday, 1 November 2021 at 23:49:35 UTC, H. S. Teoh wrote:
>> > [...]
>> 
>> And it has an embedded webserver if you do want one! can even 
>> serve on a unix domain socket though i've never found that 
>> terribly useful so far.
>
> A CGI app listening on a unix socket could potentially be 
> useful in certain sandboxed webserver setups where the 
> webserver talks to the CGI executable running in the background 
> via the unix socket.  I've actually seen similar setups before 
> (an external webserver linked to a localhost-only webserver 
> running in a separate process), though these days this approach 
> is kinda obsolete.  But I could see some niche use case where 
> the CGI program is actually a daemon that's doing other things 
> in the background, and occasionally services a request from the 
> web-facing webserver via CGI.  A unix socket would be just the 
> thing for something like that.  (Though equally common, if not 
> more, these days is to just listen to a TCP socket bound to 
> localhost.)
>
The performance difference between TCP sockets and Unix sockets 
is far from beieng negligeable. On our setup at work a memcached 
server on Unix sockets has twice the thtroughput of a localhost 
socket (Linux on 15 core intel server).


More information about the Digitalmars-d mailing list