aspose file tools*
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Is this right architecture Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Is this right architecture" Watch "Is this right architecture" New topic
Author

Is this right architecture

Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I am architecting Trading software system. Current system is client/server and we are replacing it with web based system. I am an experienced J2EE developer and have worked with J2EE, Struts, Hibernate technologies. I am planning to explore and use Spring in business layer and Spring MVC in presentation layer. We will also require to use AJAX in front end for refreshing real data from trading server.

As far as ORM tool is concerned, I am leaning towards Hibernate but bit hesitant as this trading system will have to handle 1 million transactions per day and I am not quite confident with hibernate performance. Should we use hibernate or go for EJBs? Or Spring JDBC with transaction support?

Do you think this will be a right architecture? I am concerned with not having expertiese on Spring and we may uncover issues at later stage of the project.

Any pointers would be appreciated.
Usama Rashwan
Ranch Hand

Joined: Oct 10, 2001
Posts: 33
Pandya,

This are very interesting questions and unfortunately I will not be able to help you here.
but I was wondering is there any group/forum/site where we can disuses REAL word architecture issues and ideas not relate to SCEA exam .in this way we can learn from each one experience and not doing the same mistakes twice.


SCJP2, SCWCD , SCEA Part I<br />Enterprise Application Development with IBM WebSphere Studio, V5.0<br />IBM Certified Solution Developer - WebSphere Studio, V5.0<br />IBM 483 (Enterprise Connectivity with J2EE)<br />IBM Certified Specialist - IBM WebSphere Application Server, Advanced Single Server Edition for Multiplatforms, V4.0
suekar meredilko
Ranch Hand

Joined: Mar 27, 2006
Posts: 153
real world architectural issues can not discussed over a forum

a) confidentiality
b) lengthy threads
c) the politics involved in influencing decisions
d) prototypes
e) designing full blown frameworks
f) convincing business and corrupting them as I say it

Most of all require discussions, i mean real discussion over the phone, video conferencing etc.

I think if you are interested in a specific technology, you should contribute by virtue of being part of an open-source group.

Anyways, you have already taken the first step.

There are just my 2 cents...may not hold true for everyone.
Usama Rashwan
Ranch Hand

Joined: Oct 10, 2001
Posts: 33
suekar ,
My idea wasn't to tell the full real system architectural but just an over view of what was the technologies used to satisfy the business requirement and if these technologies was good enough to handle the requirement or not, and what was the main challenges in the architectural and how it was solved.
For example in Vicky case if there is a reference on a real system with similar requirement then we can learn from this reference.

As I remember there was a white paper on theserverside where they describe the
"
Design Patterns and Architecture behind Theserverside "
, this was a good example of what I am talking about.
Kay Ra
Ranch Hand

Joined: May 03, 2005
Posts: 80
My choice would be go for EJB

pros : proven solution. Many resources to troubleshoot issues.
cons : specification varies, secondly there is a shift in thinking that it is too cumbresome and difficult to write.

The reason that I would pick EJB is that
1. It is a trading system. There are going to be ziillions of isssues,
response time has to be almost immediate. So project should be in a technology that you are very well versed in.
2.There always will be growth in this kind of system. Scalability will be of paramount importance. Usualy one system can be used for other parallel systems. So choose something that you can defend and support in extremely short notice.
I would stick to core J2ee designs
Essentially,
JSP/ Servlet For presentation -- Here I may chose 3rd party depending on comfortability
EJB for Business layer
JMS or MOM for Integration layer
Sreenivasa Majji
Ranch Hand

Joined: Jul 12, 2001
Posts: 224
As previous reader wrote, I was inclined to J2EE solution, because it was proven and specification based. Struts is not specification based but defacto standard for MVC, so you can go Sturts for your web layer. AJAX is just a new name for the existing technology (M$ using this concept for years).

I have trouble with both Spring and Hibernate, these are not specification based and they change very rapidly (like any other open source product). I would ask what are the cost and development benefits you would gain using these technologies. On top of that you need to have a very good development and maintenance team to implement and support these technologies.

It's looks cool to implement these technologies, however if you need really look into imlementation and maintenance benefits and present these real benefits your management team. The business people wants the product which satisfy most of their requirements, on budget, on time, easy to enhance and easy to manage.

Just my $.02


Sreenivasa Majji
Samuel Pessorrusso
Ranch Hand

Joined: Jul 21, 2005
Posts: 164
I don't like Hibernate performance. If you need a high performance, use EJB with BMT.

Ah! Very interesting project! Good lucky!

Regards
Saha Kumar
Ranch Hand

Joined: Feb 23, 2006
Posts: 218
Hello Samual,

What about using hibernate with BMP entity? Does it provide good performance?

Just curious...

-Saha
Saha Kumar
Ranch Hand

Joined: Feb 23, 2006
Posts: 218
Samuel, Sorry for the misspelling of your name. -Saha
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Thanks for the reponse guys.

