BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Immutability Changes Everything Including Microservices

Immutability Changes Everything Including Microservices

Bookmarks

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
Style

BT