[ 
https://issues.apache.org/jira/browse/NIFI-14480?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17945079#comment-17945079
 ] 

David Handermann edited comment on NIFI-14480 at 4/16/25 1:54 PM:
------------------------------------------------------------------

Thanks for describing the general goals of a new Processor based on Drools 
[~namanarora].

>From past experience on historical components, introduced a Processor with 
>another framework can lead to too many layers of abstraction when it comes to 
>maintaining and building coherent processing flows. The issue description 
>mentions that this would be designed specifically for JSON, which could be a 
>helpful focusing function. That being said, the NiFi project already has 
>components for Jolt and JSLT, both of which provide domain specific languages 
>for processing JSON. Drools introduces another DSL, raising the question of 
>whether it provides a notably better approach for JSON processing than 
>available solutions.

Regarding the additional features, watching file paths and reloading changes 
raises questions for clustered deployments, which would require a shared 
filesystem or external synchronization strategy. For that reason, I would avoid 
a file-based dynamic loading approach.

The NiFi framework already supports retry strategies, so on first glance, an 
internal retry mechanism does not seem necessary, but perhaps there is 
something more behind the current description.

>From some background reading, it looks like Drools is currently going through 
>incubation in the Apache Kie project. Although Drools has been around for 
>years, this transition and current incubation status is another important 
>element to consider for future maintenance.

Given current incubation status under Apache Kie, and other JSON processing 
strategies, it may better to consider building this outside of Apache NiFi for 
now. That would provide the opportunity to work through some of these 
questions, providing a concrete comparison to current JSON processing 
capabilities.


was (Author: exceptionfactory):
Thanks for describing the general goals of a new Processor based on Drools 
[~namanarora].

>From past experience on historical components, introduced a Processor with 
>another framework can lead to too many layers of abstraction when it comes to 
>maintaining and building coherent processing flows. The issue description 
>mentions that this would be designed specifically for JSON, which could be a 
>helpful focusing function. That being said, the NiFi project already has 
>components for Jolt and JSLT, both of which provide domain specific languages 
>for processing JSON. Drools introduced another DSL, raising the question of 
>whether it provides a notably better approach for JSON processing than 
>available solutions.

Regarding the additional features, watching file paths and reloading changes 
raises questions for clustered deployments, which would require a shared 
filesystem or external synchronization strategy. For that reason, I would avoid 
a file-based dynamic loading approach.

The NiFi framework already supports retry strategies, so on first glance, an 
internal retry mechanism does not seem necessary, but perhaps there is 
something more behind the current description.

>From some background reading, it looks like Drools is currently going through 
>incubation in the Apache Kie project. Although Drools has been around for 
>years, this transition and current incubation status is another important 
>element to consider for future maintenance.

Given current incubation status under Apache Kie, and other JSON processing 
strategies, it may better to consider building this outside of Apache NiFi for 
now. That would provide the opportunity to work through some of these 
questions, providing a concrete comparison to current JSON processing 
capabilities.

> Add DroolsProcessor for rule-based JSON processing with dynamic/static DRL 
> support
> ----------------------------------------------------------------------------------
>
>                 Key: NIFI-14480
>                 URL: https://issues.apache.org/jira/browse/NIFI-14480
>             Project: Apache NiFi
>          Issue Type: New Feature
>          Components: Extensions
>            Reporter: Naman Arora
>            Priority: Major
>
> This processor provides integration of the Drools Rule Engine with Apache 
> NiFi. It allows for flexible rule-based processing of JSON payloads in two 
> modes:
> 1. **Static DRL Mode**:
>    - User provides an absolute path to a DRL file.
>    - That rule is used for all incoming flowfiles.
> 2. **Dynamic DRL Mode**:
>    - User specifies a base path and a key name.
>    - Processor extracts the relative DRL path from the key inside the 
> flowfile JSON payload.
>    - Dynamically fetches the rule and executes it.
> Additional Features:
> - **File Watcher** service that watches static and dynamic paths for DRL file 
> changes and reloads the KIE Container automatically.
> - **Retry Mechanism** for rule execution with configurable retry attempts.
> This processor supports advanced decisioning and rule separation, and helps 
> enable dynamic business rule application inside NiFi dataflows.
> I would like to contribute this processor under the Apache License. I have 
> signed and submitted the ICLA.
> Let me know the next steps or if any feedback is required. Thanks!



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to