Re: [DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-10-17 Thread Hang Chen
+1

Great feature! I support this feature.

Thanks,
Hang

steven lu  于2022年9月19日周一 15:47写道:
>
> +1
> this idea seems really useful
>
> Diego Salvi  于2022年9月18日周日 21:02写道:
>
> > Hi BookKeepers,
> > I've added a new BP to add a public API for creating embeddable servers:
> > BP-57 
> >
> > *Motivation*
> > BK is used and run in many OS project as an embedded resource.
> > Every time a project needs to embed BK (think about Pulsar, Pravega or
> > HerdDB as some examples) boilerplate code need to be written (and then
> > mantained as per 4.15 changes).
> > Depending from the contest new feature cannot be made directly available
> > and more code need to be added.
> > To run an embedded bookie you need to instantiate many components that are
> > really in "public" api and can and will be subject to changes.
> >
> > *Proposal*
> > We already have the whole code to start a BK server instance, it just needs
> > to be refactored and exposed as a public API.
> > My idea is to refactor all the code currently at
> > org.apache.bookkeeper.server.Main#buildBookieServer and expose it with a
> > builder pattern.
> > The builder will accept an initial BookieConfiguration (and with no more
> > interaction will produce the same server currently produced from
> > org.apache.bookkeeper.server.Main#buildBookieServer) and will create from
> > the configuration any component not directly provided to the builder.
> > For example you can provide your instances for StatsProvider or
> > MetadataBookieDriver instance or your custom ByteBufAllocator without the
> > need to rewrite the same plain old code.
> > Another big improvement: new features that whould need additional code to
> > be added (just think when integrity checking has been added in BP-46) are
> > already and directly usable.
> >
> > What do you think about it?
> >
> > Diego Salvi
> >


Re: [DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-09-19 Thread steven lu
+1
this idea seems really useful

Diego Salvi  于2022年9月18日周日 21:02写道:

> Hi BookKeepers,
> I've added a new BP to add a public API for creating embeddable servers:
> BP-57 
>
> *Motivation*
> BK is used and run in many OS project as an embedded resource.
> Every time a project needs to embed BK (think about Pulsar, Pravega or
> HerdDB as some examples) boilerplate code need to be written (and then
> mantained as per 4.15 changes).
> Depending from the contest new feature cannot be made directly available
> and more code need to be added.
> To run an embedded bookie you need to instantiate many components that are
> really in "public" api and can and will be subject to changes.
>
> *Proposal*
> We already have the whole code to start a BK server instance, it just needs
> to be refactored and exposed as a public API.
> My idea is to refactor all the code currently at
> org.apache.bookkeeper.server.Main#buildBookieServer and expose it with a
> builder pattern.
> The builder will accept an initial BookieConfiguration (and with no more
> interaction will produce the same server currently produced from
> org.apache.bookkeeper.server.Main#buildBookieServer) and will create from
> the configuration any component not directly provided to the builder.
> For example you can provide your instances for StatsProvider or
> MetadataBookieDriver instance or your custom ByteBufAllocator without the
> need to rewrite the same plain old code.
> Another big improvement: new features that whould need additional code to
> be added (just think when integrity checking has been added in BP-46) are
> already and directly usable.
>
> What do you think about it?
>
> Diego Salvi
>


Re: [DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-09-19 Thread Nicolò Boschi
Good idea, +1

Nicolò Boschi


Il giorno lun 19 set 2022 alle ore 07:36 Yong Zhang <
zhangyong1025...@gmail.com> ha scritto:

> +1
>
> Sounds great
>
> Yong
>
> On Sun, 18 Sept 2022 at 21:20, Enrico Olivelli 
> wrote:
>
> > +1
> > Really helpful!
> >
> > Enrico
> >
> > Il Dom 18 Set 2022, 15:02 Diego Salvi  ha
> > scritto:
> >
> > > Hi BookKeepers,
> > > I've added a new BP to add a public API for creating embeddable
> servers:
> > > BP-57 
> > >
> > > *Motivation*
> > > BK is used and run in many OS project as an embedded resource.
> > > Every time a project needs to embed BK (think about Pulsar, Pravega or
> > > HerdDB as some examples) boilerplate code need to be written (and then
> > > mantained as per 4.15 changes).
> > > Depending from the contest new feature cannot be made directly
> available
> > > and more code need to be added.
> > > To run an embedded bookie you need to instantiate many components that
> > are
> > > really in "public" api and can and will be subject to changes.
> > >
> > > *Proposal*
> > > We already have the whole code to start a BK server instance, it just
> > needs
> > > to be refactored and exposed as a public API.
> > > My idea is to refactor all the code currently at
> > > org.apache.bookkeeper.server.Main#buildBookieServer and expose it with
> a
> > > builder pattern.
> > > The builder will accept an initial BookieConfiguration (and with no
> more
> > > interaction will produce the same server currently produced from
> > > org.apache.bookkeeper.server.Main#buildBookieServer) and will create
> from
> > > the configuration any component not directly provided to the builder.
> > > For example you can provide your instances for StatsProvider or
> > > MetadataBookieDriver instance or your custom ByteBufAllocator without
> the
> > > need to rewrite the same plain old code.
> > > Another big improvement: new features that whould need additional code
> to
> > > be added (just think when integrity checking has been added in BP-46)
> are
> > > already and directly usable.
> > >
> > > What do you think about it?
> > >
> > > Diego Salvi
> > >
> >
>


Re: [DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-09-18 Thread Yong Zhang
+1

Sounds great

Yong

On Sun, 18 Sept 2022 at 21:20, Enrico Olivelli  wrote:

> +1
> Really helpful!
>
> Enrico
>
> Il Dom 18 Set 2022, 15:02 Diego Salvi  ha
> scritto:
>
> > Hi BookKeepers,
> > I've added a new BP to add a public API for creating embeddable servers:
> > BP-57 
> >
> > *Motivation*
> > BK is used and run in many OS project as an embedded resource.
> > Every time a project needs to embed BK (think about Pulsar, Pravega or
> > HerdDB as some examples) boilerplate code need to be written (and then
> > mantained as per 4.15 changes).
> > Depending from the contest new feature cannot be made directly available
> > and more code need to be added.
> > To run an embedded bookie you need to instantiate many components that
> are
> > really in "public" api and can and will be subject to changes.
> >
> > *Proposal*
> > We already have the whole code to start a BK server instance, it just
> needs
> > to be refactored and exposed as a public API.
> > My idea is to refactor all the code currently at
> > org.apache.bookkeeper.server.Main#buildBookieServer and expose it with a
> > builder pattern.
> > The builder will accept an initial BookieConfiguration (and with no more
> > interaction will produce the same server currently produced from
> > org.apache.bookkeeper.server.Main#buildBookieServer) and will create from
> > the configuration any component not directly provided to the builder.
> > For example you can provide your instances for StatsProvider or
> > MetadataBookieDriver instance or your custom ByteBufAllocator without the
> > need to rewrite the same plain old code.
> > Another big improvement: new features that whould need additional code to
> > be added (just think when integrity checking has been added in BP-46) are
> > already and directly usable.
> >
> > What do you think about it?
> >
> > Diego Salvi
> >
>


Re: [DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-09-18 Thread Enrico Olivelli
+1
Really helpful!

Enrico

Il Dom 18 Set 2022, 15:02 Diego Salvi  ha
scritto:

> Hi BookKeepers,
> I've added a new BP to add a public API for creating embeddable servers:
> BP-57 
>
> *Motivation*
> BK is used and run in many OS project as an embedded resource.
> Every time a project needs to embed BK (think about Pulsar, Pravega or
> HerdDB as some examples) boilerplate code need to be written (and then
> mantained as per 4.15 changes).
> Depending from the contest new feature cannot be made directly available
> and more code need to be added.
> To run an embedded bookie you need to instantiate many components that are
> really in "public" api and can and will be subject to changes.
>
> *Proposal*
> We already have the whole code to start a BK server instance, it just needs
> to be refactored and exposed as a public API.
> My idea is to refactor all the code currently at
> org.apache.bookkeeper.server.Main#buildBookieServer and expose it with a
> builder pattern.
> The builder will accept an initial BookieConfiguration (and with no more
> interaction will produce the same server currently produced from
> org.apache.bookkeeper.server.Main#buildBookieServer) and will create from
> the configuration any component not directly provided to the builder.
> For example you can provide your instances for StatsProvider or
> MetadataBookieDriver instance or your custom ByteBufAllocator without the
> need to rewrite the same plain old code.
> Another big improvement: new features that whould need additional code to
> be added (just think when integrity checking has been added in BP-46) are
> already and directly usable.
>
> What do you think about it?
>
> Diego Salvi
>


[DISCUSS] BP-57 Add a public API for creating embeddable servers

2022-09-18 Thread Diego Salvi
Hi BookKeepers,
I've added a new BP to add a public API for creating embeddable servers:
BP-57 

*Motivation*
BK is used and run in many OS project as an embedded resource.
Every time a project needs to embed BK (think about Pulsar, Pravega or
HerdDB as some examples) boilerplate code need to be written (and then
mantained as per 4.15 changes).
Depending from the contest new feature cannot be made directly available
and more code need to be added.
To run an embedded bookie you need to instantiate many components that are
really in "public" api and can and will be subject to changes.

*Proposal*
We already have the whole code to start a BK server instance, it just needs
to be refactored and exposed as a public API.
My idea is to refactor all the code currently at
org.apache.bookkeeper.server.Main#buildBookieServer and expose it with a
builder pattern.
The builder will accept an initial BookieConfiguration (and with no more
interaction will produce the same server currently produced from
org.apache.bookkeeper.server.Main#buildBookieServer) and will create from
the configuration any component not directly provided to the builder.
For example you can provide your instances for StatsProvider or
MetadataBookieDriver instance or your custom ByteBufAllocator without the
need to rewrite the same plain old code.
Another big improvement: new features that whould need additional code to
be added (just think when integrity checking has been added in BP-46) are
already and directly usable.

What do you think about it?

Diego Salvi