Collaboration features
Features that bring teammates into the product.
Sharing, comments, permissions and workspaces turn single users into teams. They create natural invitations and make the product harder to leave. They also add complexity to permissions and data models.
Why it matters for a product engineer
Sharing, comments and workspaces turn one user into a team, and bring in new people with every share. They also change the data model. Every object now has owners, members and permissions, and every read must check them. A mistake in that logic exposes private data, which is worse than a missing feature. Product engineers design those permission models, so they decide how safely the product can grow from one user to a team.
How to do it
- Model who can do what as data from the start: owners, members, groups, roles.
- Check permissions in one service or library, not in each screen.
- Make sharing visible: who has access, through which group, since when.
- Test the hard cases: removing access, moving items between folders, groups inside groups.
- Watch the cost of permission checks as data grows, and cache results with care.
Common mistakes
- Permissions checked only in the user interface, not on the server.
- Removing a user while old caches still give them access.
- Collaboration added late to a data model built for one user.
- Sharing that is easy to start and hard to see or undo.
Example
Google built Zanzibar to store and check permissions for Calendar, Cloud, Drive, Maps, Photos and YouTube. It holds more than two trillion access control lists and handles millions of checks per second, more than 95% of them within 10 milliseconds. Its paper describes the “new enemy” problem. Alice removes Bob from a document, then asks Charlie to add new content. If a check uses the old permissions, Bob can see the new content. Zanzibar respects the order of these changes to prevent it.
The new enemy problem, in three steps
- Step 1Alice removes BobFrom the document’s access list
- Step 2Charlie adds new contentAt Alice’s request
- Step 3Bob opens the documentProblemA check with the old list shows Bob the new content
People expect permissions and content to change in order. A check that ignores the order shares what was meant to be private.
ReportedPang et al., Zanzibar, USENIX ATC 2019
Sources: Zanzibar: Google’s consistent, global authorization system (USENIX ATC 2019) ↗ · The cold start problem, chapter preview (Andrew Chen) ↗
Resources
1- bookGo deeper
The cold start problem (chapter preview) ↗
Andrew Chen · 25 minHow networked products get their first users when the product is worth little until others join.