gRPC on Tomcat server.

1,745 views
Skip to first unread message

Linesh Mohan

unread,
Nov 27, 2017, 4:24:27 AM11/27/17
to grpc.io
Hello Team,

I am trying to start to gRPC server within a tomcat deployment and facing some issues. I am trying the achieve the following -
I have an app server deployed on tomcat and now I want to use gRPC, hence I want to deploy a gRPC server on the same app server.

Kindly help me with the above case.

Thanks in advance.
Linesh

spenc...@google.com

unread,
Nov 28, 2017, 8:05:57 PM11/28/17
to grpc.io
Hi Linesh,
gRPC expects full control over the listening socket in the case of server side, and expects full control over creating and tearing down connections in the case of client side. This doesn't really fit into the model of a servlet container, which is what Tomcat is. If you really must create a gRPC server on the same JVM as Tomcat, you can add the normal gRPC startup code to whatever server start up code you already have:

Keep in mind that gRPC is not a servlet container, so it will not be able to run your existing Tomcat servlets.
Reply all
Reply to author
Forward
0 new messages