While things are changing in J2EE space, especially in terms of moving from heavy components to lighter framework. would you guys still stick to heavy EJBs or its worth looking at Spring, which is lightweight J2EE framework. As we know EJB 3.0 is also going to be very lightweight based on simple POJOs.

What you guys say about this?
Sreenivasa Majji
Ranch Hand

Joined: Jul 12, 2001
Posts: 224
Saha,

You can always edit your message instead of posting a new message.
Vinay Singh
Ranch Hand

Joined: Dec 15, 2004
Posts: 174
Pandya
I have been doing architecture and designing of the systems in real world but the problem is that once you are finished with one project,a new technology comes in and you are not sure if that would solve some of your problems. My latest project invloves Spring and Struts along with hiberante and my opinion is
1.Use Struts for Presentation layer. This is defacto standard
2. Use Springs for IOC and Aspects.It takes time to pick up Springs but it does save a lot of problems and reduces redundancy. Integrate struts with Springs. You can use Springs with EJB but it might not be required as it also does transaction management for you.
3. Use hibernate as ORM tool. Entity beans in EJB 3 is very much similar to Hibernate and it does work for heavy duty applications as is your case

Can't comment on AJAX as have not used that.

I think this is a good architecture and we can utlise best of all worlds.
That is the beauty of open source.
Cheers!!


Technical quiz and interview questions   SCJP 6 mock practice test
Anderson Fonseca
Ranch Hand

Joined: Feb 05, 2004
Posts: 126
Use Tapestry instead Struts, Tapestry is don�t url based, it�s component oriented, it�s simply your construction way, use it and minimize config files in your project.

You could use Spring, you�ll increase productivity as IoC, Transaction Control and other benefits.

About hibernate, you could be thinking it�s slow, but it depend as you configure it, even pojo could be an interesting alternative, all depends as you be mastering these technologies.


Anderson Fonseca :: Brazil<br />SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCDJWS, SCEA(I), SCEA 5 (I,II,III)
Bhanu
Ranch Hand

Joined: Dec 05, 2004
Posts: 48
1) I do not recommend SPRING as this could be another layer of unnecessary abstraction over core J2EE APIs and could hurt performance which is essential for a trading system.

2) iBatis could be solution if you want to leverage out-of-box DAO's for your Persistence layer. And I don't recommend Hibernate for the same reason of performance and scalability.

3) It's best to desing our applications depending on the complleing requirements by leveraging light weight, simple and out-of-box technologies based on core J2EE specs rather than going for fancy non-standard frameworks.

4) AJAX could be a better one to use.
[ May 16, 2006: Message edited by: Bhanu P Jasthi ]

Thanks,<br />Bhanu<br />SCEA Step-I<br />SCBCD for J2EE 1.3<br />SCJP1.4
Samuel Pessorrusso
Ranch Hand

Joined: Jul 21, 2005
Posts: 164

What about using hibernate with BMP entity? Does it provide good performance?


I think it is strange to use Hibernate and EntityBeans at the same time, you are going to make your architecture complex. Besides, I like to write my own SQL queries when I need performance.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

So Vicky what is your conclusion for architecture of the software.
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Here is my conculsion.

I have decided to use

-Tapestry, Wicket, JSF all are component based framework and "I think" a way to go but I have decided to use Struts in Front end. I know Spring MVC is better option but this decision comes from one of those reasons where we already have an expertise with Struts and also have to consider tight deadline when team has learning curve for new framworks.
-Spring in business/integration layer. Spring beans will be injected into Struts actions
-Spring in DAO layer using Spring JDBC and we will also use Spring Hibernate at very few places very carefully.
-Spring JMS, ActiveMQ as MOM.


Any comments?
kri shan
Ranch Hand

Joined: Apr 08, 2004
Posts: 1378
In the DAO layer, why are you using both (Spring JDBC & Hibernate) ? I guess, Spring JDBC is not necessary.
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
Spring JDBC + Spring Hibernate. We will start with Spring JDBC only and if database schema grows complex where Hibernate adds value then we may introduce Spring hibernate for some parts or all but this would happen at later stage.
Wu Ming
Greenhorn

Joined: Nov 01, 2003
Posts: 13
The following is my advice:
1. Front side: AJAX + JSF + Struts (Maybe Webwork embeded in Struts after Aug)
2. Bussiness: Spring to manage Hibernate DAO.
3. DAO : Hibernate. You may use JDBC for those high transaction load.


SCJP, SCJD, SCEA (?) ....
Wu Ming
Greenhorn

Joined: Nov 01, 2003
Posts: 13
One more thing need to be pay attension to:
Since Hibernate will cache some data, it will reflect the
changes of the database if you update the data through
JDBC.

I think Hibernate can meet the requirement if you have
only 1M transcation a day. It is not a high load for the
server. It also depends on how you config your system:
memery, CPU, harddisk, db table space structure and so on.
Wu Ming
Greenhorn

Joined: Nov 01, 2003
Posts: 13
One more thing, forget EJB which will make your system so slow that you can not bear especially Sateful session bean.

