David Handermann created NIFI-13665:
---------------------------------------

             Summary: Refactor Bootstrap Process Implementation
                 Key: NIFI-13665
                 URL: https://issues.apache.org/jira/browse/NIFI-13665
             Project: Apache NiFi
          Issue Type: Improvement
          Components: Core Framework
            Reporter: David Handermann
            Assignee: David Handermann


The current NiFi startup process includes the {{nifi-bootstrap}} module and the 
{{nifi-runtime}} module, together with the {{nifi-resources}} module, which 
provides the shell scripts for interacting with bootstrap commands.

The existing architecture has remained relatively unchanged since the initial 
implementation, consisting of a long-running Java process to start and monitor 
the application process. Process communication takes place using a custom TCP 
socket protocol, which each process listening for connections and commands on a 
local address.

Java 9 and following expanded platform capabilities to support greater control 
over operating system processes through the 
[ProcessHandle|https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/ProcessHandle.html]
 interface and related components. The ProcessHandle interface supports 
features such as enumerating processes and reading command arguments. Java 11 
introduced an 
[HttpClient|https://docs.oracle.com/en/java/javase/11/docs/api/java.net.http/java/net/http/HttpClient.html],
 providing a number of improvements over the historical 
{{{}HttpURLConnection{}}}.

With these language improvements, the NiFi bootstrap process should be 
refactored using improved process control and HTTP for process communication. 
This approach should eliminate the need for custom socket protocol handling 
while maintaining existing capabilities such as process health, diagnostics, 
and decommissioning cluster nodes.

The NiFi process control scripts nifi.sh and nifi.cmd should remain relatively 
unchanged, minimizing the user-facing impact. Although the NiFi bootstrap 
process should continue support existing use cases for long-running process 
monitoring, refactoring should also support the option to run the NiFi 
application without a long-running monitor. This run strategy should provide a 
better fit with containerized deployments that have first-class process 
monitoring.



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

Reply via email to