Masade
Masade

Reputation: 716

How to design merge operations similar to Quora topics?

I am trying to design an application where users collaborate to build a repository, something like Quora:

I am trying to understand how to design the merge operations.

The questions are

What operations should be performed when merge happens, should the topic that is merged into, be added to all the questions under it or keep everything as it is and just add a reference of merged topic

When showing answers related to a topic, search for reference id of topic and loop through merged reference ids as well.

Upvotes: 1

Views: 305

Answers (1)

ravibalgi
ravibalgi

Reputation: 93

The way to do this is how document management systems are developed. So the idea is to have a document compiled and made available when every merge is done.

This way only one copy of the topic is present and is indexed in whichever system is doing search, storage or is responsible for distribution.

The references to the topic should be kept separate and on every merge, the document should be recreated

Since eventual consistency is important in these scenarios(so the document can always stay and be referenced/dereferenced from the cache)

Hope this helps. Do take a look at twitter architechture for getting near realtime data http://highscalability.com/blog/2013/7/8/the-architecture-twitter-uses-to-deal-with-150m-active-users.html

Upvotes: 0

Related Questions