You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pulsar.apache.org by Neng Lu <nl...@apache.org> on 2022/01/20 19:20:04 UTC
[DISCUSS] PIP-86: Pulsar Functions: Preload and release external resources
Hi All,
Just want to bring this PIP[1] to your attention. The PRs [2] have been
open for quite some time. The feature is valuable for many use cases and I
would like to help the original author to push the effort on it.
The general idea is introducing a new API for Pulsar Functions which allows
develop to customize some setup and close logic. The API should look like
this:
```
public interface RichFunction extends Function{
/**
* Called when function instance start
*
* @throws Exception
*/
void setup(Context context) throws Exception;
/**
* Called when function instance close
*
* @throws Exception
*/
void tearDown() throws Exception;
}
```
Please join the discussion if you have any questions or concerns for this
new API.
[1] PIP-86
<https://github.com/apache/pulsar/wiki/PIP-86%3A-Pulsar-Functions%3A-Preload-and-release-external-resources>
[2] PR-11112 <https://github.com/apache/pulsar/pull/11112> PR-13205
<https://github.com/apache/pulsar/pull/13205>
Best regards,
Neng
Re: [DISCUSS] PIP-86: Pulsar Functions: Preload and release external resources
Posted by Neng Lu <fr...@gmail.com>.
Hi Everyone,
I would like to call for a vote of the PIP-86 in a separate email.
Let me know if we've already done that.
On Thu, Jan 20, 2022 at 12:07 PM Enrico Olivelli <eo...@gmail.com>
wrote:
> Neng,
>
> Il Gio 20 Gen 2022, 20:20 Neng Lu <nl...@apache.org> ha scritto:
>
> > Hi All,
> >
> > Just want to bring this PIP[1] to your attention. The PRs [2] have been
> > open for quite some time. The feature is valuable for many use cases and
> I
> > would like to help the original author to push the effort on it.
> >
> > The general idea is introducing a new API for Pulsar Functions which
> allows
> > develop to customize some setup and close logic.
>
>
> I am +1 on your proposal.
> I left some feedback on the second PR. Basically we need some unit tests
> and integration tests.
> The first PR looks obsolete, please close it.
>
> Enrico
>
> The API should look like
> > this:
> >
> > ```
> > public interface RichFunction extends Function{
> >
> > /**
> > * Called when function instance start
> > *
> > * @throws Exception
> > */
> > void setup(Context context) throws Exception;
> >
> > /**
> > * Called when function instance close
> > *
> > * @throws Exception
> > */
> > void tearDown() throws Exception;
> > }
> > ```
> >
> > Please join the discussion if you have any questions or concerns for this
> > new API.
> >
> > [1] PIP-86
> > <
> >
> https://github.com/apache/pulsar/wiki/PIP-86%3A-Pulsar-Functions%3A-Preload-and-release-external-resources
> > >
> > [2] PR-11112 <https://github.com/apache/pulsar/pull/11112> PR-13205
> > <https://github.com/apache/pulsar/pull/13205>
> >
> > Best regards,
> > Neng
> >
>
--
Best Regards,
Neng
Re: [DISCUSS] PIP-86: Pulsar Functions: Preload and release external resources
Posted by Enrico Olivelli <eo...@gmail.com>.
Neng,
Il Gio 20 Gen 2022, 20:20 Neng Lu <nl...@apache.org> ha scritto:
> Hi All,
>
> Just want to bring this PIP[1] to your attention. The PRs [2] have been
> open for quite some time. The feature is valuable for many use cases and I
> would like to help the original author to push the effort on it.
>
> The general idea is introducing a new API for Pulsar Functions which allows
> develop to customize some setup and close logic.
I am +1 on your proposal.
I left some feedback on the second PR. Basically we need some unit tests
and integration tests.
The first PR looks obsolete, please close it.
Enrico
The API should look like
> this:
>
> ```
> public interface RichFunction extends Function{
>
> /**
> * Called when function instance start
> *
> * @throws Exception
> */
> void setup(Context context) throws Exception;
>
> /**
> * Called when function instance close
> *
> * @throws Exception
> */
> void tearDown() throws Exception;
> }
> ```
>
> Please join the discussion if you have any questions or concerns for this
> new API.
>
> [1] PIP-86
> <
> https://github.com/apache/pulsar/wiki/PIP-86%3A-Pulsar-Functions%3A-Preload-and-release-external-resources
> >
> [2] PR-11112 <https://github.com/apache/pulsar/pull/11112> PR-13205
> <https://github.com/apache/pulsar/pull/13205>
>
> Best regards,
> Neng
>