websockets versus ajax polling ?

I recall I did a small project a couple of years ago with websockets/faye plugin. It was a little complex, but I was wondering if many people use websockets in stead of what seems like the more typical ajax polling and is it very easy to implement in sinatra ?

here is a good websockets implementation


it might make your next project easier