title: How to keep system running while replacing the current engine
body: <p>We have two systems, <code>A</code> and <code>B</code>. System B sends Write and Read request as well as A returns a response for every read request using the existing engine E_current in A. Each Write request causes a modification in the existing engine E_current. </p>
  
  <p>Periodically E_current will be replaced by E_new. While in renewal process, E_new is not able to used yet. Some of the Read request that comes while this renewal process depends on Write request that came after beginning of the renewal process. The new engine, E_new, should also do modifications on itself for each Write request that came during the renewal process and already processed by . </p>
  
  <p>After completion of renewal process E_current will be evicted and E_new becomes E_current.</p>
  
  <p><em><strong>Requirements:</em></strong> </p>
  
  <ol>
  <li>Requests are completely concurrent. For example, a write request can
  come while a read request is being processed. </li>
  <li>Multiple modifications on any engine E could cause inconsistent state, state consistency should be preserved.</li>
  </ol>
  
  <p><em><strong>Diagrams:</em></strong></p>
  
  <p><a href="https://dl.dropbox.com/u/3482709/stack1.jpg" rel="nofollow">https://dl.dropbox.com/u/3482709/stack1.jpg</a></p>
  
  <p><a href="https://dl.dropbox.com/u/3482709/stack2.jpg" rel="nofollow">https://dl.dropbox.com/u/3482709/stack2.jpg</a></p>