title: Is immutable.js interchangeable with redis on a server?
body: <p>Immutable.js states (<a href="https://facebook.github.io/immutable-js/" rel="nofollow noreferrer">https://facebook.github.io/immutable-js/</a>)</p>
  
  <blockquote>
    <p>Immutable.js provides many Persistent Immutable data structures including: List, >Stack, Map, OrderedMap, Set, OrderedSet and Record.</p>
    
    <p>These data structures are highly efficient on modern JavaScript VMs by using >structural sharing via hash maps tries and vector tries as popularized by Clojure >and Scala, minimizing the need to copy or cache data.</p>
  </blockquote>
  
  <p>Redis states (<a href="https://redis.io/" rel="nofollow noreferrer">https://redis.io/</a>)</p>
  
  <blockquote>
    <p>Redis is an open source (BSD licensed), in-memory data structure store, used as a database, cache and message broker. It supports data structures such as strings, hashes, lists, sets, sorted sets with range queries, bitmaps, hyperloglogs and geospatial indexes with radius queries. Redis has built-in replication, Lua scripting, LRU eviction, transactions and different levels of on-disk persistence, and provides high availability via Redis Sentinel and automatic partitioning with Redis Cluster.</p>
  </blockquote>
  
  <p>Similar language shared in their descriptions lends me to think I could use Immutable.js as a "light" Redis solution or Redis as a "heavy" Immutable.js solution to track my multiplayer's game state (all active games state and players state).</p>
  
  <ul>
  <li>What are some key differences between these?</li>
  <li>When should someone select immutable.js over redis?</li>
  <li>When should someone select redis over immutable.js?</li>
  </ul>
  
  <p>At present I cannot find a comparison of these two libraries (when I search Google or Stack Overflow), which makes me believe my assumption (that they can be used in place of each other at times) is woefully inaccurate, but I can find nothing to confirm or deny that.</p>
  
  <p>I am not wondering if they can be used together (unless it is in a context of how they are different and compliment each other). I recognize Immutable.js is focused on handling structures that are Immutable, while Redis does not seem to be focused on that, but that still begs the question, can't I just stick with Immutable.js?</p>
  
  <p>Here is my hang up... both provide data structures in memory. If I don't care about persistence, why should I care which I choose?</p>
  
  <p>To be be clear the context is on a server not browser and if the server resets I don't want server state to persist (outside what is stored in mongoldb).</p>