You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by Keaton Cleve <ke...@gmail.com> on 2016/02/17 18:58:34 UTC

Nifi 'as a service'?

Hi,

Would it be possible to use Nifi 'as a service'? If yes what would be the best pattern?

Here is what I have in mind:

I would like to setup a template with different possible predetermined destinations. But instead of having predefined sources that I would query with a cron like GetFile or GetHDFS, I would like to have a REST API as an entry point and users can request to copy a file from any directory into one or several of the predetermined destination (this would involve some routing to the correct processor I guess). The REST API would only support to specify sources which the templates allows, but the specific directory / file would be dynamic.

Does that make any sense?

Re: Nifi 'as a service'?

Posted by Bryan Bende <bb...@gmail.com>.
Keaton,

You can definitely build a REST service in NiFi! I would take a look at
HandleHttpRequest and HandleHttpResponse.

HandleHttpRequest would be the entry point of your service, the FlowFiles
coming out of this processor would represent the request being made, you
can then perform whatever logic you need and send a response back with
HandleHttpResponse.

Let us know if that doesn't make sense.

Thanks,

Bryan

[1]
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.HandleHttpRequest/index.html
[2]
https://nifi.apache.org/docs/nifi-docs/components/org.apache.nifi.processors.standard.HandleHttpResponse/index.html

On Wed, Feb 17, 2016 at 12:58 PM, Keaton Cleve <ke...@gmail.com>
wrote:

> Hi,
>
> Would it be possible to use Nifi 'as a service'? If yes what would be the
> best pattern?
>
> Here is what I have in mind:
>
> I would like to setup a template with different possible predetermined
> destinations. But instead of having predefined sources that I would query
> with a cron like GetFile or GetHDFS, I would like to have a REST API as an
> entry point and users can request to copy a file from any directory into
> one or several of the predetermined destination (this would involve some
> routing to the correct processor I guess). The REST API would only support
> to specify sources which the templates allows, but the specific directory /
> file would be dynamic.
>
> Does that make any sense?