M
M
Muhammad2016-12-06 19:20:35
Software design
Muhammad, 2016-12-06 19:20:35

How to implement a feed of events that have a different structure (database schema)?

You need to implement something like an event feed, in which each object has a different structure.
What is required:
1. The ability to get the objects associated with the event. For example, if a comment was added to a discussion, then the ability to get this comment (i.e., its id must be stored somewhere). Important: an event can have several related objects (links to different tables).
2. When deleting one of the objects associated with the event (or changing it), the event should be removed from the feed. You don't need to add it again.
3. Possibility to get all events with one request in chronological order. In order to be able to display the latest events in the feed, for example.
How to implement all this correctly from the point of view of architecture?
Example: https://phabricator.wikimedia.org/
74620e18f1fb48018da3bc46e5ea6806.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Kirill Nesmeyanov, 2016-12-06
@SerafimArts

Polymorphic relationships?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question