我想了解siddhi中的“dos”和“dont dos”。我看到了 DB 连接器以及使用来自 DB 的数据丰富流事件的可能性(比如说 cassandra 连接器)。
示例:
@primaryKey('id')
@store(type = 'rdbms', datasource = 'WSO2_TEST_DB')
define table BuyerInfoTable (id string, name string, address string, email string);
@info(name = 'EnrichBuyerInformation')
from ShipmentInfoStream as s join BuyerInfoTable as b
on s.buyerId == b.id
select s.orderId, b.name, b.address, b.email, s.shipmentType
insert into ShipmentAndBuyerInfoStream;
我是否理解正确,这种方法意味着在ShipmentInfoStream上的每个传入事件上都会对数据库进行选择查询上的每个传入事件对数据库进行选择查询?如果是的话 - 这对我来说听起来像是“不要做” - 特别是如果我们谈论的是 100k 事件/秒。
还是我以错误的方式理解架构?