From: Ian Leitch Date: 2007-10-28T20:54:34+09:00 Subject: Re: A memcached-like server in Ruby - feasible? ------=_Part_12690_20832196.1193572474823 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline It's close to a year since I last worked on Boogaloo, so please forgive my poor memory. * A thread pool is used to ensure (to some very basic degree) that the server doesn't get overloaded quite so easily. The problem with this is that DRb handles each connection in a new thread, if you had a long running operation and many new connection attempts being made, an internal DRb limit may be hit and connections may be dropped. I never looked into this, you may want to remove the thread pool entirely. * The cache implementations aren't thread safe. I left this out deliberately to avoid a performance hit with high lock contention, though in hindsight I'd call this a premature optimization. I'd recommend you make this thread safe before using it in production; race conditions are going to cause you much more of a headache than scalability issues. If you ever reach the point where lock contention is an issue, you could probably split the namespaces into chunks and protect each with separate locks. * You mentioned you want to store and retrieve a large number of objects. I only ever used a small number of or single objects with Boogaloo. You may want to do some quick and dirty tests to see how much Ruby's marshaling costs for large numbers of objects. You'll no doubt find other issues if you decided to use Boogaloo as a basis. As I said, I've not used it in over a year, and for someone that has been using Ruby for less than two, I wouldn't like to put Boogaloo forward as an example of what I'm currently capable ;) On 28/10/2007, Tom Machinski wrote: > > On 10/28/07, Ian Leitch wrote: > > I don't recommend you use this project, I haven't used it myself for > quite a > > while and it has a number of issues I haven't addressed. You may find it > a > > helpful basis implementation if you should decided to go the pure Ruby > > route. > > Thanks, Ian! > > Would you mind sharing - here, or by linking a blog / text, or > privately if you prefer - some information about these issues? > > I'm asking for two reasons: > > 1) To learn about possible pitfalls / complications / costs involved > in taking the pure Ruby route. > > 2) We may decide to adopt your project and try to address those issues > to use the patched Boogaloo in production. > > Thanks, > -Tom > > ------=_Part_12690_20832196.1193572474823--