aspose file tools*
The moose likes Performance and the fly likes Performance Consideration - EJB/DAO/etc. 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 » Java » Performance
Bookmark "Performance Consideration - EJB/DAO/etc." Watch "Performance Consideration - EJB/DAO/etc." New topic
Author

Performance Consideration - EJB/DAO/etc.

Sam TVK
Greenhorn

Joined: Nov 04, 2004
Posts: 4
Our application needs to access a central repository of Customer Information. The Repository team gives us a EJB Interface that we call regularly during the execution of our business logic.

But a new requirement demands certain infomation from the Customer repository that is very huge.(10000*15) records per query.80000 queries per day.

It is to our knowledge that the repository resides in Oracle DB.

I have the following concerns regarding this new module:

1) Should we propose a solution that goes against the existing design i.e EJB call. Basically going for a DAO that resides locally in our JVM.

2) Using Intermediate Object for having clean Interface or Use ResltSet or a Rowset for passing the data across.( Irrespective whether DAO lives in the client JVM or DAO is a Session Bean in their Server)

3) Should i cache some data. But the query results are not the same even for the same customer. If i cache some of the results then i need to go through the entire list to filter applicable results.(Will that be more efficient than DB Query?)

4) One day Latency is acceptable for any update in this portion of Customer data. Taking a daily feed of all the data at some point of time in the day is something worth thinking about?

5) Directly accessing their DB (Thru a local DAO) makes their DB transparent. Is that ok?
Being a Central Repository of Customer Information it is like a Datawarehouse. What kind of interfaces do Datawarehouse applications give to their clients?

/* Edited title to be more descriptive of post. - Nathan Pruett */
[ November 05, 2004: Message edited by: Nathan Pruett ]
Nathan Pruett
Bartender

Joined: Oct 18, 2000
Posts: 4121

Since you are mainly concerned about the performance of the various options you mention, rather than how to code it, I'm moving this thread to the "Performance" forum.


-Nate
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
Originally posted by Sam TVK:

But a new requirement demands certain infomation from the Customer repository that is very huge.(10000*15) records per query.80000 queries per day.


What do you do with that data?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Sam TVK
Greenhorn

Joined: Nov 04, 2004
Posts: 4
Basically they are some patterns(regular expressions) associated with every customer, we need to run a search for that pattern on each message sent by a customer. Based on the search result if we find a particular pattern we need to run a specific Business Logic tied to that pattern.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I'm still not sure I understand what you want to do. What data is coming from the database? The patterns? What will a database query look like?
Sam TVK
Greenhorn

Joined: Nov 04, 2004
Posts: 4
The patterns are stored in the DB. Each pattern also has some assoctaed usage detail attache to it. We Query for all the patterns associated with a customer and also the usage details every time we get a message from that customer. All patterns associated with a customer are not applicable to all messages. there are some filter criteria based on which we filter the applicable patterns for that messsage.
Sam TVK
Greenhorn

Joined: Nov 04, 2004
Posts: 4
Query might look something like this:

SELECT * FROM PATTERN,USAGE WHERE PATTERN.PATTERN_ID = USAGE.PATTERN_ID AND CUSTOMER_ID = ? AND .......
 
 
subject: Performance Consideration - EJB/DAO/etc.