27 June 2013

Memcached interface for Oracle Coherence project on github

We've started a github project for an opensource (LGPL) coherence memcached interface..The current state is we have an initial working copy that passes all the tests ran by memccapable for the BINARY protocol only. It also works fine using the binary protocol and the popular spymemcached java api.
Internally it uses Netty for the socket handling and Google GSON for JSON serialisation of POJO cache entries.
So to summarise the features;
  • Fully supports memcached binary protocol
  • Start a memcached server on any port using a Named Cache as the "backing store"
  •  When using the memcached api stores a CacheEntry wrapper around the binary content
  • Will JSON serialise POJO cache entries to Read Only memcached clients
  • Simple api which will work embedded in a storage node, storage disabled node or as an extends client.

To bootstrap a memcached server using the jar use the code snippet below;

int port = 11211;
String namedCach = "TestCache";
MemcachedServer server = new MemcachedServer(port, namedCache);
server.bootStrap();


You can also run it on the command line using;

java uk.co.c2b2.memcached.server.MemcachedServer 11211 TestCache

Assuming your classpath etc. is set up correctly and your Oracle Coherence xml configs are correct.

We haven't built any binaries yet as we aren't at alpha yet! Just grab the code from https://github.com/C2B2/memcached-4-coherence and mvn install.

Enjoy and please comment.











If you enjoyed this post, why not subscribe to our feed?


Enter your email address:



No comments :

Post a Comment