Hello,
I am trying to optimize one of my CEL flows, one system takes in the CEL program and passes it to another system as a string. I was wondering if the system that builds the CEL script can parse and check the AST and then transfer the AST over the wire to the other service rather than have the other service parse and check again.
Example:
In system 1 user enters the CEL script, we then parse and check the script to ensure that it is correct and store it.
Then a request comes to system 1, it takes the CEL script and passes it over to system 2.
System 2 then compiles the CEL script (which is a string) to an AST and then builds a program from the AST and then evaluates the expression. This can happen multiple times because with each request system 1 sends the CEL script along with some other data to system 2.
Can we optimize by having to compile and check only once and system 1, and let system 2 only run the program?
Thank you