Friday, August 18, 2017

Re: Row based permissions: In DB or App? ... farewell pain



Am Donnerstag, 17. August 2017 16:09:42 UTC+2 schrieb Vijay Khemlani:
How can we propose faster alternatives if we don't know how fast must it be?

Of course it is up to you in the end, but if you are seriously considering exotic options such as using stored procedures at least I would like to know what specific bottlenecks did you stumble upon as I also use object-level permissions extensively in my own project and haven't had any performance issues yet.


First I had stored procedures on my mind, but I talked to a postgreSQL expert and he said that the django ORM would be fast enough in most cases. This means
 "has_perm" checking would be finally SQL, something like MyModel.objects.filter(...).exists()

The bottle neck I had with guardian is explained on the page below. It is not new, it is well known. My case is not different. Up to now we use generic foreign keys. That's why I think
numbers won't help here.

http://django-guardian.readthedocs.io/en/stable/userguide/performance.html

 
If nothing else, your results would prove useful to the community.



Yes, if I find a solution, I will publish it. This is important for me, since the solutions I provide to our customers are mostly
the work of open source libraries. I just put these great peaces together with some lines of python code.

I ask myself how to be most useful for the community?


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/eae520bb-6c06-44dc-a0e9-9e616575c6fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment