• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Right tier of the EJB implementing an exposed web service

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear Experts!

I have an architectural question. Into which tier goes the component of the exposed web service, used by another software system?

There are the following tiers:
- Client tier
- Web tier
- Business tier
- Integration tier
- EIS tier

My assumption is that:
- The client software goes to the client tier.
- The exposed web service goes to business tier (as it is usually implemeted with help of a stateless session bean).

My another guess is that it resides in the integration tear. But according to my understanding the integrating tier contains the connection logic to the internal systems like database, LDAP server, inhouse systems etc., but an external client is something else.

If the exposed web service resided in the integration tier, then the right place for the external system would be EIS tier which seems not to be true.

Thank you for your help in advance!

PS: maybe you can guess why I'm asking this question on this forum:-(
 
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The business Tier is meant to contain the business logic specific to your application regardless of how it is accessed, locally by your presentation tier or remotely again your presentation tier/client tier or an external client. So to me the business logic of your web service goes into business tier.

As for the integration tier, it is meant to contain the logic to access EXTERNAL resources that are not part of your core application, not under your control.
To access internal resources like your own database there is the resource tier which is often hidden whithin the business tier.

my 2 cts
 
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Just to clarify, the resource tier is actually where the database (or other sources of information) sits. This is sometime refered to as the Data tier. It doesn't actually contain the "logic" to access the data (because the data or resource itself sits here). This logic would reside on the integration tier (which depending on the nature of your architecure may be physical or logical).

Good luck.

Mars

 
ntumba lobo
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My mistake, I was meant to say the Persistence tier instead of the resource tier.
the persistence tier contains logic to access your internal resources in the resource tier.
 
Csaba Farago
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

ntumba lobo wrote:My mistake, I was meant to say the Persistence tier instead of the resource tier.
the persistence tier contains logic to access your internal resources in the resource tier.



Thank you for the answer. Anyway, I wouldn't use terms like "resource tier" or "persistence tier"; let's stick to the mentioned 5 tiers, especially the 3 according to Java EE patterns.

So, "persistence tier" is part of "integration tier" I guess. More general for "Resource tier" is maybe "EIS tier". The question is still: where does the exposed web service goes? If it is the web service broker, then it should be located to integration tier. But according to my understanding the integration tier makes practically the connection between business tier and EIS tier.

The original question is still open: if there is a business logic, implemented in the business tier, exposed in to 2 different means: one as web GUI (accessed through web tier - or maybe "presentation tier"? - which is the correct?) and the other is via web service. In that case in which tier goes the external system? (I would say 80% to the client tier and 20% to the EIS tier.) And what is the right location of the exposed web service? (According to the implementation usually it is mixed up with the business tier components, but logically, is it business or integration tier component? My current guess is somewhat 60% business tier and 40% integration tier.)
 
ntumba lobo
Ranch Hand
Posts: 180
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The persistence tier is actually part of the business tier.
The implementation of your business logic goes 100% in the business tier regardless of how you expose it (web service or not). ->your web service impl is in business tier.
The integration tier only contains logic to access external resources, no business logic.
The external systems are in the EIS tier.
I hope that clarifies things for you

By the way jee propose an N-tier model with usually N>=3, persistence and resource tier are perfectly valid tiers, it only depends on how you struture your system
 
Marcelo Ortega
Ranch Hand
Posts: 528
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I agree with ntumba.

The persistence tier would normally sit close to you business tier. For example, business tier components (such as EJBs) use the Entities persisted / retrieved by the persistence tier. So they are somewhat coupled. I wouldn’t actually say that the persistence tier is part of your integration tier. The integration tier is used to integrate your system with other external systems.

For your question of where to put your exposed web services (Service Endpoint Implementation (SEI)) - the short answer is the business tier. The integration tier is used to integrate your system with other external systems – not to expose web services. The logic used to consume external web services would reside on the integration tier.
 
Csaba Farago
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for the inputs. Now the picture is a bit more clear but a bit more confusing as well.

So:

- Exposed web service goes to business tier.
- Web service calls for an inhouse systems go to the integration tier.

But what is not clear: where do entities with data access objects go? In the implementation these are practically mixed up with the business logic code. But logically they should reside within the integration tier, see for example the J2EE patterns.

Anyway, the official J2EE tutorial doesn't even contain the phrase "integration tier"; they have only client, web, business and EIS tier. Maybe the best would be to completely move the content of the current integration tier into business tier (as it would be done during the implementation) and "forget" about the integration tier.
reply
    Bookmark Topic Watch Topic
  • New Topic