[eluser]jdfwarrior[/eluser]
What exactly are you asking? The easiest way to do it? How to do it?
Personally, (adding on to Fuzzy0ne) I would use jQuery to submit to a Controller/Function via the $.post method, have the controller, load a Model to, call a function and check username existence, and return true or false, passed back to the controller, and then passed back to jQuery. Let jQuery perform the appropriate action at that point.
And I assume by doing it realtime, you mean as they type each character.. You would need to perform the check using the onchange or keyup event in jquery.
Hope this helps.