Friday, April 23rd, 2010
Drawing Together with Cappuccino and Node.js
<>p>Saikat Chakrabarti of Mockingbird is looking to make the tool collaborative. Along the way he wanted to test out tools to make this happen, and one test ended up with a collaborative drawing program using Node.js with WebSocket support from Socket.IO:
, the actual interesting parts that are doing anything other than serving static files start with the line “var listener = io.listen…”. On the client-side, I made a very simple Objective-J class that wraps the Socket.IO client called SCSocket (located in client/SCSocket.j). It’s up to you to simply set a delegate on this class and implement any of four methods (see setDelegate: on SCSocket) to handle notifications from the backend. To send notifications to the Node server, simple call [[SCSocket sharedSocket] sendMessage:].
Check out the code on GitHub.
Related Content:











Nice ;) In JustProto we implemented that using modified mooComet library. From backend site it is Apache with PHP. It also works perfect :) Adventage of our approach is that it works in every browser (even IE7), but probably performance is worst. I have to try use Node.js as a server.