chapter eleven

11 The simplicity of Data-Oriented web services (A faithful messenger)

 

11.1 Introduction

The architecture of modern information systems is made of software components written in various programming languages that communicate over the wire by sending and receiving data represented in a language independent data exchange format, for instance JSON.

Data-Oriented programming applies the same principle to the communication between inner parts of a program. Inside a program, components communicate by sending and receiving data represented in a component independent format, namely immutable data collections.

In the context of a web service that fulfills a client request by fetching data from a database and other web services, representing data as with immutable data collections leads to the following benefits:

  • Leverage generic data manipulation functions to manipulate data from multiple data sources
  • Freedom to pass data forward with no additional complexity

This chapter covers:

  • Representing a client request as a map
  • Representing a sever response as a map
  • Passing data forward
  • Combining data from different sources

11.2 Another feature request

After having delivered the database milestone on time, Theo gives a phone call to Nancy to share with her the good news. Instead of celebrating Theo’s success, Nancy asks him about the ETA for the next milestone: Book Information Enrichment with OpenLibraryBook. Theo tells her that he’ll get back to her with an ETA by the end of the day.

11.3 Build the insides like the outsides

11.4 Represent a client request as a map

11.5 Represent a server response as a map

11.6 The freedom to pass information forward

11.7 Search result enrichment in action

11.8 Delivering on time

11.9 Wrapping up