I have a one thread per connection version and it works fine,  however it
uses a lot more memory,  not to mention all the threads use up stack space
and then there are memory manager issues with threads. I am not convinced
one thread per connection is going to scale well for something like a
instant message server where you have lots of long term connections that
sit idle most of the time.
I could also use a thread pool with each one handling 64 connections.
The other thing is while using select might be slower I don't think it
would be noticeable to users because of network latency.
On Mar 2, 2012 8:23 AM, "Jorge Aldo G. de F. Junior" <jagf...@gmail.com>
wrote:

> It WILL be slower.
>
> One thread per connection scales very well on multiple core systems.
>
> While a single thread wont scale.
>
> If you are having trouble dealing with multithreaded programming you
> might look at my Pascal Actor Model framework that makes use of queues
> to allow easy communication between actors (threads)
>
> 2012/3/2 Tony Caduto <tony.cad...@gmail.com>:
> > Wow,  windows sucks :-),
> > What if I do my own select by keeping a list of tsockets and loop through
> > and use canread on each one,  I can't imagine it would be much slower on
> a
> > modern server with a fast cpu and multiple cores.
> > I did read on Google of people raising fd_setsize past 64 on newer
> windows
> > servers is and win 7 and it worked.
> >
> > On Mar 1, 2012 3:10 PM, "Lukas Gebauer" <gebyl...@mlp.cz> wrote:
> >>
> >> > I was looking in sswin32.inc and the fd_setsize const is 64 and in
> >> > sslinux.inc it's 1024
> >> >
> >> > Why is the win32 FD_SETSIZE const only 64?
> >>
> >> See: http://tangentsoft.net/wskfaq/advanced.html
> >> chapter 4.9
> >>
> >>
> >> --
> >> Lukas Gebauer.
> >>
> >> http://synapse.ararat.cz/ - Synapse Delphi and Kylix TCP/IP Library
> >> http://geoget.ararat.cz/ - Geocaching solution
> >>
> >>
> >>
> >>
> >>
> ------------------------------------------------------------------------------
> >> Virtualization & Cloud Management Using Capacity Planning
> >> Cloud computing makes use of virtualization - but cloud computing
> >> also focuses on allowing computing to be delivered as a service.
> >> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> >> _______________________________________________
> >> synalist-public mailing list
> >> synalist-public@lists.sourceforge.net
> >> https://lists.sourceforge.net/lists/listinfo/synalist-public
> >
> >
> >
> ------------------------------------------------------------------------------
> > Virtualization & Cloud Management Using Capacity Planning
> > Cloud computing makes use of virtualization - but cloud computing
> > also focuses on allowing computing to be delivered as a service.
> > http://www.accelacomm.com/jaw/sfnl/114/51521223/
> > _______________________________________________
> > synalist-public mailing list
> > synalist-public@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/synalist-public
> >
>
>
> ------------------------------------------------------------------------------
> Virtualization & Cloud Management Using Capacity Planning
> Cloud computing makes use of virtualization - but cloud computing
> also focuses on allowing computing to be delivered as a service.
> http://www.accelacomm.com/jaw/sfnl/114/51521223/
> _______________________________________________
> synalist-public mailing list
> synalist-public@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/synalist-public
>
------------------------------------------------------------------------------
Virtualization & Cloud Management Using Capacity Planning
Cloud computing makes use of virtualization - but cloud computing 
also focuses on allowing computing to be delivered as a service.
http://www.accelacomm.com/jaw/sfnl/114/51521223/
_______________________________________________
synalist-public mailing list
synalist-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to