Immutable data structures are being adopted on the frontend with frameworks like redux. Can this same concept be applied to the server? An express like framework that works with immutable state?
Well it is trite to say it but Haskell has many examples of servers and idiomatic haskell will almost always use immutable data. Examples are web frameworks like Yesod and web servers like Warp.<p>I'm working on a toy stock exchange app to learn haskell and of course it will be mostly immutable. It will use some shared global state. This will have mutable reference using mvars or transactional memory but the "objects" themselves will be immutable.<p>Communicating between threads makes total immutability hard (maybe impossible?) unless you have a very clever threading model.
Sure they can. You can use server side languages like Clojure, Erlang, Elixir, F# and a few others I'm sure I'm missing.<p>There also exist libraries for some languages that introduce immutable data structures, like pysistance for Python.
You can check out Datomic[0], a database built on immutability, championed by Rick Hickey of Clojure.<p>[0]: <a href="http://www.datomic.com/" rel="nofollow">http://www.datomic.com/</a>
See the event sourcing pattern for an example of immutability at the backend.<p><a href="http://martinfowler.com/eaaDev/EventSourcing.html" rel="nofollow">http://martinfowler.com/eaaDev/EventSourcing.html</a><p><a href="https://msdn.microsoft.com/en-us/library/dn589792.aspx" rel="nofollow">https://msdn.microsoft.com/en-us/library/dn589792.aspx</a>
Did you just learn about the concept of Immutable? It's a very simple concept, it seems to be the buzzword lately, especially with JavaScript libraries.