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

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.

主站蜘蛛池模板: 辽阳县| 耿马| 泗水县| 襄樊市| 盖州市| 泰宁县| 双江| 江华| 开平市| 宜兰市| 龙州县| 化州市| 临海市| 秦安县| 澄迈县| 浙江省| 淮安市| 邵武市| 大庆市| 神农架林区| 绍兴县| 梅州市| 张家港市| 普兰店市| 崇仁县| 平度市| 汤原县| 邓州市| 沛县| 前郭尔| 大方县| 息烽县| 修水县| 长汀县| 通化市| 北安市| 应城市| 庆城县| 水富县| 盐边县| 海门市|