Hacker News new | past | comments | ask | show | jobs | submit login
Node.js powered MMO scrabble (wordsquared.com)
61 points by jaekwon on Dec 25, 2010 | hide | past | favorite | 22 comments



Confession: it now runs on Rails 3 :-)


Can you share your reasons for switching from Node.js to Rails?


Library support mainly. Node.js is awesome, but the ecosystem is still very very early. Libraries are almost always alpha quality and don't have the level of polish you'll find in Ruby libraries that have been around a couple years. If you need something specific in Node, 9 times out of 10, you have to implement it yourself. I imagine in a couple years, it will catch up with Ruby.

For example: the MongoDB libraries for Node gave us many problems. I won't go into the specifics as that would take a while, but switching to Ruby mongo driver along with the Mongoid ORM resulted in a huge increase in code readability and is much more reliable I think.

Also being able to use amazing Ruby libraries like devise/omniauth are a big win I think. Similar with Jammit, Barista, Rspec, the list goes on. Here's our current Gemfile: https://gist.github.com/68f0326a9480266d462e. Some of these libraries have Node.js equivalents, but they are all very early stage.

That said, most of our code is UI side anyways. For that I'm using coffeescript / jquery / backbone.js. We'll probably reintroduce some small, focused Node.js server components in the future for the most highly accessed http requests as we start to ramp up the traffic.


> Library support mainly. Node.js is awesome, but the ecosystem is still very very early.

Fascinating, I remember 2-3 years back people were saying exactly the same thing, but replacing Node.js with Rails and Ruby with Python. The more things change, the more they stay the same!


Even 2-3 years ago, Ruby+Rails were better than Python+Django/etc in terms of an ecosystem for webapps. Python had a better ecosystem than Ruby outside of webapps. I suspect this is still true though the gaps have narrowed a lot.


You might try and convince yourself of that, but it was never true. Django has always nurtured a better ecosystem for webapps since its inception due to its nature of packaging smaller parts of a whole as "apps". See a modern website aggregating these apps here:

http://djangoplugables.com/

Forgive me if I'm wrong, but this just doesn't exist for Rails. Sure you might find the random open source'd library or plugin, but that's about the extent of re-usable code you're going to have.

For the Django developer, in minutes you can have a website with a blog, tagging system, voting, contact form, traditional registration system, social authentication, openid logins, avatars, user profiles, friends/followers, on-site messaging, full-site search, and all ready for e-commerce. And that's just the tip of the iceberg. Any of those parts are autonomous and interchangeable. Sure it'll take a bit longer to actually configure the apps how you'd like, display them in your desired format, and connect them up according to your business logic, but who's really going to complain about that after getting all of the above for free?

Hell, for half of my clients I barely have to write a single custom line of code; their entire site request can be broken down into reusable Django apps that already exist and I've worked with before. It's the pinnacle of Don't Repeat Yourself. If that's not the ideal ecosystem for webapps then I don't know what is.


> Forgive me if I'm wrong, but this just doesn't exist for Rails.

Snarky answer: "Yeah, it's called GitHub."

Real answer: I'm not sure what you're suggesting. All of these things are available as a Ruby gem, either directly or as Rack middleware.


I've been a rails developer since the beginning and this has been true on rails as far back as Rails 1.0.. Now we use github and gems on gemcutter, before that there was the list of plugins http://agilewebdevelopment.com...

Now http://djangoplugables.com/ is rather well organized and we don't really have a good centralized place to find them outside of github, but they exists and it's quick painless to use them...


http://ruby-toolbox.com/ is probably the closest analogue.


Thanks for the details, very useful stuff. I work at a large company and we're toying with the idea of building our next project, a JSON API, using Node and MongoDB.

Did you do any integration testing for scrabbly?


Word² was originally named Scrabbly. Here's the previous discussion on the application: http://news.ycombinator.com/item?id=1656057


It uses websockets to provide realtime multiplayer action. And canvas to draw the graphics. This is a sweet taste of what is to come with HTML5.


It sucks that Firefox 4 won't have sockets because of transparent proxies. I feel like that's sort of an edge security case just cause those proxies can't be that popular, but then again I might just be ignorant of something.

I am actually sort of worried why the chrome team hasn't announced handling this. I searched google for a response from the chrome team but I guess they didn't think it warranted one.

http://www.ietf.org/mail-archive/web/hybi/current/msg04744.h...


Did I say something rude?

I would seriously appreciate a reply here cause I really have no clue at all as to why my previous comment is being downvoted. It isn't offtopic, since the root comment mentions how the software is using websockets. It isn't rude to either the firefox or chrome development teams, as I said I can't really judge how severe the security problem is. So how on earth am I offending people?


For some reason, there seems to be an more random downvotings by members just because they can.. So, I often see interesting and on topic answers like yours first being downvoted and then upvoted...

I wonder what could be done by pg to counter that? Maybe have a limit of numbers of downvote per day?


how about we spend our points to downvote others?


Wow, the map at top left when expanded looks awesome. This seems to draw nicely and fast on the iPad, but I can't get it to scroll around. Anyone figured it out yet?


No iPad support yet. Soon though! We're actively working on it.


Weekend challenge: Write a bot which uses http://www.lexicalwordfinder.com/ to bust the high score.


I've done like 6 turns and I still get a message about only placing them next to mine for the first turn.


i think, once you start the game you have to keep building off of your blocks.

this wasn't obvious to me at first (if it is true -- i haven't tested it)


Excellent HN material. Out of the 0 startups, that ran Node.js to be successful, 0 ran it to do Scrabble for their day-to-day-work.

Thank you HN for that unique experience. You are almost as good as state school and IT hot-shot series at Martha Stewart TV.




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

Search: