Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3697320
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T04:50:44+00:00 2026-05-19T04:50:44+00:00

I have an old memcached client implementation that is based of the danga client,

  • 0

I have an old memcached client implementation that is based of the danga client, but was slightly modified. I think this client is now called Memcached-Java-Client.

The implementation I have at hand is old, unmaintained, and seem to be bogus.

I need to migrate the client to a newer client with the following constraints:

  1. I need the new client hashing algorithm to be compatible with the old one. If this constraint is not met, we will have to make the site (at least partially) unavailable for a few hours.
  2. Support various serialization methods, and allow extensibility for the serialization method.
  3. Improved performance over my existing client.
  4. Be compatible with Moxi

The current implementation uses a consistent hashing algorithm which seemed to be compatible to the consistent hashing used by Xmemcached except that I can’t get a cache hit for keys stored by the old client and fetched with the Xmemcached client.

I debugged the code, and I get the same hashcode, but I think the servers ring is different, and thus the overall hashing method is different.

This is the code I used for initializing the xmemcached client:

  final MemcachedClientBuilder builder = new XMemcachedClientBuilder(AddrUtil.getAddresses("server:11211 server:11212 server:11213 server:11214"));
  builder.setCommandFactory(new BinaryCommandFactory());
  builder.setSessionLocator(new KetamaMemcachedSessionLocator());
  builder.setTranscoder(new WhalinTranscoder());
  memcachedClient = builder.build();

I am willing to also give spymemcached a try if I can’t get xmemcached to work, but I prefer the later.

Edit:
I tried spymemcached as well, and can’t get it to be compatible with my current client.
Here’s my spymemcached client initialization code:

final ConnectionFactoryBuilder builder = new ConnectionFactoryBuilder();
builder.setProtocol(Protocol.BINARY);
builder.setTranscoder(WhalinTranscoder());
builder.setHashAlg(HashAlgorithm.KETAMA_HASH);
builder.setLocatorType(Locator.CONSISTENT);
final MemcachedClient client = MemcachedClient(builder.build(), AddrUtil.getAddresses("server:11211 server:11212 server:11213 server:11214"));
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-19T04:50:44+00:00Added an answer on May 19, 2026 at 4:50 am

    It seems like my old danga client is incompatible with the Xmemcached/Spymemcached clients due to a simple reason:
    The danga client hashes the host:port strings while the later clients hash the InetSocketAddress which is effectively equals to host/IP:port.

    Due to this fact I am unable to remain compatible when migrating to a newer client. Well, actually both Xmemcached, and Spymemcached clients are somewhat extensible and do allow some support in making this happen, but doing this will be too ‘hacky’ to my preferences.

    What I decided to do is to migrate my code to use one of Xmemcached/Spymemcached according to benchmarks results. Both are compatible with moxi’s hashing algorithm.
    I may eventually end up using a client side moxi only – depending on the overhead it will add. I like this option best since it makes the application configuration much simpler.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an old application developed in Delphi 2006 that I now needed to
I have a old website that generate its own RSS everytime a new post
I have several old 3.5in floppy disks that I would like to backup. My
We have some old C code here that's built with nmake. Is there an
We have old Word templates that were originally written for Word 97. For each
For someone who's been down this road, please share your breadcrumbs. I have old
I have an old project that uses MPXJ library to access MS Project 2010.
I have old Delphi application. This app takes session key from server, do some
if try implemnt my first MVVM in WPF app. I have old app based
We have old .net 1.1 project that is using a third party component. Aparently

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.