title: Choosing a distributed shared memory solution
body: <p>I have a task to build a prototype for a massively scalable distributed shared memory (DSM) app. The prototype would only serve as a proof-of-concept, but I want to spend my time most effectively by picking the components which would be used in the real solution later on.</p>
  
  <p>The aim of this solution is to take data input from an external source, churn it and make the result available for a number of frontends. Those "frontends" would just take the data from the cache and serve it without extra processing. The amount of frontend hits on this data can literally be millions per second.</p>
  
  <p>The data itself is very volatile; it can (and does) change quite rapidly. However the frontends should see "old" data until the newest has been processed and cached. The processing and writing is done by a single (redundant) node while other nodes only read the data. In other words: no read-through behaviour.</p>
  
  <p>I was looking into solutions like <a href="http://memcached.org" rel="noreferrer">memcached</a> however this particular one doesn't fulfil <strong>all</strong> our requirements which are listed below:</p>
  
  <ol>
  <li>The solution must at least have <strong>Java client API</strong> which is reasonably well maintained as the rest of app is written in Java and we are seasoned Java developers;</li>
  <li>The solution must be totally <strong>elastic</strong>: it should be possible to add new nodes without restarting other nodes in the cluster;</li>
  <li>The solution must be able to handle <strong>failover</strong>. Yes, I realize this means some overhead, but the overall served data size isn't big (1G max) so this shouldn't be a problem. By "failover" I mean seamless execution without hardcoding/changing server IP address(es) like in memcached clients when a node goes down;</li>
  <li>Ideally it should be possible to specify the degree of data overlapping (e.g. how many copies of the same data should be stored in the DSM cluster);</li>
  <li>There is no need to permanently store all the data but there might be a need of post-processing of some of the data (e.g. serialization to the DB).</li>
  <li><strong>Price</strong>. Obviously we prefer free/open source but we're happy to pay a reasonable amount if a solution is worth it. In any way, paid 24hr/day support contract is a must.</li>
  <li>The whole thing has to be hosted in <strong>our data centers</strong> so SaaS offerings like Amazon SimpleDB are out of scope. We would only consider this if no other options would be available.</li>
  <li>Ideally the solution would be <em>strictly consistent</em> (as in CAP); however, <em>eventual consistence</em> can be considered as an option.</li>
  </ol>
  
  <p>Thanks in advance for any ideas.</p>