If there way an easy solution for this, I guess we’d see much more really nice websites.
Every connected client might implement a similar pattern to re-distribute incomming messages to interested components of client side logic, but this has no longer to do with passing messages from server to client…
My point is: as soon as you have established the concept of passing messages from server to client, and you have a defined interface, everything else becomes an implementation detail.
If you have clients that know how to work with websockets, you can provide a second implementation of your subject, that doesn’t need to store messages for later retrieval, but simply pushes them to the bleeding edge client.
The benefit is, that the matter of how the message finds its way to the client is transparent to your yii application. It only works with the subject interface you defined in the first step.
So in a nutshell: Yii probably won’t do much to help you accomplish the message passing piece of work. But it can be implemented and if done right, it can be re-used as an extension.
Oh, and I’d love to hear some more opinions on that topic.