File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes Architecture for Trading System Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Architecture for Trading System" Watch "Architecture for Trading System" New topic
Author

Architecture for Trading System

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.
Jignesh Patel
Ranch Hand

Joined: Nov 03, 2001
Posts: 626

hibernate or go for EJBs? Or Spring JDBC with transaction support?


Go for Hibernate and use JDBC with DAO as and when needed(ie. where there are many joins, hibernate is not good in that scenario).

Use Spring for front end and middle tier.
Vicky Pandya
Ranch Hand

Joined: Dec 16, 2004
Posts: 148
I have another quick question. In trading system with following scenario,how would one architect this particular piece in Software.

-10 clients (brower clients)are interested in buying 50 stocks of company A with 10 different BUY prices.
-System has 60 stocks availabe of company A with $100 as SELL price.
-System should handle request on First come first serve basis (Spring-JMS is the option or Message Driven Beans (MDB) ?)
-First request came in with < 100 BUY price, system shold put this request in pending (table?) with its BUYing price.
-Second request came in with >= 100 BUY price for 40 stocks. system will sell 40 stocks to this client. Now remaining stocks in the system =: 50-40=10
-Third request (client) came in with = 100 BUY price for 40 stocks. System will sell only 10 remaining stocks to this client and will put request in pending table with BUY price = 100 and Quantity = 40-10=30.
-Next time when someone sells company A's stocks, system will automatically match against open, pending orders in the databse and will buy for pending orders then send notification to clients about the BUY.

THis is very similar to how other stock broker site works (e.g. http://www.tdwaterhouse.com).

How would one implement this piece of software using Spring? I haven't explored Spring in deep but does Spring -JMS do this kind of job or Message Driven Beans are essential here?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Architecture for Trading System
 
Similar Threads
Architecture for market picture of trading system
What should i use
Is this right architecture
Dont know what to use
Whats the best?