Before my current requirement to have distributed/multi-nodes, I only have 1 node and CQEngine performed super fast. However to make it even faster, my ex-colleague enhanced CQEngine implementation by creating partitioned CQEngine where by each data is distributed into multiple IndexedCollection based on various (defined) attributes (perhaps 2 or 3 highly queried attributes) and perform deduplication on the resultsets. That implementation could speedup the query up to 2-3x on very large amount of data.
However that implementation is not horizontally scalable because the underlying data is stored in multiple collections hence multiple indexes are created and requires higher memory footprint.
What I currently need is to support query data of up to few terabytes. If I fallback to disk, I'd rather fallback to DB than to raw file. But that means if the node is down, it is going to be single point of failure. The visible solution is to make CQEngine query on distributed data.
I'm also using Vertx.io though for different purpose. Vertx.io itself achieve its seamless communication between nodes by relying on Hazelcast's distributed multimap.
Coming back to your CQEngine shard using Vertx.io, are you firing the same query to all nodes using publish method in Vertx's eventbus and let the node that has the corresponding to respond? If that's the case, as you said, it doesn't achieve any high availability and distributed CQEngine at all.
However if you use different implementation, please share it.
--
-- You received this message because you are subscribed to the "cqengine-discuss" group.
http://groups.google.com/group/cqengine-discuss
---
You received this message because you are subscribed to the Google Groups "cqengine-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cqengine-discu...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You mentioned "For fault tolerance, let's say you have 6 nodes to work with. If you divide your dataset into 3 shards and install each third of the data on two nodes, you could have a fault-tolerant pair of nodes behind a load balancer for each shard. This would allow you to triple the amount of data you can load into CQEngine while retaining query speed and it would remain fault tolerant."
That's exactly what I'm currently doing.
The problem that I'm currently having is:
1. I don't know if my implementation is correct the from CQEngine point of view
2. I don't know how to pause the query being performed if during that query period a node is down and rebalancing of data is happening.
--
-- You received this message because you are subscribed to the "cqengine-discuss" group.
http://groups.google.com/group/cqengine-discuss
---
You received this message because you are subscribed to a topic in the Google Groups "cqengine-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cqengine-discuss/yPH9buz9eUE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cqengine-discu...@googlegroups.com.
--
The problem is that each node does not have a complete set of data, though from CQEngine perspective it assume so. So even if the query is performed at CQEngine node 1, the underlying data in java.util.Set may reside in node 3, 4, 5 (only distribution library knows, in this case is Hazelcast). So I want to interrupt the query that is being performed if I receive event that a node is down and rebalancing is happening because it may happen that the master data being queried resides in the failing node and by interrupting the query, I can requery after rebalancing is done and the data from backup node will be queried.
Doesnt hazelcast have a status api that you check?
Niall,
The problem is that each node does not have a complete set of data, though from CQEngine perspective it assume so. So even if the query is performed at CQEngine node 1, the underlying data in java.util.Set may reside in node 3, 4, 5 (only distribution library knows, in this case is Hazelcast). So I want to interrupt the query that is being performed if I receive event that a node is down and rebalancing is happening because it may happen that the master data being queried resides in the failing node and by interrupting the query, I can requery after rebalancing is done and the data from backup node will be queried.
--
-- You received this message because you are subscribed to the "cqengine-discuss" group.
http://groups.google.com/group/cqengine-discuss
---
You received this message because you are subscribed to a topic in the Google Groups "cqengine-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cqengine-discuss/yPH9buz9eUE/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cqengine-discu...@googlegroups.com.