G
G
gekm2019-08-14 22:09:54
Django
gekm, 2019-08-14 22:09:54

What to use for email notifications of new messages?

There is a blog.
There is a model with 3 classes, each of which is a subcategory of the previous one. The fourth class is posts.
Objects are structured like this:

├───Category1
│ ├───Subcategory11
│ │ ├───subsubcategory111
│ │ ├───subsubcategory112
│ │ └───subsubcategory113
│ ├───Subcategory12
│ │ ├───subsubcategory121
│ │ ├── ─subsubcategory122
│ │ └───subsubcategory123
│ └───Subcategory13
│ ├───subsubcategory131
│ │ ├───post1311
│ │ ├───post1312
│ │ └───post1313
│ ├───subsubcategory132
│ │ ├───post1321
│ │ ├───post1322
│ │ └───post1323
│ └───subsubsubcategory133
│ ├───post1331
│ ├───post1332
│ └───post1333

It is necessary to implement an email notification mechanism about new categories/subcategories/posts as follows:
- the user can subscribe to a category (add to favorites) - then he will receive notifications about all movements in the category itself and its child objects (subcategories, posts - when adding \editing\deleting them)
- the user can subscribe to a subcategory (add to favorites) - then he will receive notifications about all movements in this subcategory and its child objects (posts - when adding\editing\deleting them)
- the user can subscribe to a post (add to favorites) - then he will receive notifications of all movements (editing\deleting\commenting) on ​​this post.
The user should be able to set up an arbitrary set of objects on which he wants to track the movements.
Can you please tell me the best way to implement this?
1. With the help of standard django tools - syndication feed framework or are there more suitable solutions for this task? With this solution, will the user need to add several tapes to himself? Or is it possible to collect one tape from the required categories / subcategories / objects?
2. Could it be easier to do something like a subscription mechanism, but not by users, but by categories / subcategories of objects / objects themselves? For example, customization of notifications is implemented on the toaster , although I don’t know what the toaster is written on...

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2019-08-14
@leahch

It seems to me that a columnar database like clickhouse, tarantool, hbase or similar is needed here. It creates two tables with user subscriptions and user subscription topics. And some kind of kafka-type message bus is needed. All changes are poured into kafka, picked up from it, and, based on a selection of subscribers from the topic row, are entered into the rows of the corresponding users. When entering, the user reads his record with the installed notifications, which are then shown.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question