官术网_书友最值得收藏!

How it works...

In this recipe, we implemented a listener function that consumes upstream events and populates a materialized view that is used by a Backend For Frontend (BFF) service. This function is a stream processor, such as the one we discussed in the Creating a stream processor recipe in Chapter 1, Getting Started with Cloud-Native. The function performs a filter for the desired events and then transforms the data in a map step to the desired materialized view. The materialized view is optimized to support the requirements of the query needed by the BFF. Only the minimum necessary data is stored and the optimal database type is used. In this recipe, the database type is DynamoDB. DynamoDB is a good choice for a materialized view when the data changes frequently.

Note that the asOf timestamp is included in the record. In an eventually consistent system, it is important to provide the user with the asOf value so that he or she can access the latency of the data. Finally, the data is stored in the highly available, fully managed, cloud-native database.

主站蜘蛛池模板: 临高县| 容城县| 西乌珠穆沁旗| 湖南省| 遂溪县| 呈贡县| 汶川县| 临潭县| 龙山县| 扬州市| 白银市| 永胜县| 越西县| 桃江县| 松原市| 青铜峡市| 会昌县| 泊头市| 公安县| 霍城县| 襄樊市| 金昌市| 关岭| 和田县| 正蓝旗| 太白县| 宁陵县| 吉隆县| 东山县| 海南省| 达尔| 舟曲县| 固阳县| 大田县| 进贤县| 曲靖市| 伊宁县| 布尔津县| 微博| 托克逊县| 运城市|