Is there a way to subscribe in gears to redisgraph specific events, like node or edge creation?
AFAIK as of now modules can’t trigger key space notification for any changes. So you can’t trigger redisgears in such case. @meirsh please correct if I am wrong.
@jrideout please elaborate your use case, we may help you something as work around.
@suyog We have raw data that looks roughly like an edge stream:
A -> B -> C
Z -> Y -> Z
Z -> B-> C
We expect a high number of redundant edges in the data.
and every time we observe a new edge want to A) run an ML algorithm that result in setting a property on that edge and B) emit to a pub/sub both the new edge (with some local structure of all nodes/edges one relation away from the nodes of the new edge) and the resulting edge properties. We have a variety of use cases for these edges ranging from customer alerts to automated workflows depending upon the context.
It seems to me one approach might be:
- post the edges stream as json-blob to redis stream
- have a gears read the stream, query to see if each edge exists
- if the edge doesn’t exist 3a) post new edge to new-edge-stream 3b) create new edge
I was hoping for something like:
- post the edges stream as json-blob to redis stream
- have gears MERGE the edge
- have a gear monitor for new edge creation
- in the edge-listener post new edge to new-edge-stream
We probably could do something else too, like store each edge in a SET and monitor for new values, outside of graph.