• 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:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is this right architecture

 
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 153
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't like Hibernate performance. If you need a high performance, use EJB with BMT.

Ah! Very interesting project! Good lucky!

Regards
 
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Samual,

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

Just curious...

-Saha
 
Saha Kumar
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Samuel, Sorry for the misspelling of your name. -Saha
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 224
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Saha,

You can always edit your message instead of posting a new message.
 
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!!
 
Ranch Hand
Posts: 126
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Samuel Pessorrusso
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.
 
Ranch Hand
Posts: 686
Mac
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So Vicky what is your conclusion for architecture of the software.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
 
Ranch Hand
Posts: 1491
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In the DAO layer, why are you using both (Spring JDBC & Hibernate) ? I guess, Spring JDBC is not necessary.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Wu Ming
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Sheriff
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
"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.
 
Vicky Pandya
Ranch Hand
Posts: 148
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5782
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 174
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic