[Mono-aspnet-list] static (singleton) class performance/issues on Mono
Tim Nelson
nelson.timothy at gmail.com
Wed Apr 13 12:15:34 EDT 2011
Part of the set of web services I am deploying on ASP.NET Mono depend
on making a connection to an another server by a socket for certain
requests. Part of opening up that socket (and the associated init
code from that server) is fairly expensive. I decided to create a
singleton static class that keeps a pool of socket connections keyed
by a token (this is handed out the the client to uniquely identify
them) so that I can keep those sockets open between requests. I also
start a thread in this class that reaps entries if a socket hasn't
been used in (say) 15 minutes.
My question is...is this a proper model for handling what I need to
do? Other than memory usage, is there anything I should be concerned
about? I am fairly new to ASP.Net and I wanted to make sure the
foundation I am creating will stand up over the long haul.
Thanks.
More information about the Mono-aspnet-list
mailing list