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

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.

主站蜘蛛池模板: 崇文区| 西安市| 界首市| 长兴县| 河北省| 通海县| 仪陇县| 宁都县| 泽库县| 偃师市| 新平| 池州市| 望谟县| 南部县| 宣汉县| 苗栗县| 垫江县| 邓州市| 三都| 清镇市| 林甸县| 特克斯县| 定陶县| 新绛县| 老河口市| 大荔县| 天津市| 江山市| 北流市| 合阳县| 三门县| 石屏县| 永和县| 公安县| 兰考县| 贵溪市| 义马市| 繁昌县| 沁阳市| 咸宁市| 舟山市|