简体   繁体   English

WSO2 Siddhi存储的事件/结果

[英]WSO2 Siddhi Stored events/results

According to the WSO2 web site, Siddhi can handle 2.5M requests per second, which is really nice. 根据WSO2网站,Siddhi每秒可以处理250万个请求,这非常好。

I am expecting to use the product for a event routing proxy. 我期望将产品用于事件路由代理。 Ex: Gets requests over http/ process the event/ forward the event to know destinations. 例如:通过http /获取请求/处理事件/将事件转发到已知目的地。

Ex: A customer buys a 2kg of rice. 例如:一位顾客买了2公斤大米。 POS system call an API(SOAP or REST) exposed at event processor. POS系统调用在事件处理器处公开的API(SOAP或REST)。 CEP checks whether bought weight is greater than 1kg, which is true here. CEP检查购买的重量是否大于1kg,这是正确的。 Then CEP calls an API at A and an API at B. 然后,CEP在A处调用API,在B处调用API。

I prefer to get to know below information about features of Siddhi for above process. 我更希望了解以下有关上述过程的Siddhi功能的信息。

Is there a specific implementations in siddhi for below points. siddhi中是否有针对以下几点的特定实现。

1) which allows to receive SOAP/REST/ANY OTHER, calls from external systems efficiently/faster. 1)允许有效/更快地接收来自外部系统的SOAP / REST / ANY OTHER。 Ex: In above example, getting the call from POS when rice is bought. 例如:在上面的示例中,买米时从POS接到电话。

2) persist events/results of event in specific cases and process later under conditional scenario. 2)在特定情况下保留事件/事件的结果,并在有条件的情况下稍后进行处理。 Ex: in above example, if the API A or B is down, events or stored results should be persist and should send to the API A,B once they are up. 例如:在上面的示例中,如果API A或B关闭,则事件或存储的结果应保留,并在启动后将其发送到API A,B。

Thank you. 谢谢。

  1. WSO2 Complex event processor has many different adaptors implementing various protocols such as HTTP/SOAP/JMS which can be used for this requirement. WSO2 Complex事件处理器具有许多实现各种协议(例如HTTP / SOAP / JMS)的适配器,可用于此要求。 Refer to the documentation on input event adaptors here for more details. 有关更多详细信息,请参阅此处有关输入事件适配器的文档。

  2. In Siddhi, there are 'event tables' which can be used to store/retrieve/query events. 在Siddhi中,有一些“事件表”可用于存储/检索/查询事件。 They are stored in an RDBMS like MySQL. 它们存储在像MySQL这样的RDBMS中。 Documentation on defining an event table is here . 有关定义事件表的文档在此处 Using an already defined event table in a query is given here . 这里给出了查询中使用已经定义的事件表。 Also, Sample 0109 demonstrates a simple use case of event tables. 同样, 样本0109演示了事件表的一个简单用例。

However, note that to implement the 2nd requirement, you may need to send some trigger event to CEP when an API is up, coz CEP needs to know when they are up. 但是,请注意,要实现第二个要求,您可能需要在API启动时向CEP发送一些触发事件,因为CEP CEP需要知道它们何时启动。

As a side note on performance of Siddhi, it mainly depends on the type/complexity of the queries you write and you may not be able to achieve 2.5M events/sec performance for some types of queries - in this case the queries that use databases (event tables) will have a lower performance than that due to the disk access. 作为Siddhi性能的附带说明,它主要取决于编写的查询的类型/复杂性,对于某些类型的查询,您可能无法达到2.5M事件/秒的性能-在这种情况下,使用数据库的查询(事件表)的性能将低于通过磁盘访问的性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM