3 ms·
Nightmarish (without building additional systems): Asynchronous operations (i.e. any task that takes place after you return a response), anything involving webs
by falcolas 10y ago
Nightmarish (without building additional systems): Asynchronous operations (i.e. any task that takes place after you return a response), anything involving websockets or long poll responses, anything involving cross-client communication through the server (like chat). Intelligent master/slave DB routing for read-only queries.
Hard: Using any DB but PostgreSQL. You can use other DBs, but Django silently disables features. Doing anything with the DB that isn't directly managed by Django itself. Doing anything but basic pre-defined URL routing as supported by their routing system.
Use something else: Not using a relational DB as a backend. Not using their user management and authentication system. If you want to use something other than their built-in ORM, templating, and routing.
I personally recommend Flask in the cases where Django is not a good fit. A threading/forking fastcgi model with basic nginx caching is incredibly performant. That said, Flask is pretty terrible at most of the "nightmare" level tasks as well.
- deleted 10y ago[deleted]
- rayalez 10y agoAre you familiar with django channels? https://blog.heroku.com/in_deep_with_django_channels_the_future_of_real_time_apps_in_django https://blog.heroku.com/in_deep_with_django_channels_the_fut... They supposed to make this sort of thing easy and straightforward. I'm still learning them, but this system seems to be well designed and makes a lot of sense. Django + Django REST Framework + React should give you pretty much everything you need to build whatever you want, including single page apps. At least as far as I understand it.
- wahnfrieden 10y agoChannels don't guarantee at-least-once delivery, so you can only use them at best as a refinement - you have to assume your clients will miss messages. Which makes it unusable for many use cases (though I'm sure many negligently ignore it too).
- sudshekhar 10y agoIn my experience, celery handles the asynchronous tasks pretty well (and with minimal configuration) For web-sockets, yes django is a (or was) a nightmare to work with. I had to use nodejs and django with a common redis backend to implement chat functionality (not fun at all). I have high hopes from django-channels and the asgi server. Hopefully, we will get plug and play asynchronous chat apps for django in the future.