diegosalvi opened a new issue, #3494: URL: https://github.com/apache/bookkeeper/issues/3494
This is the master ticket for tracking 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 or Pravega for 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. Using BK in many project I had to write each time boilerplate code to create a BK embedded instance. With changes published in 4.15 I had to change such code in each project to handle the new interfaces. Proposal PR - [#3489] -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