Hibernate caches data as it can. In this way, it improve the perfermence sharply.
Santiago Urrizola
Ranch Hand

Joined: Apr 27, 2006
Posts: 172
1- i recomend Spring not for a new layer in your application, instead for manage intra layers in the busineess layers (configure factorys, manage hibernate dao, jms sources, etc) it helps a lot.

2- i recomend hibernate, with a good tunning have a very very good performance.

3- i recomend struts + ajax, struts y a fully tested framework, fast (in a trade system yoy need that).

4- if you need a very big amount of user, recomend a cluster, two web containers an two app server, so in this case EJB (SLSB) would be my choice.

Just my opinion ... based on my experience


Santiago Urrizola : La Plata - Argentina<br />SCEA (89%-92%)<br /><a href="http://gpitech.wordpress.com/" target="_blank" rel="nofollow">http://gpitech.wordpress.com/</a>
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
"Is this the right architecture" is like asking "Is this the right car"? If you do not qualify your question with requirements, motivation(to move to a new architecture), and other expected outcomes in measurable terms, you will only get opinions. As technologists, we need to worry first about the business problems we are trying to solve, and *then* the right technical solution to balance the priorities. For example, if you had included in your requirements "a highly dynamic web page with an average response time of 10s", then AJAX would qualify as an option. OTOH, if you had said "one of the limitations is limited network bandwidth", then we would be forced to think alternatives to AJAX.

Everything you have( and others too) have listed - Hibernate, AJAX, iBatis,JDOM, Spring etc. are simply *tools* to help you achieve what you want to. But without knowing what is that you want to achieve, we'll just be blurting out words and acronyms. Whether EJB or not, iBatis or Hibernate, JSP or JSF, IoC or lookups - are all petty issues. Focus on the big picture. Tell us more about the business problems you are trying to solve and then we'll help you figure the *options* for the right architecture.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
You seemed to miss "Trading software system" in my first post. Trading is a world known business and you should have an idea about the business reqs.

Originally posted by Ajith Kallambella:
"Is this the right architecture" is like asking "Is this the right car"? If you do not qualify your question with requirements, motivation(to move to a new architecture), and other expected outcomes in measurable terms, you will only get opinions. As technologists, we need to worry first about the business problems we are trying to solve, and *then* the right technical solution to balance the priorities. For example, if you had included in your requirements "a highly dynamic web page with an average response time of 10s", then AJAX would qualify as an option. OTOH, if you had said "one of the limitations is limited network bandwidth", then we would be forced to think alternatives to AJAX.

Everything you have( and others too) have listed - Hibernate, AJAX, iBatis,JDOM, Spring etc. are simply *tools* to help you achieve what you want to. But without knowing what is that you want to achieve, we'll just be blurting out words and acronyms. Whether EJB or not, iBatis or Hibernate, JSP or JSF, IoC or lookups - are all petty issues. Focus on the big picture. Tell us more about the business problems you are trying to solve and then we'll help you figure the *options* for the right architecture.
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
No, I did not miss that point in your post. Well known domains( such as Trading, Hospitality, Banking) hardly have similar technologies. Otherwise one could shrink wrap an architecture and sell them to the world. Technology is what gives one bank competitive advantage over the other, although all banks do almost the same kind of business!
Vinay Singh
Ranch Hand

Joined: Dec 15, 2004
Posts: 174
Ajith you have hit the nail right on the head!
I agree with you that but its not just the technology which gives an advantage to an business . Its how you implement that technology and bring it to people/customers. To the business it hardly maters whether you use Spring,EJB or Struts but for them the important thing is
1. Would this fit into the bigger picture they have in mind or the vision they have ?
2. How well can system adapt to changes and enhancements ?
3. How well can you manage that on day to day basis ?

Sometimes the best solution may be the most simple one.
Thomas Taeger
Ranch Hand

Joined: Dec 16, 2002
Posts: 309
Originally posted by Vicky Pandya:
You seemed to miss "Trading software system" in my first post. Trading is a world known business and you should have an idea about the business reqs.

Maybe you confused the audience. People here are preparing for an exam. They are not necessaryly experts of your domain. Just throwing in a phrase like "Trading software system" can not substitute providing business and non-functional requirements here before asking for any advises.

And trading is not just a "world known business". You may have B2C, B2B, with or without payment and its security requirements, just facading portals or allowing ordering, etc.

More alarming is the fact that so many prospective architects hop on phrases and give any advises without respect to [the non-existent] business and non-functional requirements, thereby without any criteria and necessarily without any reasoning!

I highly appreciate this kind of real-life discussions in this forum. But both sides should argue, not just tell any opinions like religious doctrins. The discussion is allowed to be a little bit more scientific.

Thomas
[ June 06, 2006: Message edited by: Thomas Taeger ]

www.classic-and-class.com - www.evalulearn.com
Interfaces are the glue of OO.
 
Consider Paul's rocket mass heater.
 
subject: Is this right architecture