Hi,
I am little confuse here!
We tried different strategy for Sharding.
-
Tweet Id :
Pro’s : Hot Users problem get resolved
Con’s : User’s Follower’s tweet will take more latency since we have to calculate from all Application server.
Understand!
-
Tweet creation time :
Pros : all the top tweets quickly and we only have to query a very small set of servers
cons :- Not distributed in good manner ,
- User’s Follower’s tweet will take more latency since we have to calculate from all Application server.
Understand too!
-
Merge Solution
HashKey : tweetId (New tweet will distributed uniformly)
Tweet Id : Epoch Time + Auto-Incremental
TweetID : universally unique
Not Understand!
NO Column added of CreationTime, Handling from tweetId ? // is it good practice
PROS :
- Read & write will be fast (Because No secondary index using) // OK
Cons :
- Still we have to calculate all Hot tweets from All App Server.
- For get all tweets from user, he also have to take same approach by calculation from all App Servers.
–> Confusion
I am calculating from All App server for My Tweets/Follower tweets & I am not using epoch time while calculating ?
then what is the use of epoch time ?
Or am I missing something here?