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

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.

主站蜘蛛池模板: 琼中| 柯坪县| 明光市| 平陆县| 儋州市| 枣强县| 巴青县| 衡南县| 宁国市| 尤溪县| 涟水县| 依兰县| 军事| 铜梁县| 黄大仙区| 克拉玛依市| 佛教| 兴仁县| 平邑县| 农安县| 永仁县| 大同县| 梨树县| 屏南县| 康平县| 湖北省| 宁晋县| 汝南县| 阳西县| 磐石市| 建德市| 钟山县| 临猗县| 阜城县| 凌源市| 金华市| 太白县| 桦川县| 太原市| 沁阳市| 竹溪县|