Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

using django and twisted together

1)I want to devlop a website that has forums and chat.The chat and forums are linked in some way.Meaning for each thread the users can chat in the chat room for that thread or can post a reply to the forum. I was thinking of using django for forums and twisted for chat thing.Can i combine the two? The chat application devloped using twisted is linked to the forum.

2)If i use twisted and django what kind of web host shold i use while putting by website on web ?Shold i use a VPS? Or can i get a host that supports both?

like image 706
user223541 Avatar asked Jan 20 '10 05:01

user223541


3 Answers

I would not combine the two per se; calls into Django would happen synchronously which means that Twisted's event loop would be blocked. Better to treat the Twisted process as a standalone app using Django and to have a classic web server handle the Django app.

You are not likely to find a shared host that will allow you to run a Twisted app, so I would go the VPS route.

like image 66
Ignacio Vazquez-Abrams Avatar answered Nov 08 '22 10:11

Ignacio Vazquez-Abrams


I have a project going that might be just what you are looking for (at least to get started). It is called Hotdot: http://github.com/clemesha/hotdot .

Also, I wrote up more details about this topic here: http://clemesha.org/blog/2009/dec/17/realtime-web-apps-python-django-orbited-twisted/

like image 27
clemesha Avatar answered Nov 08 '22 09:11

clemesha


If forum application needs to get something from chat application, it's simplier to make forum application communicate with chat application with plain HTTP requests and to make them run separately.

like image 23
kolen Avatar answered Nov 08 '22 09:11

kolen