2017-07-19 3:27 GMT+02:00 Yiming Zang <[email protected]>: > Hi all, > > We also have a working implementation in Twitter, we use Http Endpoint > mostly for getting quorum loss information, underreplicated ledgers, manage > bookie status etc. > > The HTTP server in Twitter is implemented in such a way that it has a > generic skeleton which can easily embed with different HTTP frameworks > (Vertx, Undertow, TwitterServer, etc), because all these frameworks have > something in common, they all have Http Handler, we only need to implement > the functions for the Handler, and then bind the Handler to a specific > endpoint in the router. We intend to keep the code simple and neat, easy to > extend, and keep the implementation flexible. There's no limitation here. > > The pull request https://github.com/apache/bookkeeper/pull/210 is > basically > the skeleton of the HTTP server in Twitter. If this is what's needed in > OSS, I'm happy to keep working on the pull request and push the changes to > master. >
I think that the main point is that we need to draft a "standard" HTTP API for the Bookie, then we can make several implementations of such API. Once we have a common API it will be really easy to create tools and integrate BK with other systems, like we are already doing with the Stats API. For me a great thing would be to have a ready to use HttpServlet, which is the "standard" in the Java Web would and can be deployed on every Java Web container. A JAX-RS resource could be good too, but it needs more support from the container. In the near future we (at Diennea) wnat to start developing a global WebUI for BookKeeper, which will show the status of the cluster, and having HTTP endpoints in Bookie will ease this work Does anyone want to start a Wiki page ? -- Enrico > Best, > > Yiming > > On Mon, Jul 17, 2017 at 12:52 PM, Dustin Castor <[email protected]> > wrote: > > > Hey all, > > > > So I did define a little endpoint that can be used for multiple things on > > our end. Basically it spins up a jetty server, attaches a handler, and > then > > maps that handler to a class. Within that class, you can add methods and > > map them using the Jersey API where you'd "decorate" methods with things > > like @PATH, @PARAM, etc. Currently we use it to return configs (all, or > one > > that you specify in the URL). Realistically, it can be used for whatever > > you want if you define a method to handle the endpoint. > > > > The only limitation that I've encountered is that the Jersey API cannot > > instantiate objects without a no arg constructor, so basically if you > want > > to have application context, it needs to be something static and passed > in > > to this class as an object. > > > > I'd be happy to consolidate or lend a hand here. If this sounds like > > something that isn't too limited (as per what I described) for general > use, > > then I'd be happy to work on introducing it generally. > > > > Thanks, > > > > Dustin > > > > > > > > On Monday, July 17, 2017, 12:45:51 PM PDT, Venkateswara Rao Jujjuri < > > [email protected]> wrote: > > > > > > + Dustin > > > > On Mon, Jul 17, 2017 at 12:30 PM, Sijie Guo <[email protected]> wrote: > > > > > + Yiming > > > > > > I would suggest the people who already started the implementations > > (either > > > from Twitter or Salesforce) taking the lead. because they either > already > > > had the implementation or are working on the implementation. I think > the > > > goal is to consolidate existing implementations to see if we can have a > > > unified effort on this. > > > > > > - Sijie > > > > > > On Mon, Jul 17, 2017 at 5:39 PM, Enrico Olivelli <[email protected]> > > > wrote: > > > > > > > Hi all, > > > > A discussion has been started about introducing an HTTP endpoint to > the > > > > bookie. > > > > There has been a proposal from Twitter and this is the patch > > > > https://github.com/apache/bookkeeper/pull/210 > > > > On Salesforce there is an ongoing implementation too. > > > > I have added that we should provide a Servlet based approach or at > > least > > > > define a public API. > > > > We should start a discussion and maybe a BP. > > > > We need a leader for the discussion > > > > > > > > Any volunteer? > > > > Enrico > > > > -- > > > > > > > > > > > > -- Enrico Olivelli > > > > > > > > > > > > > > > -- > > Jvrao > > --- > > First they ignore you, then they laugh at you, then they fight you, then > > you win. - Mahatma Gandhi > > >
