In Prepare Itinerary Use Case, Step 1: Customer inputs basic criteria Step 2: System responses (10) flights. Step 3: Customer selects (1) flight. Step 4: Return (1..n) flights within one hour.
I mean Step 2 query and Step 4 query don't happen at the same time in Step 2. The result in Step 4 is queried based on Step 3 and hits DB in Step 4 again. All information you need for Step 4 is on JSP form or Swing Fram of Step 3. Send the necessary information back to business logic. Then I don't need any cache.
What do you think?
that's my point. How many alternative flights would you find that are cheaper within the hour? My guess is that it's in the single digits, even for major airlines!! So why not just fetch *all flinghts that satisfy the query* plus all flights within 1 hour of the earliest and latest flights from the prior search result. If we want to get technical, you can do this within a stored procedure, but at least you are pre-fetching the results of the second query. This way you have 1 (coarse grained) call to the database.
Originally posted by Durgaprasad Guduguntla: If we assume that the web container and EJB container are colocated within the same Application server, we can use local interface for the web application and remote interface for the swing client, for accessing the facade to businnes tier. That way we can confine RMI communication to swing client only and on the other hand as the web client uses local communication, there will be a significant improvement in performance. What do you think?
In fact, how to find flights is very very complicated. The algorithm is also very time-comsuming.
My design is to do one query for Step 2 and this first query could cost "more than 1 mimute". If you combine Step 2 and Step 4 ( 1 query for step 2 and maybe 10 following queries from the results of Setp 2 for step 4 ), you might make your customer wait more than 10 minutes.
So to separate these 2 queries, make times of query as few as possible and keep the data transfer amount in network for each query as low as possible shuold be my first priority.
What do you think??? [ November 27, 2006: Message edited by: Steve Taiwan ]