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. Best, Yiming On Mon, Jul 17, 2017 at 12:52 PM, Dustin Castor <dustincas...@yahoo.com> 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 < > jujj...@gmail.com> wrote: > > > + Dustin > > On Mon, Jul 17, 2017 at 12:30 PM, Sijie Guo <guosi...@gmail.com> 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 <eolive...@gmail.com> > > 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 >