This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line!
See this thread for details.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Bear Bibeault
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Jj Roberts
  • Carey Brown
  • salvin francis
  • Frits Walraven
  • Piet Souris

Caching SFSB handle

Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?


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 Zilahi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?

You are losing scalability by doing this!!
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Andrew

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 ]
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic