This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
.gitignore | Tue Mar 17 18:34:54 -0700 2009 | |
| |
MIT-LICENSE | Mon Apr 13 05:13:08 -0700 2009 | |
| |
README | Mon Apr 13 05:22:50 -0700 2009 | |
| |
Rakefile | Wed May 13 22:45:10 -0700 2009 | |
| |
VERSION.yml | Wed May 13 22:44:28 -0700 2009 | |
| |
jruby-memcache-client.gemspec | Wed May 13 22:45:10 -0700 2009 | |
| |
lib/ | Mon Apr 13 05:13:08 -0700 2009 | |
| |
spec/ | Fri Mar 13 11:16:53 -0700 2009 |
README
This projects provides memcached based stores for JRuby. It is a gem based on Ikai Lan's jruby-memcache-client project hosted at http://github.com/ikai/jruby-memcache-client/tree This project is a JRuby wrapper of the Java MemCache library by Greg Whalin http://www.whalin.com/memcached/ In production, the standard Ruby MemCache client can cause a thread to hang. In the Glassfish application server, by default there are 5 Grizzly connectors that handle incoming requests. A site that uses MemCache heavily can quickly cause all Grizzly connectors to block and take down a site. I'm hoping that this work I am doing here will help others adopt JRuby as a production platform for their Ruby on Rails applications. The Ruby MemCache library was never written with threaded applications in mind. All threads use the same socket, and multithreaded mode basically wraps the IO with a Mutex. The Java library provides several features that are not available in the Ruby MemCache library: - connection pooling - socket timeouts. In forks of the Ruby MemCache library this is achieved either with a Mongrel timeout or use of the Ruby Timeout class, which, at least at the writing of this README, will work unpredictably when being used as a failsafe against hanging IO. As of right now this code only provides a very minimal amount of functionality, but it is enough to use with the Rails cache and cache_fu. Installation ------------ This is a ruby gem that can be installed. gem sources -a http://gems.github.com gem install abhiyerra-jruby-memcache-client --remote Configuration ------------- The JRuby MemCache client uses the same configuration options as the regular MemCache client. Here is how to build the configuration in your environment.rb file: memcache_options = { :namespace => 'fortaleza:production_live:', } memcached_servers = [ ENV['MEMCACHED_LOCATION'] || '0.0.0.0:11211'] # Constant used by libs CACHE = MemCache.new memcached_servers, memcache_options if RUBY_PLATFORM =~ /java/ Note that this may vary based on your particular configuration method and environment.







