[noPoll] noPoll : Query related to I/O mechanism, max concurrent connections.

Francis Brosnan Blázquez francis en aspl.es
Sab Dic 7 14:29:48 CET 2013


> Hello everyone,

Hi There!

> It's been a week or so I started up researching on websockets and I landed
> up here as I found a lot of interesting things about nopoll. Am very
> new to websockets thing, so request you to please don't mind in case
> something sounds funny :).
;-) 

> I was seeking some help regarding some aspects about the nopoll library in terms
> of performance, I/O mechanism and message posting.
> 
> 1) Is there any kind of bottleneck or performance issues (if it has been
> tested) in case I wish to integrate the same to a server supporting approx
> 200k simultaneous tcp/tls connections?

Ok, it shouldn't be a problem (a part from the obvious resource allocation needed
to support that amount of connections...). Assuming you do support that
amount of connection, then noPoll will just add the enough "magic" ti
make each of those connections to run WebSocket.

Maybe the biggest problem to consider here is the amount of memory+cpu
that requires wss:// (but not because websocket itself, but due to the
amount of resources to sustain a single TLS session).

> 2) Does it provide support to integrate to the external I/O mechanism,
> lets say if I already have EPoll mechanism at place, and I wish to
> integrate the same into it?

Sure! It comes with a built-in waiting loop for those cases you need
something simple, but in general, I think the target is to integrate it
into existing loops. This is what we have done with Turbulence [1] and
Vortex Library [2]. 

[1] http://www.aspl.es/turbulence
[2] http://www.aspl.es/vortexlibrary

You have more about here:

http://www.aspl.es/nopoll/html/nopoll_core_library_manual.html#nopoll_manual_reading_content_from_connection

Talking about this, an interesting feature that provides noPoll is port
sharing. This means you can run legacy+websocket on the same port. We're
using at Core-Admin [3] to support BEEP, BEEP over Websocket and BEEP
over secured WebSocket on the same port. 

[3] http://www.core-admin.com

You've got more info about that here:

http://www.aspl.es/nopoll/html/nopoll_core_library_manual.html#nopoll_implementing_port_sharing

> 3) Let's say if we implement websocket server, Can we do the receive
> handling in 1 thread for all the (say max 200000 sockets) and continue
> with send operation using multiple threads. In that case do we need
> any callback to check if the connection is ready? 

Under previous links you'll find everything about this. In short: you
can watch noPoll sockets as regular sockets (in fact they are). Once
movement is detected, call appropriate functions to get data received...

> And also, would I
> need some locking before sending my data from any thread or its
> already taken care of in noPoll library?

Ok, we've designed the library so it can work in threaded and
non-threaded scenarios. In this case you must provide the right
functions to let noPoll to create mutexes, destroy, lock and unlock
them... with this:

http://www.aspl.es/nopoll/html/group__nopoll__support_ga7f2a26a896c1416b23933097a993a435.html#ga7f2a26a896c1416b23933097a993a435

Then noPoll will use these at the right places...

Let us to know your progress and any product using noPoll. We will be
glad to publish some references about it. BR

> Would really appreciate your responses on the same.
> 
> Regards,
> _Ayush
> _______________________________________________
> noPoll mailing list
> noPoll en lists.aspl.es
> http://lists.aspl.es/cgi-bin/mailman/listinfo/nopoll




Más información sobre la lista de distribución noPoll