Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT RPC - Multiple RPC Services Per App

I am currently working with a GWT app that has one large RPC service. It has over 100 methods, all of which do different things. What kind of performance benefit / hindrance would I get if I split this into multiple RPC services? I believe I'd have to make a new servlet for each one.

So my main questions are: Does GWT create a new RPC servlet for each running client? Would GWT have two servlets for one App if I have two RPC services? Would having two RPC services cause any performance issues. currently (10-15 concurrent users on one tomcat instance)

like image 569
aglassman Avatar asked Feb 19 '23 02:02

aglassman


1 Answers

What kind of performance benefit / hindrance would I get if I split this into multiple RPC services?

I believe it'd change nothing in this respect.

I believe I'd have to make a new servlet for each one.

Not necessarily. You could have a single RemoteServiceServlet implementing several RemoteService interfaces. You'd have to set the same @RemoteServiceRelativePath on all your interfaces for the client to use the same URL, but you could also map that same servlet to several distinct URLs (several servlet-mapping with the same servlet-name).

Does GWT create a new RPC servlet for each running client?

GWT doesn't create a new RPC servlet, if you host your web app in Tomcat, then Tomcat odes create servlet instances (generally a single instance per class).

like image 141
Thomas Broyer Avatar answered Feb 28 '23 11:02

Thomas Broyer