Live data from Hacker News

Justin.tv porting their site from Rails to Django?

djangohire.com

51–60 of 65 posts

Re: Justin.tv porting their site from Rails to Django?

#51
post #36

Earlier quoted context omitted.

> RoR is more mature [...] Really? Really?!? https://rails.lighthouseapp.com/projects/8994/tickets/1203 Marking a bug as "wontfix" because the developers of the RoR platform are arrogant enough to say, and I quote, "[...] figure out what other software is putting that version in your environment and stop it from doing so" is now called mature? The dialogue on this bug alone was enough for me to put RoR in my rear-vie…

I believe "mature" is a term used to indicate that software is farther along, has more mindshare, and whatever benefits that come along with that.

As someone who's worked with both Rails and Django professionally for years, Rails is far more mature. Both are quality frameworks, but Django has far more warts, and the quality and number of good third-party libraries really isn't close. Django has forms and the admin going for it, and South is really excellent, but on the whole Rails feels better thought-out and more flexible than Django.

Django is very strong as a rapid-development tool (forms, generic views, admin), but I am more comfortable with Rails for a project with a reasonable timeline. Django class-based views are a far cry from Rails controllers.

Re: Justin.tv porting their site from Rails to Django?

#53
I've tried three times to switch from Rails to Django, but each time I ended up coming back. Python isn't bad, but it's a more asymmetric development experience than Ruby (IMHO) and simply doesn't sit as well with me.

However, Django is just so radically different in its approach than Rails. It may have the admin console baked in, but other than that I felt that Rails was far more "batteries included". It's nice that it leverages the Python ecosystem in many cases, but I found it frustrating to have to make so many decisions on what to use when Rails typically provided most everything I needed (minus auth and file uploading...but two gems quickly solves that).

I'm sure if I had learned Django first instead of Rails it would be a different story. As it stands, if switch to anything in the future it's likely to be Play! (http://www.playframework.org).

ymmv

Re: Justin.tv porting their site from Rails to Django?

#54
post #34

I switch from Rails to Django a while ago. On a feature base the two frameworks are equals. I explained it in depth in this video http://vimeo.com/31083901 ( It's in Italian,mf.Du you speak it?! :-) ). Basicaly I turn on django beacuse I prefer Python to Ruby: again the two languages starts from the same assumptions ( Guido also told that ) it's just my personal taste. Also django do things THE WAY I like more. For e…

Minor grammar Nazi point (since you mention you are Italian, and might be interested) - "turn on" is either "sexually attracted to" or "suddenly attack", depending on the context. i.e. "She turned me on, the smell of cigarettes is not a turn-on for me, the dog suddenly turned on me and started biting". I've no idea why ... You mean "turned to".

Not a grammar issue, it's a colloquialism. I used this phrase all the time.

"My old roommate really turned me on to the Wire. What a great show."

Re: Justin.tv porting their site from Rails to Django?

#55
post #53

I've tried three times to switch from Rails to Django, but each time I ended up coming back. Python isn't bad, but it's a more asymmetric development experience than Ruby (IMHO) and simply doesn't sit as well with me. However, Django is just so radically different in its approach than Rails. It may have the admin console baked in, but other than that I felt that Rails was far more "batteries included". It's nice that…

Having learned Django first, and attempted to build stuff with Rails (for intellectual curiosity) multiple times, it's interesting how I have basically the exact same opinion as you in reverse.

For me, the Django way of doing (almost) everything makes sense. Rails feels backwards. I also feel like I get more baked-in with Django, even when not factoring-in the admin. And its distinction of "Apps" vs Rails' "Gems" makes me feel like I have a lot more available from the community in terms of third-party plug-and-play code. Being able to have a minimum viable product without writing a single line of my own Django code because of apps in the community just doesn't exist for Rails as far as I could tell.

Re: Justin.tv porting their site from Rails to Django?

#56
Hey guys. This was my call, so I guess I should explain. I'm typing from my iPhone, but here goes:

Our site is over 5 years old, and if you've followed Justin.tv at all, you know it's been pivot city. All of those pivots have left their mark on the aging code base. It also turns out that many of our assumptions about how to build and scale a high traffic web app are no longer relevant. Servers are 10x faster, bandwidth is dirt cheap, and SSD's have entirely changed the database world.

There is nothing wrong with Rails, but everything else at Justin.tv is written in Python, so I wanted to use that. Switching languages has the benefit of forcing us to remove stuff we don't need anymore and implement the minimum set of features needed; cut and paste doesn't work across programming languages the last time I checked, and that's a good thing in this case.

Django has come a long way as a framework, to the point where it no longer "gets in the way". But the main reason I like it is that it's simple and it's python. All of our backed systems and video libraries are in python, so it will be nice to be able to share more code and leverage the brainpower of the non-ruby programmers at Justin.tv. There are many.

One thing I'd like to make clear- this isn't one of those massive, paralyzing rewrite projects. Justin.tv's website alone is not terribly complex. The scope of this is limited to porting only the templates still in use, porting over the minimum set of features, and removing as much cruft as possible. Our API, chat, video, data stores, and 99% of the infrastructure are untouched.

If you want to help build what will quickly be one of the top 5 django sites in the world, I'm hiring. Team is just two developers right now (everyone else works on TwitchTV) and we're looking for a lead developer.

Re: Justin.tv porting their site from Rails to Django?

#57
post #56

Hey guys. This was my call, so I guess I should explain. I'm typing from my iPhone, but here goes: Our site is over 5 years old, and if you've followed Justin.tv at all, you know it's been pivot city. All of those pivots have left their mark on the aging code base. It also turns out that many of our assumptions about how to build and scale a high traffic web app are no longer relevant. Servers are 10x faster, bandwid…

Well said, Kyle.

Re: Justin.tv porting their site from Rails to Django?

#58

It's hard to know all the details but it seems like most other video providers* scale by using http caching [max age + etags] with a CDN. Language performance isn't really the bottleneck remote calls are much slower :/ I have never hosted/written a django app, do people typically run a request in a thread in django? I thought python had a GIL just like Ruby (1.9+). I wouldn't recommend using something like rails to s…

> I have never hosted/written a django app, do people typically run a request in a thread in django? Depends on the handler, mod_wsgi allows for m:n (mixing threads and processes) for instance. > I thought python had a GIL just like Ruby (1.9+). That's correct, but any C IO (such as DB queries) will generally release the GIL, which allows other threads to run. (technically, CPython has a GIL, Python-the-language does…

> That's correct, but any C IO (such as DB queries) will generally release the GIL, which allows other threads to run.

Ditto with Ruby too.

Re: Justin.tv porting their site from Rails to Django?

#59
post #56

Hey guys. This was my call, so I guess I should explain. I'm typing from my iPhone, but here goes: Our site is over 5 years old, and if you've followed Justin.tv at all, you know it's been pivot city. All of those pivots have left their mark on the aging code base. It also turns out that many of our assumptions about how to build and scale a high traffic web app are no longer relevant. Servers are 10x faster, bandwid…

Sounds mostly reasonable, but would you mind explaining why you ended up using RoR if you are mostly a Python shop?

Re: Justin.tv porting their site from Rails to Django?

#60
post #59
post #56

Hey guys. This was my call, so I guess I should explain. I'm typing from my iPhone, but here goes: Our site is over 5 years old, and if you've followed Justin.tv at all, you know it's been pivot city. All of those pivots have left their mark on the aging code base. It also turns out that many of our assumptions about how to build and scale a high traffic web app are no longer relevant. Servers are 10x faster, bandwid…

Sounds mostly reasonable, but would you mind explaining why you ended up using RoR if you are mostly a Python shop?

5 years ago it was four dudes in a two bedroom apartment trying to run a reality tv show. Web frameworks were the least of our problems, especially since none of us knew any Ruby or Python to begin with.
Post reply on HN