We've often needed the ability to push custom logic down into the connector (e.g.,
MODE-1134). Such functions would allow custom logic to be performed within the connector, allowing this logic to read content, make decisions based upon the existing content, and use those decisions to change what is written.
I propose adding a new Request subclass that defines an abstract method to be invoked within the context of the connector's transaction. Like all other Request classes, this would need to be serializable (and therefore rules out anonymous inner classes using external final variables); one option is to simply create a map of input parameters and a map for output values. Additionally, more thought needs to be put into how such function requests work in the federated connector; perhaps they are limited to being pushed down to a single connector (thus the logic could not take into account any children federated from multiple sources).