Originally posted by Steve Taiwan:
Dear Andrew.
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?
Steve,
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.
Pls. let me know your thoughts...
Andrew
--------------------------<br />SCJP,SCJD,IBM XML, SCEA 1