java - Single EAR? Or multiple EARs? -


we in process of developing javaee 6-based application deployed on jboss eap 6.1. app has 2 primary presentation mechanisms: web admin console, , restful service api. on backend, both admin console , restful service api rely on series of ejbs performing transactional logic , pojo services retrieving data.

it entirely possible performance , resource needs of these various layers may different. restful services rather thin , stateless, whereas admin console stateful , has more interactive functionality (and therefore more memory , processing required). since our ejbs perform our primary transactional business logic, require more processing power our pojo data services query database.

given such setup, make more sense deploy single ear (in multiple appservers in clustered configuration) of these components, or break down individual components separate ears? thinking separate ears could, example, deploy more instances of ejb services if find there scalability issues them, though web console (for example) scaling fine.

given fact scalability of each layer/component different, approach should take? overhead of having make remote ejb calls across ears high consider such model? advice appreciated!

the "java ee" way deploy application single ear on cluster. assume using local interface calls rest/admin console ejb-s. deployment simple, if don't need session replication (you can use sticky sessions) scalability good.

the element need load balancer web applications (for instance apache server take care ssl decoding, static resources serving and, possibly, caching requests can cached).

the problem such setup might arise heavy loads, instance ejbs might eat lot of server resources, throughput of web applications difficult control , can badly affected ejbs. if use sticky sessions user redirected same server, no chance move users less loaded server long user session lasts.

so, if plan high loads make sense keep web applications , ejbs on separate boxes (or virtual machines) easier identify bottlenecks , easier scale layer needs that.

the penalty be:

  1. remote calls ejbs. jboss 6 has pretty advanced ejbs pooling configuration, might not such terrible problem.
  2. network trafic caused these remote calls (so if pass between ejbs , web layer lot of data, might issue).

Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -