<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 19, 2017 at 3:20 AM, Rostislav Svoboda <span dir="ltr"><<a href="mailto:rsvoboda@redhat.com" target="_blank">rsvoboda@redhat.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi.<br>
<br>
tl;dr: I'm not sure WF is the right place for GRPC integration<br>
<br>
1) footprint<br>
io.grpc: grpc-core grpc-protobuf grpc-stub with deps take 6.1 MB (using version 1.5.0)<br></blockquote><div><br></div><div>Not much we can do about that, but it won't be loaded unless you are using it.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
2) speed of development<br>
version 1.5.0 in July<br>
version 1.8.0 in November<br>
speed itself is not the main problem, point 3) is more concerning<br>
<br>
3) changes in minor releases<br>
I tried mvn clean package -Dgrpc.version=1.8.0 on undertow-grpc and got compilation failure with 18 errors<br></blockquote><div><br></div><div>Yea, that is somewhat annoying. I don't think it affects the wire protocol though, just the Java SPI (even though they provide an integration SPI I don't think anyone has really tried to use it before, and provide a transport outside what is already provided in the distribution).</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Every minor (looked at 1.5.0+) has one of the following mentioned in <a href="https://github.com/grpc/grpc-java/releases" rel="noreferrer" target="_blank">https://github.com/grpc/grpc-j<wbr>ava/releases</a><br>
API Changes<br>
Incompatible Changes<br>
Behavior changes<br>
Important Changes<br>
<br>
4) <a href="http://cncf.io" rel="noreferrer" target="_blank">cncf.io</a><br>
Looking at <a href="https://www.cncf.io/" rel="noreferrer" target="_blank">https://www.cncf.io/</a> my impression is that direct support in OpenShift or SWARM-627 would make sense.<br></blockquote><div><br></div><div>I think that once we have a provisioning solution there is no reason why we can't provide things like this to work in both swarm and WildFly. </div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
5) yet another integration/rpc solution<br>
We have Corba / EJB, JAX-WS, JAX-RS, JMS.<br>
Do we want / need it grpc in WF? What would be the advantage of this integration?<br></blockquote><div><br></div><div>The main advantage is that it is a binary cross platform solution that provides strong typing (JAX-RS/REST is also cross platform, but generally you don't get the same strong typing guarantees and it is more verbose on the wire).</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
I know I sound to pessimistic, feel free to turn me into grpc-optimist ;)<br></blockquote><div><br></div><div>Fair enough. I posted this to try and gauge interest to see if this is worth pursuing, we can't do everything so unless there is interest it probably won't go past the proof of concept stage.</div><div><br></div><div>Stuart</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="m_3765919743040719492m_8240561077756974834HOEnZb"><font color="#888888"><br>
Rostislav<br>
</font></span><div class="m_3765919743040719492m_8240561077756974834HOEnZb"><div class="m_3765919743040719492m_8240561077756974834h5"><br>
----- Original Message -----<br>
> On 12 December 2017 at 22:24, Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>><br>
> wrote:<br>
> > Not without writing a new protobuf compiler, the compiler does not provide<br>
> > any places to hook into the registration process, the only way I could<br>
> > manage to do it was to subclass the generated class with a proxy. Protobuf<br>
> > generates a fair bit of code for each class anyway, so I don't think the<br>
> > proxy will add much percentage wise.<br>
><br>
> The Google tooling for ProtoBuf expect you to use code generation<br>
> depending on the schema, but it's not the only toolset available.<br>
><br>
> Infinispan also uses ProtoBuf for encoding of client/server data yet<br>
> forcing people to use code generation seemed too annoying, so they use<br>
> ProtoStream:<br>
> - <a href="https://github.com/infinispan/protostream" rel="noreferrer" target="_blank">https://github.com/infinispan/<wbr>protostream</a><br>
><br>
> In turn this is based on Square's Protoparser. I have no idea if it's<br>
> more efficient, but it's possible as the alternative feels less<br>
> verbose than the codegeneration approach; it's certainly more<br>
> convenient.<br>
><br>
> Hibernate OGM has a "dialect" able to encode JPA storage operations<br>
> into Infinispan Remote calls using a combination of the above<br>
> libraries; in terms of usage people just deploy JPA annotated pojos on<br>
> WildFly and the necessary infrastructure is generated via an internal<br>
> metamodel and a chain of method references: no proxies nor code<br>
> generation.<br>
><br>
> Sanne<br>
><br>
> ><br>
> > Stuart<br>
> ><br>
> > On Wed, Dec 13, 2017 at 1:30 AM, Andrig Miller <<a href="mailto:anmiller@redhat.com" target="_blank">anmiller@redhat.com</a>> wrote:<br>
> >><br>
> >> Stuart,<br>
> >><br>
> >> Because I have memory footprint on the brain, pretty much all the<br>
> >> time now, I wonder if you can change your approach in a way that would<br>
> >> lessen MetaSpace usage. MetaSpace usage is usually the second largest<br>
> >> memory hog in Wildfly/EAP, and under certain circumstances it can be<br>
> >> larger<br>
> >> than heap, when the right JVM settings are used to control heap usage<br>
> >> (part<br>
> >> of my presentation in 30 minutes).<br>
> >><br>
> >> Andy<br>
> >><br>
> >> On Tue, Dec 12, 2017 at 3:48 AM, Darran Lofthouse<br>
> >> <<a href="mailto:darran.lofthouse@jboss.com" target="_blank">darran.lofthouse@jboss.com</a>> wrote:<br>
> >>><br>
> >>> On the security question, if we are interested in pursuing this we will<br>
> >>> get an analysis document started to look at the options we have for<br>
> >>> integration with our security implementation.<br>
> >>><br>
> >>> Regards,<br>
> >>> Darran Lofthouse.<br>
> >>><br>
> >>><br>
> >>><br>
> >>> On Mon, 11 Dec 2017 at 05:17 Stuart Douglas <<a href="mailto:stuart.w.douglas@gmail.com" target="_blank">stuart.w.douglas@gmail.com</a>><br>
> >>> wrote:<br>
> >>>><br>
> >>>> Hi everyone,<br>
> >>>><br>
> >>>> I have done up a proof of concept of GRPC support in Wildfly, which can<br>
> >>>> be found at [1]. GRPC is an RPC protocol designed by Google, that allows<br>
> >>>> for<br>
> >>>> easy cross platform invocations.<br>
> >>>><br>
> >>>> My proof of concept uses an Undertow based port of GRPC [2] and<br>
> >>>> basically works as follows:<br>
> >>>><br>
> >>>> - At deployment time Jandex is used to find all non-abstract classes<br>
> >>>> that implement io.grpc.BindableService<br>
> >>>> - I scan the class hierarchy of these classes to find the protobuf<br>
> >>>> generated base class, and create a subclass of this class using<br>
> >>>> ProxyFactory, overriding every method except bindService().<br>
> >>>> - An instance/proxy is created using the ComponentRegistry to do the<br>
> >>>> creation, and the generated proxy delegates all incoming calls to this<br>
> >>>> instance<br>
> >>>> - At runtime any incoming HTTP/2 requests with a type of<br>
> >>>> application/grpc are intercepted, and passed through this newly created<br>
> >>>> proxy.<br>
> >>>><br>
> >>>> Basically this means that all you need to do as an application developer<br>
> >>>> is define your GRPC endpoints using protobuf, implement the classes<br>
> >>>> generated by the protobuf compiler and then include them in your<br>
> >>>> application, and Wildfly will do the rest. CDI and EJB annotations on<br>
> >>>> your<br>
> >>>> GRPC services should work as normal, for example if you put @Stateless<br>
> >>>> on an<br>
> >>>> endpoint it should work as expected with a SFSB handling all<br>
> >>>> invocations.<br>
> >>>><br>
> >>>> Note that this is a very early stage POC, and lots of stuff is missing<br>
> >>>> (most notably security).<br>
> >>>><br>
> >>>> Before I go to much further though I though that I should get some<br>
> >>>> feedback, e.g.<br>
> >>>><br>
> >>>> - Do we actually want this? I am not sure how much interest there is,<br>
> >>>> but it seems like GRPC could be very useful in a polyglot microservice<br>
> >>>> environment.<br>
> >>>> - Is the current implementation the best way of actually registering<br>
> >>>> GRPC services, or should we require some kind of defining annotation<br>
> >>>> - What security mechanisms should we support? Out of the box standard<br>
> >>>> GRPC is fairly limited<br>
> >>>> - What do we do about transactions? I am leaning towards not supporting<br>
> >>>> them over GRPC, as we already have solutions for Java invocation in the<br>
> >>>> form<br>
> >>>> of our EJB protocol, and I think non-Java clients are unlikely to want<br>
> >>>> to<br>
> >>>> use this.<br>
> >>>><br>
> >>>> Stuart<br>
> >>>><br>
> >>>> [1] <a href="https://github.com/stuartwdouglas/wildfly/tree/grpc" rel="noreferrer" target="_blank">https://github.com/stuartwdoug<wbr>las/wildfly/tree/grpc</a><br>
> >>>> [2] <a href="https://github.com/stuartwdouglas/undertow-grpc" rel="noreferrer" target="_blank">https://github.com/stuartwdoug<wbr>las/undertow-grpc</a><br>
> >>>> ______________________________<wbr>_________________<br>
> >>>> wildfly-dev mailing list<br>
> >>>> <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
> >>>> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/wildfly-dev</a><br>
> >>><br>
> >>><br>
> >>> ______________________________<wbr>_________________<br>
> >>> wildfly-dev mailing list<br>
> >>> <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
> >>> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/wildfly-dev</a><br>
> >><br>
> >><br>
> >><br>
> >><br>
> >> --<br>
> >> Andrig (Andy) T. Miller<br>
> >> Global Platform Director, Middleware<br>
> >> Red Hat, Inc.<br>
> ><br>
> ><br>
> ><br>
> > ______________________________<wbr>_________________<br>
> > wildfly-dev mailing list<br>
> > <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
> > <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/wildfly-dev</a><br>
> ______________________________<wbr>_________________<br>
> wildfly-dev mailing list<br>
> <a href="mailto:wildfly-dev@lists.jboss.org" target="_blank">wildfly-dev@lists.jboss.org</a><br>
> <a href="https://lists.jboss.org/mailman/listinfo/wildfly-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailma<wbr>n/listinfo/wildfly-dev</a><br>
><br>
</div></div></blockquote></div><br></div></div>