On Nov 23, 2009, at 03:56 , mckwil wrote:
>
> Hi all,
Hi,
>
> While trying to use the Java RPC backend to power my front-end qooxdoo app,
> I was wondering how the Java RPC backend handles the service innvocations.
You provide a class that only has to implment RemoteService, an interface that
just act to mark that class but there is no method to implement.
After that, you add the method you want to be able to invoce from client say,
public class RPCController implements RemoteService {
String testRPC(int i) throws RemoteServiceException {
<some Java code here>
}
}
Then, from client side, use RPC to invoque the service "RPCController" and the
method "testRPC".
Check the doc, there are more details explanations and we also can help here.
>
> If there are 50 simultaneous requests hitting a single service at the rpc
> backend, would the qooxdoo Java RPC spawns 50 threads, with each thread
> running the rpc method call on this service?
Well, yes, that's how a java container like Tomcat works but 50 threads in Java
is just fine.
Each RPC request = one thread on the backend
>
> Or would qooxdoo Java RPC backend does some sort of queuing and deal with a
> large number of incoming requests in a pool of worker threads to run RPC
> calls?
Sure there is pool of threads but you don't have to worry about that, thanks to
Java power !
Use Tomcat or other well known proven Java container.
>
> I guess what my question is really poking at, is what does the backend do
> (if anything at all) to handle multiple incoming requests at the same
> service? (assuming that the servlet container just spawns one thread per
> servlet request)
>
This is handled by JEE API framework and Tomcat implementation, as a JEE
developper you don't have to bother with all that details.
Even more, as a Java RPC backend user, all you have to do is concentrate on the
developpement of the controller.
All the "dark side" is already done.
That should not prevent asking all that good question to *design* your
client-server :
* One big request is better than 2 small
* The less you pass the less has to be marshaled and unmarshaled
* and lots of other techy common sense points.
So, don't use RPC as if a request would have no cost, but don't worry for the
implementation.
Of course the implem can be improved, but that's another discussion :-)
> Thanks!
>
> mckwil
>
> --
> View this message in context:
> http://old.nabble.com/Java-RPC-backend-threading-question-tp26471868p26471868.html
> Sent from the qooxdoo-devel mailing list archive at Nabble.com.
>
>
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
> trial. Simplify your report design, integration and deployment - and focus on
> what you do best, core application coding. Discover what's new with
> Crystal Reports now. http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel