Chapter 4. Data

 

This chapter covers

  • Accepting that data isn’t sacrosanct and can be inaccurate
  • Building alternative storage solutions with microservice messages
  • Representing data operations as microservices messages
  • Exploring alternatives to traditional data-management strategies
  • Storing different types of data

Using a central relational database is common practice for most software projects. Almost all data is stored there, and the system accesses the data in the database directly. The data schema is represented in the programming language used to build the system.

The advantage of a central database is that almost all of your data is in one place under one schema. You have to manage and administer only one kind of database. Scaling issues can usually be solved by throwing money at the problem. You’re building on the knowledge and practice of generations of software developers.

The disadvantage of a central database is that it provides a fertile breeding ground for technical debt. Your schema and stored procedures will become complex, and you’ll use the database as a communication layer between different parts of your system. You’ll have to accept that all of your data, regardless of business value, gets the same treatment.

4.1. Data doesn’t mean what you think it means

4.2. Data strategies for microservices

4.3. Rethinking traditional data patterns

4.4. A practical decision guide for microservice data

4.5. Summary

sitemap