Convergence: Ubiety plug-in and libwebsock
Recently, I put out the beginning of another chat plug-in for WordPress called ‘Ubiety‘ which favors WebSockets over the polling system of my AjaxChat plug-in. I don’t like polling over and over again for data. It’s ugly and inefficient. I’d much rather use WebSockets for at-will communication between the server and client. I implemented the simple chat plug-in using the Pusher service. While I prefer the method of communications, this method forces the user to sign-up for the Pusher service. I don’t like this either! I’d like for it be super simple to get going, efficient, and to scale well. Once I get these bases covered, I’ll start looking at the subtler aspects of the chat system and focus on features. In order to eschew Pusher, I began development on libwebsock. Can you tell I love to code?
Libwebsock is a C library that handles framing and control messages for the WebSocket protocol providing simple callbacks to the C developer for easy production of WebSockets servers. Libwebsock is pretty much fully functional at the moment. It’s still very early on and needs a lot of work. Some aspects of libwebsock that still need work are:
- Initial Handshake
- Secure WebSockets support via OpenSSL
- Simpler control frame callback
- More error checking!
I’ve also started development on an Ubiety plug-in server using libwebsock. I’m going to host a server on my personal VPS to try and use up some of that bandwidth I’m wasting.
I think the cool thing about having this server running somewhere outside of the WordPress host is going to be the ability to chat with people not only on the blog you’re currently viewing but also anyone else who happens to be connected to the Ubiety server. Come to think of it, with this 3rd party nature of the server, this chat will not be limited to WordPress users only. I very well could package this up in a neat JavaScript that could be included on any site and provide presence and chat to ANY website. Wow, the horizons continue to expand on this project.
Of course, there will be a need to have fine grain control over you’re particular installation including permissions and privacy. This has really given me a lot to think about and I’m excited about the future of this project. Hopefully I can come up with something worthwhile that people will use. Wish me luck!

No comments yet.