JSON-Based Serialized LOB Pattern

Serialized LOB (Large Object) pattern is explained in the Patterns of Enterprise Application Architecture book by Martin Fowler. The original paper describes an implementation of the pattern with an example of XML-based serialization. Although nowadays, JSON format is ubiquitous. So, adding a fresh flavor of “JSONization” to the pattern seems fully justifiable.

There was mentioned that a binary serialization might win in size and performance, though the main problem with BLOBs (Binary Large Objects) remains the versioning. The changes in classes’ structure may lead to data incompatibility, so it can be problematic to de-serialize your objects from the database. Also, it is hardly achievable to query data inside BLOB. On the other hand, CLOB (Character Large Object) type is human readable, which at least allows for investigating issues. In addition, modern RDBM systems provide instruments to manipulate JSON, like querying and modifying data inside JSON.

CategoriesUncategorized