Friday, April 23rd, 2010

Drawing Together with Cappuccino and Node.js

Category: Cappuccino, Comet, Node

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.

Posted by Dion Almaer at 12:16 am
1 Comment

2.1 rating from 7 votes

1 Comment »

Comments feed TrackBack URI

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.

Comment by Skowron — April 23, 2010

Leave a comment

You must be logged in to post a comment.