POST /create/tweet
{
"content" : String,
"createBy" : timestamp,
"userID" : String
}
GET /get/timeline?userID=
POST /like/tweet?
{
"postID" : String,
"userID" : String
}
POST /comment/tweet?
{
"postID" : String,
"userID" : String,
"comment" : String
}
POST /follow/user?
{
"follower" : String,
"followee" : String
}
[User]
ID, String, primary key
name, string
address, string
[tweet]
ID, String, primary key
content, String
createdBy, String
createdAt, timestamp
updatedAt, timestamp
like, integer
[comment]
ID, String, primary key,
tweetID, String,
content, String,
createdBy, String,
createdAt, timestamp,
updatedAt, timestamp
[follow]
Follower, String
Follewee, String
I draw in high level diagram
read flow
write flow
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...
cache aside
worker failture
cache failture
cache bottlenecks
What are some future improvements you would make? How would you mitigate the failure scenario(s) you described above?