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

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 Elasticsearch. Elasticsearch is a good choice for a materialized view when the data must be searched and filtered. Note that the asOf timestamp is included in the record so that the user can access the latency of the data.

主站蜘蛛池模板: 沙坪坝区| 宁津县| 平塘县| 泸西县| 抚松县| 香格里拉县| 皋兰县| 呼伦贝尔市| 屏山县| 新巴尔虎右旗| 呼图壁县| 开化县| 沁阳市| 水城县| 西和县| 扎兰屯市| 内丘县| 沁水县| 南皮县| 阿拉善左旗| 崇礼县| 榆树市| 三门峡市| 连州市| 临朐县| 桂阳县| 信丰县| 清苑县| 陇西县| 武胜县| 蚌埠市| 尚志市| 萨迦县| 滨州市| 遵化市| 贵港市| 广昌县| 通山县| 长兴县| 高阳县| 诸暨市|