users@glassfish.java.net

Re: Enterprise app + cluster question

From: <glassfish_at_javadesktop.org>
Date: Tue, 19 Feb 2008 08:23:08 PST

The best for you until you get some experience in the field is to deploy Web/JSF and EJB modules in every node of your cluster. Remote invocations are very expensive, so you should avoid them as much as possible. On the other hand, local interfaces are almost as fast as invoking a method in a POJO.

Anyway I'll give you an example where you can use remote invocations: If you have very complex tasks that require lots of computation horsepower but have little work to do in the presentation front-end and your presentation does not have to talk to your backend code constantly, you could have a web based application that calls some ejbs deployed remotely which acts as facades to the expensive tasks. Then you can have a few nodes as front-ends (in cheaper computers) running only web code and more nodes as backends (in powerful computers) running your EJBs.

If the tasks that you will be implementing as EJBs are inexpensive tasks (in terms of horsepower), the best solution is to use local interfaces.
[Message sent by forum member 'rivasdiaz' (rivasdiaz)]

http://forums.java.net/jive/thread.jspa?messageID=259687