Below is a very simple example of how to create a basic websocket using node.js. Websockets are great for maintaining a server/client relationship without as much of the overhead of HTTP web traffic. Today, websockets are used to build a magnitude of browser-based real-time applications (live chats, multiplayer games). Basically it's a persistent connection between the server and client in which both..
This is the server side component to my jQuery @mention autocomplete plugin. It simply queries mySQL with a wildcard matching the term sent by jQuery. You'll need to modify the query to match your own schema.