4 ms·
Data integrity is based on your datastore, not a web framework (or even an orm), performance is relative as generally the performance issue in a web application
by SEJeff 10y ago
Data integrity is based on your datastore, not a web framework (or even an orm), performance is relative as generally the performance issue in a web application is the database and not the web framework, a complex framework? Just write the front-end with react and build the backend bits in django. I use django every day happily and fail to see any of these as reasons to dislike it.
Now if you had mentioned heavy concurrency I might actually take your comment a bit more seriously. Then the answer is don't use Django or python, use golang or C/Rust.
- hueving 10y agoNo, data integrity is not based on your datastore alone. How the app uses it is paramount. It's very easy to write apps that lose all sorts of data due to concurrent requests trampling each other even if you have a DB with the best consistency guarantees possible. If you have an sql based system and you aren't relying heavily on optimistic/pessimistic locking for record mutation, there is a good chance your system has all kinds of risks to lose data.
- mickeyp 10y agoIf you are going to "select" something, mutate it in your python code, and then commit it back without exclusively locking the rows you want to edit, then of course you'll run into data races when concurrent requests attempt to mutate the data! Ditching Django and using SQLAlchemy or even just the lowly dbapi directly will not alter this fact; indeed, it is something everyone who works with a database should know.
- SEJeff 10y agoDatabases generally use MVCC. Frameworks like Django allow you quite a bit of flexibility to use said MVCC via transactions. Something like this: https://docs.djangoproject.com/en/1.10/topics/db/transactions/#tying-transactions-to-http-requests https://docs.djangoproject.com/en/1.10/topics/db/transaction... If you're having concurrency issues in your app, it isn't due to the web framework OR the database, it is due to poor application design. Period.
- hueving 10y agoSo you just repeated what I said, integrity is not based on the datastore alone.