News for hackers. Stuff that matters.
Re:Google Flight Search by kiwidrew on Tuesday September 13, 2011 @02:55PM (#2992917)
It’s rather powerful: as long as the origin airport is one of those shown on the map, and the destination airport is reachable via a domestic flight on one of the major airlines (AA, AS, B6, CO, DL, F9, UA, US), the search results come back instantaneously. Multiple origins and destinations (up to five of each) are supported as well:

http://www.google.com/flights/#search;f=LAX,SFO,SEA,LAS,DEN;...

And the results still come back immediately! Including the three-month chart of prices. This leads me to believe that Google/ITA has precomputed all of these results, and is simply serving these results out of a cache of some sort. That would explain why they are only offering a limited set of origin airports at this time: it probably takes an incredible amount of computing power and storage space to pre-calculate all of the possible results.

Colour me impressed.

Re:Google Flight Search by Fenn on Tuesday September 13, 2011 @08:16PM (#2994239)
I would think the limiting factor is availability. You can pre-compute valid fares between cities super-fast with sufficient computing power, but you're still (somewhat) limited by the rate at which you can update availability, which _still_ has to be polled from airline systems (to some degree) and can't give you answers in <400ms :)

One of the bits ITA/QPX got really right was smart availability caching (http://hasbrouck.org/blog/archives/001880.html) -

I would think they can do the fare search/assembly in realtime with their infrastructure, but they're relying on cached availability, hence the limit to "popular US cities" at the moment, to keep caches fresh enough within the practical throughput limits.

Re:Google Flight Search by Fenn on Tuesday September 13, 2011 @11:58PM (#2994830)
Expanding on this, one of the things ITA/QPX comes with is a dirty big availability cache that's constantly being primed (and paid for) by their customers (ie: Kayak, Orbitz, et al), who are now ironically not getting any traffic from Google :)

And they have this: http://itasoftware.com/pdf/BrochurePDF_DACS.pdf

Re:Google Flight Search by grayrest on Tuesday September 13, 2011 @03:45PM (#2993189)
Re:Google Flight Search by stingraycharles on Tuesday September 13, 2011 @03:05PM (#2992969)
Interesting. That makes me wonder: would that really be the optimal approach? Google is able to return search results for previously unsearched queries nearly instantaneously too, so I'm wondering whether it's really a cache that's serving those queries. Would some sort of graph-based index be possible in this situation?
Re:Google Flight Search by kiwidrew on Tuesday September 13, 2011 @03:33PM (#2993120)
Yes, using a shortest path tree [1], it is possible to efficiently (for some definition of "efficient") calculate the best path from a single origin node to all destination nodes in the graph. Dijkstra's algorithm is the standard implementation, but is not very amenable to parallel processing.

Perhaps unsurprisingly, Google has a framework called Pregel [2] which does parallel graph processing. Their research paper outlines how it can be used to calculate a single-source shortest path tree (in section 5.2) in reasonable time.

[1] http://en.wikipedia.org/wiki/Shortest_path_tree

[2] http://www-bd.lip6.fr/ens/grbd2011/extra/SIGMOD10_pregel.pdf

Re:Google Flight Search by gyardley on Tuesday September 13, 2011 @03:16PM (#2993027)
Here's the classic presentation people usually refer to when talking about flight pricing complexity.

http://www.demarcken.org/carl/papers/ITA-software-travel-com...

I'd love to know how Google's doing it - it's a really hard problem.

Re:Google Flight Search by objclxt on Tuesday September 13, 2011 @03:43PM (#2993175)
What's interesting is that you linked to an ITA Software presentation, and Google own ITA Software. So it's almost certain that some of the people who put that document together worked on this pre-computed solution.
Re:Google Flight Search by lars on Tuesday September 13, 2011 @03:50PM (#2993212)
If I remember correctly, it's mentioned in Artificial Intelligence, A Modern Approach that this problem is not only hard but in fact formally undecidable in the general case.
Re:Google Flight Search by kiwidrew on Tuesday September 13, 2011 @03:35PM (#2993131)
Well, if one narrows down the options a bit, it becomes far more tractable. Considering that Google's flight search only works for domestic return trips of 15 days or less (it didn't seem to give me results for anything longer than that?) and doesn't allow stopovers or open jaws, it's entirely possible that the complexity is much reduced.
Re:Google Flight Search by noduerme on Tuesday September 13, 2011 @03:13PM (#2993016)
Lol. If I were Google, I'd probably have bought all the tickets in advance ;)

Thing that gets me is, do they really send their employees SFO to LA on United?! Southwest's like a third the price... And why isn't SW listed, anyway? Did Herb take issue with something here?

Re:Google Flight Search by lee337 on Tuesday September 13, 2011 @03:37PM (#2993141)
This information is a decade old, but my wife told me that Southwest were the only American airline to make a profit. That could have something to do with it...

EDIT: This recent news article states "Of the five biggest U.S. airline companies, analysts expected only Southwest to report a first-quarter profit":

http://travel.usatoday.com/flights/story/2011/04/Southwest-m...

Re:Google Flight Search by drags on Tuesday September 13, 2011 @03:53PM (#2993223)
Some of Southwest's profit comes from fuel price speculation, which could backfire on them much more quickly and easily than their core business:

http://en.wikipedia.org/wiki/Southwest_Airlines#Risk_managem...

Re:Google Flight Search by joahua on Tuesday September 13, 2011 @07:57PM (#2994170)
From what I understand fuel contract hedging is a pretty standard part of airline business. Obviously hedging has potential to go the other way but it's unlikely to erode profit unless competitors are able to significantly compete on price and steal customers...
Re:Google Flight Search by jbail on Tuesday September 13, 2011 @03:24PM (#2993063)
Probably for the same reason you don't see Southwest flights on any travel website. Southwest doesn't allow their flights to be booked outside of their website.
Re:Google Flight Search by chintan on Tuesday September 13, 2011 @03:27PM (#2993082)
Seems they are only pre-computing for next month or so..

http://www.google.com/flights/#search;f=EWR,JFK,LGA;t=ORD;d=...

gives: Your search – New York to Chicago – did not match any results.

versus

http://www.kayak.com/#flights/NYC-ORD/2011-10-01/2011-11-01

1347 of 1347 roundtrips shown

Re:Google Flight Search by alec on Tuesday September 13, 2011 @03:55PM (#2993234)
Trip length duration is currently limited to 14 days.
Re:Google Flight Search by smackfu on Tuesday September 13, 2011 @05:50PM (#2993694)
It's odd that the limits are just in the data it seems, not in actual limit checks. So when you hit a limit, it's indistinguishable from there being no available flights... which seems very bad for UX.
Re:Google Flight Search by jser on Wednesday September 14, 2011 @02:18AM (#2995106)
Published airline fares change only a couple of times a day (10:30am, noon and 8pm), and only once a day on the weekends. Airlines (like American) are trying to push travel sites to use more dynamic pricing. The data is cached and outdated (including availability).

It doesn't take a tremendous amount of computing power -- remember that most airlines are still running ancient mainframe reservation systems.

The multiple destinations functionality was from ITA -- it's been around for years. Check out flyertalk.com for discussions -- you can input multiple layovers to have it compute cheap fares that maximize miles/segments. They keep a basic backend open at: matrix1.itasoftware.com