Hi all,

Event table allows Siddhi to work with stored events, and this can be
viewed as a stored version of Event Stream or a table of events. The
current implementation of Siddhi Event Tables will occupy in-memory storage
to store events. Apart from that, it only provides an extension to work
with data/events stored in RDBMS data stores.

When it comes to distributed/clustered processing of a Siddhi query, Siddhi
should be able to share the in-memory storage within the
distributed/clustered environment. However, with the current implementation
of In-memory Event Tables, it is impossible to share the in-memory storage
since it is isolated to the instance’s JVM. Therefore, it introduces a
limitation of Siddhi query can only be run under single parallelism when it
involves an In-memory Event Table.

To overcome that limitation, the solution is to use a distributed,
in-memory data grid that supports data availability within
distributed/clustered environments and provides high availability. Since
Hazelcast provides most of those required features and functionalities, it
was decided to implement a new In-memory event table extension that is
based on Hazelcast distributed, in-memory data grid.

The new implementation will provide the following APIs:

*Define new Hazelcast Event Table*
@from(eventtable = 'hazelcast')
define table TestEventTable(symbol string, price int, volume float);

*Define new Event Table in a new Hazelcast Cluster *
@from(eventtable = 'hazelcast', cluster.name = 'cName', cluster.password =
'cPass')
define table EventTable(symbol string, price int, volume float);

*Define new Event Table in an existing Hazelcast Instance (SiddhiQL)*
@from(eventtable = 'hazelcast', cluster.name = 'cName', cluster.password =
'cPass', cluster.addresses, 192.168.1.1:5700,192.168.1.2.5700)
define table EventTable(symbol string, price int, volume float);

*Define new Event Table in an existing Hazelcast Instance (Java API)*
TableDefinition tableDefinition = TableDefinition.id("StockTable")
.annotation(Annotation.annotation("from")
.element("eventtable", "hazelcast")
.element("cluster.name", clusterName)
.element("cluster.password", clusterPassword)
.element("cluster.addresses", addresses))
.attribute("symbol", Attribute.Type.STRING)
.attribute("price", Attribute.Type.INT);

Apart from that, all the other basic functionalities of in-memory event
tables (Join, Update, Delete) will remain the same as Siddhi In-memory
Event Table API[1].

Any suggestion on improvements and alternatives are appreciated.

[1]
https://docs.wso2.com/display/CEP400/SiddhiQL+Guide+3.0#SiddhiQLGuide3.0-EventTable

Regards,
Grainier.

-- 
Grainier Perera
Software Engineer
Mobile : +94716122384
WSO2 Inc. | http://wso2.com
lean.enterprise.middleware
_______________________________________________
Architecture mailing list
Architecture@wso2.org
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to