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

How it works...

In this recipe, we implement a listener function that consumes upstream events and populates a materialized view that is used by a Backend For Frontend 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 S3. S3 is a good choice for a materialized view when the data changes infrequently, and it can be cached in the CDN. Note that the asOf timestamp is included in the record so that the user can access the latency of the data.

主站蜘蛛池模板: 内丘县| 兴义市| 桃园市| 临澧县| 铜川市| 天水市| 饶平县| 富阳市| 桦川县| 习水县| 六盘水市| 嘉峪关市| 渝北区| 襄樊市| 济南市| 皋兰县| 阜新| 百色市| 蒙阴县| 兰溪市| 淮滨县| 襄垣县| 天长市| 金乡县| 会昌县| 宝坻区| 瑞金市| 沁阳市| 元谋县| 宁河县| 金门县| 乌兰察布市| 华宁县| 出国| 五大连池市| 章丘市| 龙泉市| 茶陵县| 邮箱| 鹤山市| 东兴市|