Relation tuples, groups and usersets

video locked
Enroll to watch

9 mins

Chapters
About
Discussion0
Notes
Be the first to start a conversation!

Zanzibar uses a simple data model and a powerful query language.

A relation is written as one line of text, called a tuple: doc:summary-pdf#owner@123. Doc is the namespace, and photo and drive are other namespaces. Summary-pdf is the object ID, owner is the relation and 123 is the user ID. The paper has three relations: owner, editor and viewer.

The query language works on sets of users.

  1. Set operations. Union, intersection and exclusion. Exclusion removes a set: a photo is visible to the family, except the people who are currently in China.
  2. Computed sets. All admins of a group, or all viewers in the engineering group.
  3. User sets. The user ID of a tuple can be a group, written as org:engg#member.

A new person is added to org engineering once. Every object that gives access to engineers is then accessible to that person.

Tuple to userset expands a set into user IDs: 10, 20, 30, 40. These sets can be used in a union or an intersection.