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

Mark Payne commented on NIFI-221:
---------------------------------

I would very much like to avoid the controller service. However, building this 
into a single processor creates some problems that are, in my opinion, quite 
"heavy":

1. The processor does not honor the principal of doing 1 thing and doing it 
well. Instead, it has 2 functions: receive an HTTP Request and respond to the 
HTTP Request... with other processors doing things to the data in the meantime.

2. Building the flow can become awkward. By having two Processors we can, for 
example, receive the FlowFile, and then go to Processor X, Processor Y, then 
into Process Group ABC, child Process Group XYZ, and then to a 
HandleHttpResponse. By making it a single Processor, something like this 
becomes awkward because the FlowFile must then wrap all the way back around to 
the original Processor.

3. Configuring the Processor becomes awkward, in my opinion. Having the 
property for the Response Code seems a bit odd but I could get over that. Then 
you have relationships "request", "response.successful", "response.failed" and 
you have Connections going in a lot of different directions...

I'd love to hear others' thoughts on the tradeoffs here, though, because I 
would love to avoid having to configure a Controller Service, because that's a 
bit awkward itself in this situation. It may be easier to do though in the 
0.1.0 release, after Controller Services are configurable at run-time via the 
UI...

> Build Processors that allow for receiving and responding to arbitrary HTTP 
> requests
> -----------------------------------------------------------------------------------
>
>                 Key: NIFI-221
>                 URL: https://issues.apache.org/jira/browse/NIFI-221
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Extensions
>            Reporter: Mark Payne
>            Assignee: Mark Payne
>
> The idea here is that we can receipt an HTTP request and use NiFi, in essence 
> to build a web server graphically. This opens up a wide range of 
> possibilities, by allowing a DFM to easily add a web front-end to any service 
> that NiFi can interact with or to perform any sort of action that NiFi has 
> the ability to perform, such as data format conversion, etc.
> For example, if you want to provide a web-based front-end to an SFTP Server, 
> you could do so by creating a flow like:
> ReceiveHTTPRequest -> PutSFTP -> RespondHTTPRequest



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to