they'd do much better with twisted (python) than tornado. using Deferreds is nothing like opening keys with a beer bottle -- it makes a lot of sense. and as a former ITA Software employee, i can scoff and say they aren't actually doing anything resembling flight search. they're just scraping websites and APIs. node.js might be fine for that, but so is anything else. at that level it's more a matter of preference than…
How we used Node.js to build real-time award flight search
11–20 of 39 posts
Re: How we used Node.js to build real-time award flight search
#12Great use case for Node.js.
Great use case for Twisted, Erlang, Ocaml/Lwt, Lua, Python/Gevent too.
Re: How we used Node.js to build real-time award flight search
#13I ask because (1) the airline websites tend to be _really_ slow and (2) they tend not to find the cheapest/best flights - an ITA search can often beat them.
Re: How we used Node.js to build real-time award flight search
#14So does milewise scrape the airline sites for award travel? Does it also integrate with ITA or similar? I ask because (1) the airline websites tend to be _really_ slow and (2) they tend not to find the cheapest/best flights - an ITA search can often beat them.
1) Part of our reason for using Node+Socket.IO is to deal with the problem of having a bunch of different sources returning data over a wide spread of time.
2) You'd be surprised about the airline sites. While they don't necessarily have the widest variety of good fares, airline will often reserve their cheapest fares for their own sites (called Last Seat Availability).
Re: How we used Node.js to build real-time award flight search
#15So does milewise scrape the airline sites for award travel? Does it also integrate with ITA or similar? I ask because (1) the airline websites tend to be _really_ slow and (2) they tend not to find the cheapest/best flights - an ITA search can often beat them.
We actually do both, and then spent a few cycles de-duping etc. 1) Part of our reason for using Node+Socket.IO is to deal with the problem of having a bunch of different sources returning data over a wide spread of time. 2) You'd be surprised about the airline sites. While they don't necessarily have the widest variety of good fares, airline will often reserve their cheapest fares for their own sites (called Last Sea…
Re: How we used Node.js to build real-time award flight search
#16Could you describe the difficulties you encountered with Tornado and asynchronous Python code?
Don't want to turn this into a Node.js/Python flame war (we love Python as well here at MileWise), but regarding asynchronous Python code: It's more just an annoyance of the language. Specifically, anonymous functions are must easier in JavaScript, so it was just easier to write read and write maintainable code. In Python, you are limited to only passing in simple lambda functions (although deferreds do get around th…
That's pretty specious. You can easily write a function defined inside a function that you can pass by just naming it. "Anonymous" functions are just syntactic sugar. Furthermore, writing a new python named function is easier (fewer chars) to write than a javascript anonymous function, so the "sugar" gained is moot.
Finally, as you build more and bigger systems, you realize that those multi-line anonymous functions you had you actually want to be named (for documentation) and tested. So you'll end up de-anonymizing the complex (multi-line) ones anyway.
As for speed, why not compare a jit (v8) to a jit (pypy) ?
Re: How we used Node.js to build real-time award flight search
#17Earlier quoted context omitted.
Don't want to turn this into a Node.js/Python flame war (we love Python as well here at MileWise), but regarding asynchronous Python code: It's more just an annoyance of the language. Specifically, anonymous functions are must easier in JavaScript, so it was just easier to write read and write maintainable code. In Python, you are limited to only passing in simple lambda functions (although deferreds do get around th…
>> It's more just an annoyance of the language. Specifically, anonymous functions are must easier in JavaScript, so it was just easier to write read and write maintainable code. That's pretty specious. You can easily write a function defined inside a function that you can pass by just naming it. "Anonymous" functions are just syntactic sugar. Furthermore, writing a new python named function is easier (fewer chars) to…
It creates less noise and busy work in your code.
Explicitly specifying functions like having to pre-declare all your variables at the top of your scope.
Re: How we used Node.js to build real-time award flight search
#18Re: How we used Node.js to build real-time award flight search
#19EDIT: This information does seem to be covered in the FAQ, but you don't see the link to the FAQ anywhere when you are trying to capture user accounts on initial signup: https://secured.milewise.com/faq
Re: How we used Node.js to build real-time award flight search
#20One comment: I typed in an email/password and right away it is asking me for my airline credentials but it isn't explaining what it is that the site wants to do with them or if it will store my info and collect information from now on. I'm curious about the site, but I thought twice about entering my info and skipped it. Just saying you might want to explain what it is you are doing to make people more comfortable. E…
This is definitely an area for metrics and user testing, but probably better for us to err on the side of caution =)