Django vs Phoenix

Here’s one thing about django vs Phoenix that is super relevant:. I’m hiring a junior this month. I’m confident that a junior dev can deploy code into a phoenix app without running into a major footgun. I wouldn’t be so confident about django.

3 Likes

Bitbucket, Pinterest, Instagram, Disqus, Mozilla, Instagram are all powered by Django. Phoenix needs to mature more to get to the level of Django. I think this forum itself is powered by Django.

This forum is powered by Discourse which is a Rails app. And Discourse is quite resource-heavy as all big Rails apps are. @AstonJ has posted this forum’s hosting details in the past. The server is quite beefy.

Sadly there are no good alternatives to Discourse as not many people out there are the retired creators of StackOverflow who can afford to brainstorm and create a new forum from scratch, and take years to do so. We are not Jeff Atwood.

I’d work on commoditising various pieces of software – forums, CRM, bookmarks, budget apps included – in Elixir and/or Rust but alas, I see no benevolent people around who would fund me for years while I’m doing it. :010: It’s the world we live in.

You can draw conclusions how Rails is fantastic if even ElixirForum is based on it, sure. But the truth is, there isn’t much choice of good forum software out there. A lot of people would still use Discourse even if it was written in COBOL.

4 Likes

yes, and Pagerduty, aka, “literally the service that everyone uses to make sure their services are running correctly or else everyone is in trouble”, is Phoenix microservices on top of Kafka.

2 Likes

Exactly Ruby and Django are mature solutions. If Phoenix is that superior then people will replace their setup but without the things I mentioned it will not become mainstream.

No they won’t. There is rarely much to be gained by re-creating something that already works well enough.

2 Likes

You just reminded me of this one stack overflow I started almost 8 years back. Wonder if it’s still an issue.

Job listing?

Yep, and is developed by a few of the best programmers and innovators out there – Jeff Atwood, Robin Wood, Sam Saffron… They have an insane focus on quality, speed, and user experience. So Discourse isn’t something to be discarded out of hand just because it’s not coded in the language one might like.

1 Like

I am not discarding it. I said it is a resource hog and that’s a fact – by the mere virtue of it being a Rails app.

There’s a misunderstanding somewhere. I actually admire Discourse. But I am pretty sure it would have been much more lightweight if it was coded in Phoenix.

from somebody that worked with Django, Rails in the past, I believe there’s absolutely nothing that is makes Django or Rails a deal breaker. Personally I strongly believe that Elixir as a platform enforces best paradigms and code decisions, but, if I have to choose the technology for my next work, I’d let team that is gonna maintain the project which is the best solution.

1 Like

I think both of you are going in the same direction i.e. why one could not easily replace Discourse.

The fact that it is not rewrited in Elixir does not mean, it won’t gain anything from that. ^^

I would say rather not yet necessary as someone said:

1 Like

Yeah, exactly. A lot of effort and money has been poured into Discourse already. Sure it can gain extra efficiency, resilience and not dropping a few requests when under load, if it gets rewritten in Elixir – or in Rust or C++ even! – but at that point Discourse is mature and used enough for a rewrite to be risky and not worth it.

I tried deploying Discourse to a VPS I owned in the past and it was a nightmarish experience though. And may I remind everyone that ElixirForum doesn’t support dark theme because it’s too big a hassle to add that to an existing Discourse installation. :stuck_out_tongue:

So all in all, Discourse is great. But it has some drawbacks like (1) being hard to deploy, (2) being hard to visually customise and (3) being a resource hog.

It still works well enough for a lot of communities to choose it though, and that’s okay.

1 Like

This is actually not the case Dimitar. Discourse uses less server resources, per pageview, than the PHP forums I have run - I posted about this on the Discourse forum too :smiley:

Rails isn’t necessarily a resource hog either, for 90% of sites it is probably more than good enough - it’s just when you get to the scale of Twitter it begins to struggle a bit (but hey, least it can get you there - especially when used in conjunction with things like Redis).

We should probably get back on topic though, of Django vs Phoenix - honestly the best advice I think is that anyone considering either should weigh up what they need from a framework, and then go with whichever suits their needs best :023:

If anybody is interested in continuing the discussion, the points in the first post are a good place to start:

  • Where are they similar?
  • Where do they differ the most?
  • When would you use/recommend either?

:003:

2 Likes

sorry, our pipeline is currently filled, we recruited from local bootcamps, which, if successful will be the way we will proceed moving forward.

That’s a pretty low bar to set though. :003: Only PHP 7 started getting better and faster than the nightmare days of PHP 5.0 - 5.4.

I’ll respectfully disagree that it’s not a resource hog. I do agree that you need to get to a certain amount of users until Rails becomes problematic to scale though. But, that number is still lower compared to Phoenix.

I worked with Rails for ~6.5 years on ~15 apps (if memory serves) and I have two apps under my belt that I ran concurrently both as their Rails and Phoenix variants with 100% feature parity (since rewrites were approved and I had to gradually migrate everything without stopping the Rails apps in the meantime). I am probably a part of a very small group of people around here who have the practical and direct experience of running identical Rails and Phoenix apps (backed by full nights of setting up telemetry and measurements together with sysadmins). In both apps (pretty normal commercial CRUD + API + some bells-and-whistles-attached apps) the average latency was 9x - 12x less in Phoenix, and it also used 3x - 7x less RAM during most loads, extreme included (anywhere from 100 to 7000 users a minute). The DB was 100% identical and its configuration was never changed during the Phoenix rewrites either. The hosting VPS-es were all identical as well.

TL;DR: When the rewrites were approved, trust me, me and the team did all the due diligence to prove that the rewrites are saving hosting money and are allowing for further growth of the business. Those points were part of the contractual agreement so we paid special attention to them at every step.


I appreciate the call for being diplomatic but I feel it goes a bit too far when technical arguments and experiences get swept under the rug by “all frameworks are awesome”. No, they really are not, and me and many others have the battle scars to prove it. I am sorry that this offends someone but I am also not willing to accept that years of my professional experience have been a fantasy.

I am however not bothered enough to go on the net and dig the numerous proofs that Phoenix is more lightweight [on system resources] than Rails. Hence, I should have probably never started this argument to begin with. :slight_smile: I recognise that and I am sorry that I got slightly worked up. I hope you do somewhat agree with me that blatantly discounting other’s experiences with “Phoenix is not mature” – and refusing to elaborate – is not a constructive thing to say either.

Fully agreed on that. I will not comment further on this sub-topic that me and @jslearner started. Apologies that it was viewed as a derailment of the main topic.

6 Likes

People make too big of a deal out of Elixir apps being less hardware-intensive.

Developers are much more expensive than hardware. Even if you have a Rails app with $5k/mo AWS bills, so what? That’s only half a developer’s salary, which is nothing.

What matters the most is developer productivity. Are your developers focusing on solving domain-specific problems, or are they implementing an authentication scheme from scratch for the umpteenth time? Only one of those things deliver value to users and generate revenue.

1 Like

I don’t think that’s the case Bill. If anything it could be argued that Django and Rails is aimed more at junior developers - because it’s so easy to get a MVP done with them. That was certainly the case for me when I first learned Rails and why I loved it so much :slight_smile:

Anyway I think this thread is done now - hopefully we can all agree to that :003:

7 Likes