I’m trying out Slash GraphQL but don’t currently have any intention of using the GraphQL portion of it. I am using the Go dgo client and DQL.
My test data uses pre-assigned UIDs so that my queries can be deterministic. The data is “named-spaced” by UID number to keep things organized, which leads to some large UIDs, going up to 0x99999. It doesn’t look like the /assign endpoint is supported in Slash GraphQL. Can someone confirm this for me? And if that is correct, are there any plans to support it?
Correct me if I am wrong here - but I feel like the zero could handle having a different UID lease per tenant, it doesn’t do much with it other than reach quorum with other zeros about that number and report it back to the alpha that asked for it.
Since the storage is handled by predicate and not uid, it doesn’t matter if a uid is shared between tenants, you wouldn’t be able to select any other tenant’s predicates from that UID.
Edit: sorry - speaking in the world of the upcoming multi-tenancy of course.
As of now, we don’t plan to expose the /assign endpoint in Slash. The reason being, the UID counter is shared by tenants in multi-tenancy. A malicious user can ask for 2^64 UIDs causing the whole cluster to run out of UIDs.
Other than this, same UID can be used by multiple tenants.
Suppose on namespace-1 a user does this mutation
<0x1> <name> "alice" .
<0x1> <age> 15 .
and then on namespace-2 a user does similar mutation
<0x1> <name> "bob" .
<0x1> <age> 12 .
We don’t prevent user of namespace-2 from using the same UID. It is just that user of namespace 1 will see the node <0x1> as:
<0x1> ----name--- <alice>
|
|____ age ____ 15
while the user of namespace-2 will see it as,
<0x1> ----name--- <bob>
|
|____ age ____ 12
while actually it will have 4 edges, something like this: