BT

Immutability Changes Everything Including Microservices

| by Han Xu Follow 0 Followers on Feb 05, 2015. Estimated reading time: 1 minute |

Pat Helland, now software architect of Salesforce, reviewed the benefits of immutability in his CIDR 2015 paper. In Pat's opinion, computation and storage are cheap today, therefore keeping immutable copies of lots of data becomes affordable, and by doing this, the coordination challenges can be reduced.

Pat compared the properties of Inside Data and Outside Data (see Table below) and pointed out some of the technical implications of embracing immutability (Note that Pat defines DataSet as a fixed and immutable set of tables):

  • DataSets are semantically immutable but may be physically changed.
  • By watching and monitoring the read usage of a DataSet, you may realize new optimizations (e.g. new indices) are possible.
  • Immutability is the backbone of Big Data. (Because) functional computation using immutable inputs is idempotent, it is OK to fail and restart.
  • Normalization is very important in a database designed for update, (but) is not necessary in an immutable DataSet.
  • With Log Structured File Systems, high available of immutable blocks is available now.

Inside Data vs. Outside Data
Table: Inside Data vs. Outside Data (source: Pat Helland's CIDR 2015 paper)

Meanwhile, a recent post on Red Hat developer blog by Jay Vyas demonstrated how to create immutable microservices using Apache Spark and Cassandra. Jay also described the benefits of building immutable microservices:

Immutable services can, by definition, be deployed without any heavy weight installers or configuration management, (and) this paves the way for a new paradigm in load balancing, high availability, and dynamic resource sharing. (.…) They are testable in any environment, because they have a minimal dependency on the orchestration layer which launches them.

The architectural benefits of immutability have been observed in Facebook, Lambda Architecture and Datomic, to name just a few. Are you ready for this trend?

 

Rate this Article

Adoption Stage
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread
Community comments

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Discuss
BT