Re: execline script as 2 tcp server sockets

From: Laurent Bercot <>
Date: Fri, 20 Mar 2015 16:17:48 +0100

On 20/03/2015 14:08, Vincent de RIBOU wrote:
> Thanks for prevous answer.
> I would like, if possible, to have a execline script allowing to behave as 2 server-side sockets (accepting as many connections as possible like s6-tcpserver) and an engine (process probably) between the 2 sides able to act as a bridge.
> ----------------for example, i thought about this architecture

world1 <--- IP ---> srv1 process <--- unix socket/pipe ---> program <--- unix socket/pipe ---> srv2 process <--- IP ---> world2

  It is always possible to glue together the different processes of
your program using an execline script. You just need to have
individual programs performing the actual work, and know how they
are supposed to be connected.
  In your model, as long as you have "srv1", "srv2" and "program",
you can have an execline script that launches them all with the
right connections. I wouldn't use a single script, though; if you
have 3 long-lived processes and 2 of them are s6-tcpserver or similar,
better make 3 different services and supervise them all.

  What I don't understand is if "srv1" and "srv2" can serve one
connection per process (i.e. can be run under s6-tcpserver), or if
all connections need to share some state. If "program" is a single
instance and handles all the connections from srv1 and srv2, then
it can basically hold all the shared state, but maybe that's not
what you want.

Received on Fri Mar 20 2015 - 15:17:48 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC