Client connection

91 views
Skip to first unread message

noob

unread,
Nov 21, 2012, 11:01:25 AM11/21/12
to spymem...@googlegroups.com
What would be the best way to handle client connection? Using a singleton class or just create new connection each time a get/set request is made and shutting down that connection after? Will the latter not degrade the performance of the system if there's a huge number of concurrent requests?

Thanks in advance for your help.

ingenthr

unread,
Nov 22, 2012, 2:43:46 PM11/22/12
to spymem...@googlegroups.com
It's best to keep your MemcachedClient object around as long as possible.  There is overhead to setting up the object and it's underlying connections.  Whether singleton, thread local, or other is up to how you want to scope it and what your app is doing.

Hope that helps,

Matt

Jason Hunter

unread,
Mar 18, 2013, 7:24:32 PM3/18/13
to spymem...@googlegroups.com
In earlier versions where the client extended SpyThread there was an isAlive() function.  Is there something similar to that now that extends SpyObject?

Thanks

Matt Ingenthron

unread,
Mar 29, 2013, 9:51:16 PM3/29/13
to spymem...@googlegroups.com
Java's Thread has an isAlive() and parts of the client internals use it.

I'm not sure I understand the context though.  How would you expect to use the isAlive()?

The design of the client, at the moment, is that it tries to keep all connections up and running until shutdown().


--
You received this message because you are subscribed to the Google Groups "spymemcached" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spymemcached...@googlegroups.com.
To post to this group, send email to spymem...@googlegroups.com.
Visit this group at http://groups.google.com/group/spymemcached?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
Message has been deleted
0 new messages