eiffel-community / eiffel-intelligence

Eiffel Intelligence is a real time data aggregation and analysis solution for Eiffel events.
Apache License 2.0
11 stars 72 forks source link

use graphql to replace the need to EI aggregation? #521

Open jgse opened 2 years ago

jgse commented 2 years ago

Description

I am thinking if graphql can be used to replace the need of EI's aggregation service using jmespath rules I read a bit of both, it seems for me a EI subscription can be replaced by a graphql query and its subscription functionality. graphql naturally support to aggregate the data according to client's request. client only need to describe the query in graphql and let the backend to handle the query to push the data to client when data available

of course, I do not have full view of all the use cases that EI provide, would like to hear the thoughts of the community

Motivation

utilize graphql ecosystem, lightweight tech stack, easier to extend functionality in backend without impacting frontend

Exemplification

not clear

Benefits

flexible, extensible, fast iteration

Possible Drawbacks

not clear

m-linner-ericsson commented 2 years ago

This sounds very interesting. Do you have any good example of a graphql query or do you need the communities help with that?

jgse commented 2 years ago

EI use rules for aggregation https://github.com/eiffel-community/eiffel-intelligence/blob/master/wiki/rules.md it mixed with mongodb specific syntax and JMESPath

If the aggregation can be replaced by graphql, the service will be become open and possible to open up possibility to more development

m-linner-ericsson commented 2 years ago

Do you have a idea or an example of how such a query would look like? For example an example how one of the current rules would look in graphql.

jgse commented 2 years ago

sorry, I do not have enough knowledge yet in EI and graphql to provide such example, I bring this up hoping if anyone in the community may comment the feasibility of this idea