[nanomsg] Re: Port sharing, tcpmux, web-related roadmap et c.

  • From: Martin Sustrik <sustrik@xxxxxxxxxx>
  • To: nanomsg@xxxxxxxxxxxxx
  • Date: Thu, 20 Nov 2014 08:19:58 +0100

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yes, it has to stay on, so that new connections can be established in
the future. Maybe the best way to deal with it would be to start the
daemon at the operating system boot time and just leave it running all
the time.

For those who, for whatever reason, can't run the daemon as a separate
process, there's an API to start it within the current process
("nn_tcpmux(5555);") but that's kind of ugly, given that even it that
case the daemon is still a system-wide resource.

Martin

On 20/11/14 05:47, Bent Cardan wrote:
> I think the daemon would have to stay on!
> 
> On Wed, Nov 19, 2014 at 11:43 PM, Bent Cardan
> <bent@xxxxxxxxxxxxxxxxxxxx <mailto:bent@xxxxxxxxxxxxxxxxxxxx>>
> wrote:
> 
> Thank you, Martin. That's great, with just a descriptor
> allocation, looks like there's nothing incurred after the
> connection. Could we even stop the daemon after the connection is
> established, or would that process need to continue during normal
> transport? -Bent
> 
> On Wed, Nov 19, 2014 at 11:30 PM, Martin Sustrik
> <sustrik@xxxxxxxxxx <mailto:sustrik@xxxxxxxxxx>> wrote:
> 
> Hi Bent,
> 
> 
>> What sort of I/O model, blocking or async (I would imagine 
>> implementing select and poll) presents the lowest average cost
>> for binding communication between the tcpmux daemon and its 
>> corresponding recv function in nanomsg?
> 
>> Would the tcpmux daemon issue some sort of signal or call to 
>> nn_recv?
> 
> First of all, tcpmux daemon is involved only in the connection 
> establishment phase. After that it hands the connection to the 
> application and gets out of the way. Therefore, performance-wise, 
> tcpmux is equivalent to simple tcp transport.
> 
> If you want to look at the code, the connection hand-over is done
> here:
> 
> https://github.com/nanomsg/nanomsg/blob/tcpmux/src/devices/tcpmuxd.c#L282
>
>  Martin
> 
> 
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJUbZYeAAoJENTpVjxCNN9Y3RUH/R1niMBXbz/M4Gcit8VOG2BS
d0LVFMV0SjNBTnaF7De2BNF2iIlxxw0LDh+8LO9LBrSnNRJHlRgngIvbU8vm3rkG
voUab4i4D7nYDCThteM7d16mXwmBRY9dEdhdySHoe4wg04L7yBrNJCo7BZ3+QknS
s+5v2dCmNlZtyWgJCNd6bGP+cVErzz3cRvn/lv4jxnpT9Aj5xgvafiKL3dxiH3aG
On4gjoxvpRG33qvJN1zOz8yp1OtlH6DjvnVQb1LrCTUcFpWSvEh79sZKm4ahe0Jt
7UCBxzs/F3vtpOaaBYmjrG6T0iu1A8UBdDT/vl11VR76o4bQSV43Vxp/vBW04Dk=
=t1Yw
-----END PGP SIGNATURE-----

Other related posts: