10

If i devlop a chat application using django will it have some performance problem? Can i do server push in django? I want to have PM and room discussions as well.

gruszczy
  • 40,948
  • 31
  • 128
  • 181
user223541
  • 1,265
  • 7
  • 19
  • 31

6 Answers6

6

How about using tornado? I tried demo chat application of Tornado. And also Tornado claims to have a better performance than django.

Let me know your thoughts.

KaroCodes
  • 246
  • 2
  • 13
abhiomkar
  • 4,548
  • 7
  • 29
  • 24
6

I released a Django app on Pypi and Github that provides a multi-user web chat. It's based on Gevent: works well in multithreaded environments, but not in pre-forked ones such as gunicorn running more than 1 worker. I'm just writing the documentation. The repo is: https://github.com/qubird/django-chatrooms

qubird
  • 529
  • 1
  • 6
  • 4
  • It looks like the Room and Message objects are stored in the database, Can you explain what the Redis server is used for then? I am using the redis plugin as I need to run this in a mod_wsgi environment. – sureshvv Dec 11 '16 at 01:21
1

grono.net has chat and PMs (although there are no rooms) and is built on django. Performance is pretty well, so I believe you should be able achieve the same performance. It depends, on how much connections you are expecting. grono.net is pretty big and it uses some caching and server distribution to perform well. But it all is doable on Django.

gruszczy
  • 40,948
  • 31
  • 128
  • 181
1

I think for a chat application you can use other technologies, such as AMQP(RabbitMQ, etc), Comet, etc. But, for develop user profile, PMs, and other you can use Django.

Do not forget that performance still depends on server configuration (web server software, cache, db)

Vadim Chernysh
  • 143
  • 1
  • 5
1

Basically Django is not the best way to do it.

However, if you are really stick to it and don't want to use to much solutions or/and want to keep it simple you can try with it:

http://popcnt.org/2008/01/django-evserver-asynchronous-server-for.html

Whih is asynchronous django server.

bluszcz
  • 4,054
  • 4
  • 33
  • 52
1

Also Twisted is worth checking out. I think that you described their tutorial scenario.