Hacker News new | ask | show | jobs
by vic_nyc 5695 days ago
Would be interesting if you could post the tech details about how you implemented it. I've been experimenting with websockets in Clojure, Ruby and Node and so far I have found that in practice it's harder to do than the simple tutorials would have make it seem. For example, I realized that due to the same origin policy, the client and server involved have to run on the same ports (not just same machine) which makes it seem that the same server has to serve them.
2 comments

> For example, I realized that due to the same origin policy, the client and server involved have to run on the same ports (not just same machine) which makes it seem that the same server has to serve them.

Mongrel2 (http://mongrel2.org/home) might help with that.

It's all written in php/codeigniter and mysql. It's very fast thanks to codeigniter being very lightweight and due to caching provided by mysql.

I'll try to write a blog post tomorrow... www.michaelhart.me