Loading...
Estimate the scale of the system you are going to design...
POST /tag
GET /tags/{object-id}
GET /tag/{tag-id}
PUT /tag/{tag-id}
DELETE /tag/{tag-id}
GET /objects-by-tag/{tag-name}
Tag table
Schema:
Tag ID (primary key)
Content ID
User ID
Tag content
Created TS
Updated TS
User permissions
Schema:
User ID (Primary key)
Content ID
Permission (VIEW/EDIT/DELETE)
Content table
Content ID (primary key)
Content URL
We can use a Relational DB like MySQL or Postgres, NoSQL is not suitable because it's not easy to keep track of relationship between content, tags and users.
High level design
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?