views:

198

answers:

3

I'm designing a system where I have 2 nodes: 1 node with a web server that serves JSP pages, and forwards requests to web services in another node. In this other node, these webservices forward the eequests to the business logic layer, which then interacts with a DBAcccess layer.

Is JBoss suitable for this layout? Will I have to deploy 2 copies of the JBossAS, one in each node?

Thanks

A: 

It is kind of old question about where to implement "business logic layer"

Follow check list and if you have most answers "yes" use EJB (aka JBoss) otherwise think about simple beans over DataAccessLayer on java code.

  • Your business has dim or dynamically changed rules.
  • You are not sure about DB or product can change DB engine during lifecycle.
  • Scalability somethings means for you.
  • Your product needs expose functionality over interface (not over the web) to third-party components.
  • Your DB has no well-functional to implement sophisticated business logic (for example derby - is fast but restricted).
Dewfy
+1  A: 

You have two nodes, meaning two separate machines? [There's another meaning of the word "node" common in WebSphere-land, just checking we are using same terminology.]

First node need to do servlets and JSPs. JEE servers do that, JBoss does JEE, so that's reasonable use of JBoss. You could use other JEE servers, but the little you've said gives no reason to avoid JBoss. So that's one copy.

Second node, WebServices and some Business logic and some DB access. Again JEE does that sort of stuff. There are alternatives, but if you already know JBoss, then why not? If you are using JBoss in node 1 I wouldn't choose a different JEE server in node 2. [I don't have experience for using non-JEE solutions in this layer - no doubt Spring afficionados could comment.] So if using JEE here, then JBoss, another instance.

That leads to the question why are separating the nodes? One reason might be to allow you to scale the Presentation and Business tiers separately. Hence in the longer run you might have more than just two JBoss instances.

Strong advice: design from day on on the assumption that you might want to scale in that way. All too easy (for example) to create huge Http Sessions that don't work well in clusters.

djna
A: 

Thanks for your answers! Let me explain a little bit more about the project.

We're developing a Geographical Information System for a client, who has asked that the main functionality is a group of web services that expose processing of CSV files according to some business logic. The client has also asked that we build a web frontend to use this service (although they (the web services) might be used by some other application). They have also told us that these 2 servers might be in separate nodes/machines. Another restriction has arisen in the DB access area: the 2 servers operate on 2 databases and these 2 might be in separate physical machines as well, yielding a total of 4 nodes!

Thus, my question was if it was reasonable to use 2 instances oj a JBoss or Spring AS in the 2 servers, and which of these 2 technologies would be most suitable for it.

Diego
So the server node that serves JSP pages uses one DB, and the business logic / web services node another DB? Wouldn't it be better design to put all the DB access in one place to avoid 'model corruption' or code duplication?
mjustin