What hit me about this article is that I employ almost an identical stack and have never really stepped back and taken a look at just how many pieces are required to make a non-trivial web app. When you're working with these tools day-in, day-out, you get almost institutionalized and forget the complexities that you've absorbed over the years.
A side note: it's a testament to the great work the open-source community has put in over the past decade (two decades?) or so that so many pieces can come together and work relatively seamlessly.
Very interesting. I was agonizing over the weekend about which stack to use for a new project. I know Rails really well, but Express/Node.js is so hard to ignore these days. This solution seems like the best of both worlds, but I'm still not sure how it works:
In the described scenario, Django loads to initial page with the Backbone.js/Socket.IO code and Django continues to handle all post/put/deletes while Socket.IO delivers all the "get" requests via web sockets?
1. Initial page load dumps in as much data as possible to get things started.
2. All writes go through the Django API (we just look for a success/fail response).
3. All new/real-time data gets pushed to the client via socket.io. This includes data that you yourself created.
#1 is kind of a given, but #2 & #3 are more personal preference/app-specific I think.
We could have done #2 through socket.io, but as noted in the post, Python is our primary language and we wanted to push as much of the logic to it as we could.
At first we had content creators reading responses from the API with all other team members getting their updates from socket.io. This was problematic because creators would get content twice (once over the update channel for the team and once from the API). It resulted in some strange race conditions and a lot of "have I already received this message?" code. In the end, it was easiest for us to just always defer to the data from the socket (which was faster as well).
I'm too am comfortable with Rails and the Ruby ecosystem but jumped into Express recently with Socket.io and MongoDB and think you should too. My curiosity was shortly satisfied and I decided to stick with synchronous code instead dealing with callbacks. For a moment there, I was high with "I'll use Node with everything!".
But the experienced inspired me to play with Ruby's EventMachine, Cramp, Goliath, and implementations like socketio-ruby on Cramp. I also took some time out of my life to really dive in to Javascript and experience some new tools.
As the product evolved, the real-time needs (surprisingly) became less than we originally expected. I think this will change as we continue to evolve.
That being said, after the initial page load, almost everything happens without a page refresh or full page load. You see new messages (with favicon notification), votes, unread counts, etc. all in real-time. I think Ginger would feel a lot klunkier without the real-time bits.
I also think you need to understand it's not a joke. The fact that there exists "kick a ginger day" [0] is proof that it's not a joke. Abuse is not funny, ever.
A side note: it's a testament to the great work the open-source community has put in over the past decade (two decades?) or so that so many pieces can come together and work relatively seamlessly.