Hacker News new | past | comments | ask | show | jobs | submit login
Websockets are awesome (you can see everyone's cursor)! Please donate yours (davidvanleeuwen.nl)
190 points by davidvanleeuwen on Nov 23, 2010 | hide | past | favorite | 61 comments



Hi guys. Thank you all for supporting me. I'm just reading all of this, because I've been at a meeting for a couple of hours. Server is up again, but I wasn't expecting it to be this huge. I'll make some changes, so please don't blame me if it's down.

I'm just another Dutch student trying his best to graduate. And yes, I did let a few people check the site before I launched it (not only Dutch people). Still, my English isn't the best and thank you guys for pointing that out. I'll change it as soon as possible.

I'll give all comments a closer look soon. Again, I didn't really expect this (otherwise I'll optimized it first and put it on a CDN and stuff). I'll also get into details (specs, technical details etc).

And again, thank you all :-)


Just curious: Have you heard of firef.ly from back in the day? :-)

http://gigaom.com/2008/07/30/firefly/ http://www.scripting.com/stories/2008/05/13/demoOfFirefly.ht...


Never heard of it. But it actually does use the same technique (I use flash as fallback for browsers that doesn't support websockets... well actually, Socket.IO does it all <- love it).


pretty sure firefly is ChartBeat now.


I blame Tony Haile ;-)


This is a billion and one times better than sending your resume and contacting a recruiter. You leverage the power of the community and showcase that you actually do have competent skills. The only negative I notice, is that among the skills you showcase, proofreading is not one of them. Hah!

Anyways, if you did this to intern where I work, I'd give you an internship position in a heartbeat. Wish you all the luck to get what you want fellow hacker. Thumbs up.


>proofreading skills

In his defense, he may not be a native English speaker.


I'm pretty sure he's from the Netherlands, so he definitely probably isn't a native speaker.

That doesn't mean that he shouldn't fix the mistakes. I'm just saying that he needs to proofread ;)


As this is a job application of sorts I feel I should point out a typo:

"It gives you a peak at the engine of Steam."

should be

"It gives you a peek at the engine of Steam."


Websockets are indeed awesome. I made this: http://powerhouse.nf.id.au/


Seems like this has been done before: http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/

Using Node.js. The node js example even provides the code to replicate it. Is this person using node or some other websocket approach?


Actually, someone recommended Jeff Kreeftmeijer's work, when I was working on this (an old colleague). I liked the way he did this, so yes... his work was very inspiring.

But most of my inspiration on how to do this came from the Node.JS knockout. Those guys are really awesome.

I'm also working on something similar for a while now, check http://screenr.com/DDk

I used Node.JS, ExpressJS, Socket.IO and CouchDB (I should have used redis actually, but these things were familiar to me). I'm not trying to prove this is the newest, most greatest thing. I'm trying to get an internship at Valve.


Hey David,

I really like what you have done, a nice twist on the ol' like button. And its a pretty cool looking site as well.

One thing does, well, concern me a bit, and its that you haven't given credit where credit is due (http://jeffkreeftmeijer.com/2010/experimenting-with-node-js/).

There is no doubt that this is very similar to Jeffs blog post, and although it takes the idea a step further, I do think you should at least add a link to any and all code which inspired you and which you took ideas from, if it be Jeffs previous post, or a Node Knockout project.

Best of luck with getting Valves attention, and you have my pointers vote :)


Could not agree more with cookiestack. The inspiration is quite clear and not giving any credit to what influenced your work is somewhat surprising. Especially given the fact that this is supposed to be a job application.


This is incredible, how come I didn't think of this? This is certainly a flash job application, well done. I wouldn't mind everyone's corrections; if they don't accept you because of a few typoes, Valve are idiots.

How often are you sending out cursor positions? I was trying to start a cursor ruckus but I think that all my cursor movement crashed your server.

Incidentally, this could be an interesting exercise in calculating when and how often to send out cursor coordinates. I'd add something about that on the page too, as I dare say that's a good skill to have as well.

All the best.


Lol, I didn't expect to have so many people on this site. I think the server is going to need a vacation soon.


Is this using HTML 5 Web sockets?

It's a very cool experience. At first I just thought it was an animation, until I managed to coax all the other users into some sort of cursor mosh pit.

Could this be the potential future for social browsing, where each 'cursor' is tagged with the user name and you can actually observe users navigating through the pages of websites.


  "Could this be the potential future for social browsing,
  where each 'cursor' is tagged with the user name and you
  can actually observe users navigating through the pages of
  websites."
Makes note in list of cool project ideas I'll probably never get round to implementing.


The server going down due to popularity might actually help your case.


This is a really nice implementation, but here's how I did it a couple of months ago (with an explanation on how to do it yourself): http://jeffkreeftmeijer.com/2010/experimenting-with-node-js ;)


This has been a long and busy day. I've received a lot of comments, both positive and negative. I'm not sure what to do with all of these comments.

I saw a lot of questions about where I got my inspiration. Someone built something similar at the Node.JS knockout: http://tinyurl.com/2ch3nes. I started experimenting with PusherApp and NodeJS (I've worked with ape-project.org before doing this). Later on, I attended a developer meeting (http://rotterdamphp.tumblr.com) and they talked about Node.JS and CouchDB. At that same meeting someone pointed out Jeff Kreefmeijer's work and that I'm not the first one to build something like this. But I didn't care and kept on building (because it doesn't matter to me if I'm the first to build it). If you're curious on how I've build this, then you should check out my twitter (@davidvanleeuwen) tomorrow, because I'll submit it on github and will post the link there.


The problem wasn't that you're not the first to build it, but that there was a complete guide to build something like this published somewhere, you definitely knew it existed and people thought you used it and didn't credit the author. Since that's not the case: awesome work, your implementation looks great. Have fun at Valve. :)


Is this link dead- or is it just me?


It's down for me too. I think we crashed his server...

http://downforeveryoneorjustme.com/www.davidvanleeuwen.nl/


Please help me out here guys! Thanks :-)

Btw: you can donate your finger as well on iOS4.2


Not working for me. The whole page loads except for the bit inside the cursor placeholder. I'm behind a firewall in an office, but I don't know if that's the problem.

(FF 3.6 on Windows)


FF 3.6 (on windows) needs javascript and flash. So that could be the problem. Maybe you could try Chrome/Safari instead.

And the server is having a busy day, because of all of you guys :D Sometimes it resets all connections, not sure why yet.


Yup, I'm behind a proxy server and this always seems to mess with sockets examples.


Doesn't work here as well. Firefox 3.6


Please use www.davidvanleeuwen.nl and not just davidvanleeuwen.nl - it's a little bug


Works fine in Firefox 4 (behind an HTTP proxy too).


Now, now. This poor student is just trying to get a job; it's not nice to give him the finger....


It's down for the count, but when it gets back up everyone should run this piece of java (requires you to import java.awt.Robot):

      try{
         Robot robot = new Robot();
         while(true){
            for(float t=0; t<1000; t++){
               robot.mouseMove(200+(int)(150*Math.cos(2*Math.PI*(t/1000))), 400+(int)(50*Math.sin(2*Math.PI*(t/500))));
               robot.delay(1);
            }
         }
      } catch (Exception e) {}
We would all be infinitely tracing the infinity symbol.


Can you explain what exactly "donating my cursor" does?


It's something like the 'facebook like' button, but it's more like an experiment for my graduation. I want to become an intern at Valve, that's why I've made this website.

If you have any feedback, please let me now :) Thanks!


Have you got in touch with Valve? If not give me a shout and I can give a couple of people a poke to take a look...


Not yet. I was planning to put it up on the Steam community first and sending and e-mail later on to Valve (and Gabe himself of course).

I'll wait until the (HN) storm has passed first.

But if you could help me out, that will be great. Thanks!


Ok, cool, you've got my cursor. Do you have any ideas on what to add to steam stats on that site somewhere? I'm an avid steam (mostly valve) gamer myself, and I like to keep track of accuracy, headshots, etc. What would you add?


I'm really not sure what kind of data I can use for all the statistics (not sure what kind of data they collect from everyone, except your status and achievements). But I'm hoping to make it somewhat more personal, so you could share it with your friends and stuff.

But I sure can use some help on what kind of data is interesting.


One thing I'd personally like is an analytics type of view for my stats. i.e. graphs of different stats over time to show improvement. I don't know how much social stuff there is to be done, because steam already has a decent community view. I'd definitely like to talk in depth about it if you're looking to discuss things. My contact info is in my profile if you're interested.


Leaderboards, progress, achievements... it should all be there.

I'll contact you if I'll be an intern at Valve! Thanks :D


Look at hlstats. :)


Have you seen the statistics in the TF2 Lobby matchmaking system? http://tf2lobby.com


There is also http://tf2stats.com and you can view stats of online steam game http://en.allgamestats.net/


Trying to cover up other people's cursor is surprisingly fun. They always try to run away and lose you in the crowd. =)


For me, tangling cursors with strangers seemed somehow icky.

Mind you, I also avoided chat roulette...


`Oh, did I mentioned I'm a fanatic gamer as well?`

Shouldn't that be "Oh, did I mention I'm a fanatic gamer as well?"

Good Luck.


Valve will want you to do stuff that works at scale, which you seem to be having some problems with.

What is the backend datastore/communications for this? redis? node.js? or just plain MySQL?


I find that stuff like this works best with no database whatsoever. There's no particular reason to store cursor positions for longer than it takes to route messages, so you can keep them in memory.

Try writing something like this, and you'll be surprised how easy it is. Especially with some of the new frameworks that are built specifically for it (ie., node.js). I expect this to be the "Hello World" for realtime web apps, much in the way that little chatrooms were the "Hello World" for java and sockets.


I have written stuff like this in node.js that's why I suggested it as one of the options he would typically use for this.

I figured he'd either send directly from one host to another with node.js or poll redis.


The new Opera beta does nicely here, just some layout problems (scrollbars) if cursors go too far to the side on large monitors - awesome example though.


This is brilliant. If a picture speaks more than a thousand words, an awesome tech demo shouts louder than a CV, for sure.


I have seen the future of job placement.


I noticed that when you refresh the page, you can revote, do you do any checking to make sure people can only vote once?


Whatever next? Next thing you know someone will write an IRC client using websocket!

Cool showcase though :)



How does the Stackoverflow chat rooms work? I thought that was using WebSockets ...


If we all coordinate our efforts and position our cursors we could spell out something.


Looks like HN effect. I am getting connection refused error.


interesting technology, has a lot of potential. oh, i just added another item in "to learn" list


clever. I hope it works out for you




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: