Comments (5)
After some more digging, the main problem here seems to be the breadth-first search in checkExpandSubject
. It grabs every Project tuple from the DB and then it starts looking through each one for the user. Then each lookup is a separate query which has it's own round trip time. Which explains why it's so much slower in a real database.
from keto.
Hey Edward, I believe that this is not yet optimized properly. If you have good ideas how this could be optimized we're happy to hear them!
from keto.
Could switch from a breadth-first search to a depth-first search. In this case the relationship chain we're trying to find is: Clip -> Project -> User, so by enumerating all the Projects first we always get worst-case time.
There's also a lot of chattiness between the container and the DB, so if more work could be offloaded to the DB it could make a big difference. This seems like a really good use-case for Postgres's WITH RECURSIVE clauses, although the current implementation seems to be independent of particular SQL versions
https://www.dylanpaulus.com/posts/postgres-is-a-graph-database
from keto.
Related Issues (20)
- OPL: support type unions with traversal HOT 4
- OPL parent permissions not working HOT 1
- Make subject_set.relation optional for the DELETE relationship endpoint HOT 3
- OPL traverse.(...) not working HOT 9
- Problem with arbitrary relations
- Keto CLI cannot communicate with the containers HOT 3
- upstream reference closed: github.com/GoogleContainerTools/distroless/issues/1342
- Individual permissions can't be checked with REST API HOT 4
- Helm Release Job NotReady Status HOT 1
- User incorrectly granted access due to an invalid relationship HOT 1
- Empty relation on a subset doesn't work as wildcard after upgrading to v0.11.1
- Does the object support the expression like '/cats/*' to indicate all items starts with '/cats/' HOT 1
- List distinct objects in the namespace
- Config schema references `tracing` instead of `otelx`
- msg=Unable to connect to database, retrying. audience=application error=map[message:unsupported dialect 'jdbc'] service_name=Ory Keto service_version=v0.11.1-alpha.0 HOT 2
- failed to parse as URL HOT 1
- Keto CLI cannot communicate with the containers
- Self-hosting keto returns "404 Page Not Found" when running a permission check HOT 2
- Quickstart is outdated HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keto.