The recent thread on jBoss performance, and Marc's explanation of the
relative cost of serialization got me thinking about the efficiency of the
architecture of an application I'm working on.  Let me preface this with I
am still relatively new to Java, and enterprise java in particular (we are
porting a web app written in Perl and PHP to java).

The current architecture consists of an app server machine that also has
MySQL running on it, and the "client" of this app is itself a virtual
hosting web server machine.  I can easily move MySQL off the app server box
later to create a classic three-tier setup if necessary.  Under this
architecture, a user would login via a servlet or JSP, which would
authenticate via an RMI call to the app server, which would query the DB.
Upon authentication, the app server then pulls the user's attributes out of
the DB, wraps it in a UserSession object, and sends it back to the webserver
box via RMI.  The UserSession object then lives on the webserver side for
the duration of the session.

Given Marc's statments about the cost of RMI, I am wondering if it might
make more sense to push the app server (in this hypothetical situation,
jBoss) on to the webserver box.  This would do two things: 1) we could use
the optimized inVM Tomcat/jBoss or Jetty/jBoss, and that alone should lead
to some performance gains, and 2) our "network" costs now consist only of
the direct socket connection to MySQL, which I would assume will be pretty
quick.  A couple of disadvantages to this are that the webserver box is less
secure than the appserver, thus softening the security for the DB, and we
lose some of the scalability afforded by running the appserver on a separate
box.

Given my relative lack of experience with these issues, I was wondering if
any of you with more experience would care to comment on these scenarios.
Are there alternatives I have not presented here which could afford us the
advantages of running the appserver on a separate box without the cost of
RMI serialization?  Is the cost of RMI serialization high enough to justify
pushing jBoss onto the webserver box, essentially collapsing a 3 tier
architecture into a two-tier one?

Sincerest regards,
Chris Todd



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Problems?:           [EMAIL PROTECTED]

Reply via email to