Mapping our layered system
A layered system consists of layers with different units of functionality. It could be argued that these layers are different servers. This can be true in microservices and big systems. This can be the case when it comes to different layers of data. In big systems, it makes sense to have hot data that gets accessed and updated regularly and cold data where it is rarely accessed. However, while it is easy to think of layers as on different servers, they can be on the same server. We can map our layers with the following diagram:
Figure 8.1 – The layers in our app
As you can see, our app follows this process:
- First, our HTTP Handler accepts the call by listening to the port that we defined when creating the server.
- Then, it goes through the middleware, which is defined by using the
wrap_fn
function on our app. - Once this is done, the URL of the request is mapped to the right view and the schemas we defined...