Asynchronous Autocomplete Echoing

Asynchronous Autocomplete Echoing

Situation: Using a web service to provide the autocomplete results, the normal behavior of autocomplete, is that someone initially posits a smaller query, and as they type into the field, the query grows.  This has the effect of reducing the size, latency, of the network service response, as result size shrinks.

Effect: Because there is no check as to response went with which request, the autocomplete display sometimes renders more results than it should (in this case FILO).  Usually the requests are fast and the delay is large, so this is not an issue, but it's all relative, so with the wrong network latency and user input behavior, it does happen.

Proposal: I'm looking at using the datatables query plugin as an example of a solution (http://www.datatables.net/examples/data_sources/server_side.html).  With this ajax-based component, filterable and sortable table queries are matched to insure LILO.  Each request sends a "sEcho" which is expected to be "echoed" in the response AJAX.  While I think this is a solution that could work for autocomplete, I wanted to confirm if anyone has already done this or not?