On Wed, Oct 3, 2018 at 4:35 PM Mark Thomas <ma...@apache.org> wrote:

> On 03/10/18 14:48, Rémy Maucherat wrote:
> > Hi,
> >
> > As I talked about during the latest TomcatCon (and the previous one in
> > London actually ...), there's a cloud aware cluster members provider that
> > can be contributed to Tomcat.
> >
> > The current code is here:
> https://github.com/rmaucher/tomcat-in-the-cloud
> > It uses Kubernetes to retrieve the members of a cluster, rather than
> > multicast (which isn't available) or static (which is well ... static)
> > member providers.
> >
> > Credits:
> > Maxime Beck and JGroups did the initial code
> > Keiichi Fujino explained how to refactor it to fit in the Catalina
> cluster
> > API
> > and I refactored it as he told me to
> >
> > Problems:
> > Only does Kubernetes for now (which is likely ok since it's now widely
> > available)
>
> No objections on this point. A quick look at the code indicates
> additional CloudMembershipProvider implementations should be fairly
> simple to add as required.
>

Yes, it's very small, most of the work is knowing to use your cloud
infrastructure (... :( ).


>
> > JSON parser dependency (org.json) that is likely not ok to have as is in
> > the lib folder (solutions: package renaming using a script or include
> json
> > code in Tomcat)
>
> Because we get JSON from Kubernetes? Is there any other interface we
> could use that doesn't return JSON?


Well, it's very simple, you get the pods list that way, afaik they don't
like xml at all, it's all either yml or json. I guess it's "simpler" (ahem).


> Are other providers (Docker is the
> one that comes immediately to mind) also going to require JSON?
>

Yes, that comes to mind, I don't know their orchestration yet (it's called
Docker swarm) but it looks like json responses as well.


>
> Other random thoughts:
> - Make it an optional library that we depend on at compile time but
>   don't ship? Fail start-up if it is not present when the
>   CloudMembershipProvider is configured?
> - Package the cloud membership provider stuff extras and include the
>   JSON JAR in that?
>
> It is only 64Kb (if I am looking at the correct JAR). I am a little
> concerned about conflicts with web applications shipping alternative
> versions of the JAR. We should be OK on this point as none of the
> clustering objects that touch JSON should be visible to web applications.
>

Yes, it's small, but it's probably a commonly used library. So a decision
has to be made about it.

>
> > Needs more testing
> > Tomcat 9.0.13 needed (with some fixmes related to that in the code)
> >
> > Comments ?
>
> It it is intended for inclusion in Tomcat then the sooner it is in the
> Tomcat code base the better. It doesn't have to ship with a release
> straight away if it isn't release ready.
>

Ok, no problem with that.

Rémy

Reply via email to