I have seen some posted thread suggesting to caching data when searching flight. My doubt is that flight is available only if seats are available. If flights are pulled out from the cache, seats may no longer available. In this case cache won't help much or am I missing something?
caching flights info including its status(cancel or delay) and seats is good for search. I just wonder is there anyway to update the "in memory" version(actually only need one for each EJB container) if anything changed at DB side?
I think Orbitz (a major website) do cache their flight search results. Last time I purchased a ticket, they kept on showing me the same flights. However, when you clicked on some of them, they will tell you (in a next screen) that they were no seats available.
I guess it is a matter of how you balance your customer satisfaction. Orbitz has too many queries (most of the people just try to look for cheap tickets). So, they will cache the results to maintain the bulk of their audience happy. However, if you want to give real online experience, I would not recommend doing so.
Originally posted by vu lee: Joseph, Since seats and flight status can change from one second to another, they are not good candidates to be cached. What do you think? I wonder how people cache flights.
I see... but in this case, an itinerary may contain many segments. If no seat available on one of these segments when user attempt to select a seat, the whole itinerary may become useless. By the way, are we focus too much on detail implementation or we are on the right track -- abstraction, high level view.
either solution seems valid. just make a choice and stick with it. if you look at different airline companies they provide flights and search fcilities in different ways and with different levels of success. So there is no correct functional answer. Just state how you are doign it and make sure your logic is sound. It doesn't have to be the perfect functional solution, just the perfect technical solution!
is there a mutual exclusive between performance and valid when caching data? I would like to have both although it does sound impossible.
Since the requirement emphasizes on the performance, I wonder whether I can make an assumption that user may get out_of_date data or invalid segments (seat is no longer available in one of these segment). Hm... It doesn't sound right because a user may end up building many invalid itineraries.
I think we need some strategy, here is just an example:
The entire fight catalog is not cached. The user searches it when prepare an Itinerary, the search result can be cached, with flights, segments, ... and available seats(at least one). before check out, we can re-check the selected flights/seats availability - if a flight is not there, we have no choice, if a booked seat is not there, we can suggest a similar one(if the last one booked, we have no choice too) - and start a transaction for the booking.
The preformance will not be too bad, and the chance to ask users to restart a itinerary should be rare.
Hi Joseph, You propose to cache flights for a single user instead of all users. The system can discard the cache when a SFSB has timed out. I think it is a viable solution. What is your opinion on using CMR to model equipment and seats?