Quantcast
Channel: In a Feeds architecture(like Facebook news or Twitter), how to make the feeds counts consistent with the feeds lists' length? - Stack Overflow
Viewing all articles
Browse latest Browse all 3

In a Feeds architecture(like Facebook news or Twitter), how to make the feeds counts consistent with the feeds lists' length?

0
0

I am designing a Feeds system, that one can post news, and others can see each other's news, just like the Twitter.

Now I'm saving the news in HBase, and cache them in Redis. This approach has O(1) insert, update and remove, but the "count" is something hard to achieve:

If I save a separate count in Redis, and increasing/decreasing it upon insertion/removal, the value can be easily not consistent with the real list length in Hbase: one single failure on the network or some other exception can make the value wronged.

If I get the count from Hbase, it's very time consuming.

What design choice should I make?


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images