-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[4] subscribe on initiative, region and tags in order to motivate to come back to the make and be updated about last changes on the map #6
Comments
|
@fr0zen could you open a bit what function will be in "mailing system"? |
@rizomaa
|
Trigers:
Will the triggers be aggregated on hour or day or week basis? |
Why do we need a new mailserver? The one we have works finde for me. Here the issue on kvm |
@wellemut where is the discussion about mailing system? Here is a little research done by @ksandrsis #19 |
@wellemut it's perfect to use already configured mail-server for testing and fastest launch our instance of map. May you share info, who is administrator of mailserver, that kvm uses for mailing? |
There is no dedicated mail server for openfairdb. Mails are currently sent out directly via Integration of external e-mail service providers would be a separate task. |
@fr0zen what do you think do we need to spend time for launching some third application? |
@wellemut I've added "in order to" because developpers often ask for why we need the feature. It helps find better solution |
Yes of cours, the reason for a function is very important, but not for the headline, in my opinion... |
This is a big task that may require some preliminary work and could be split into multiple smaller tasks. We should create a separate openfairdb issue for each of those tasks. Decouple notification processingThe check for subscriptions and sending of notifications is currently done during the request processing. Instead this functionality should be moved into a separate component that runs in its own thread. This component will receive messages about database updates asynchronously through a channel. There are already some TODO comments in the code, i.e. in the update entry flow. Customize subscription triggersCurrently all users are implicitly subscribed to all triggers. If we want to support selective notifications for a limited subset of triggers the database needs to be updated. Users may define a default set of triggers that apply to all their subscriptions that apply if no specific triggers are defined for a subscription. I would recommend to start with implementing this default set of triggers. Later users may define an individual set of triggers for specific subscriptions that overwrite/shadow their default triggers. |
Instead of implementing everything directly in openfairdb I can also think of distributing those update events from openfairdb via WebHooks or to provide an endpoint with an Atom feed where external service can pick up those events whenever they are ready. The latter would be my preferred solution, because it reduces coupling between services. Even a proprietary REST endpoint for querying the latest updates would work for such a polling solution. If we use polling then all update events have to be stored in openfairdb, at least temporarily for some (retention) time. What do you think? |
The more I think about this completely new notification architecture the more appealing it appears to me. As a drawback notifications will not be sent out instantly, but only after polling for updates. If you want near real time updates you could also decide to poll say once a minute. |
By decoupling the systems into independent microservices we could easily replace parts with a custom solution that fits our use case. |
Update events should include:
|
For kvm with thought of only having just one sharing button on the map to
Loock our issue kartevonmorgen/kartevonmorgen#325 |
@uklotzde it is interesting idea around the microservice. Do you think it is the case for thinking around data storage as well (for example for Subscription) or just to implement mailing and logic around? |
Each microservice should manage their own data. The service should be as independent as possible. The subscription service could periodically fetch the latest updates from the mapping service. An update log is currently missing in openfairdb, this would be a new feature. Open question: How to deal with user accounts? Currently those accounts are managed by openfairdb. The subscription service could replicate those user database and check the credentials locally. Only if the verification fails it might need to ask openfairdb for updated login credentials for this user. Credentials are email + password hash. We are already using Nginx as a reverse proxy for routing. When splitting the functionality into different microservices we need an API gateway anyway. The routes for internal communication between the subscription service with openfairdb must not be published! |
The replication of user credentials could be done lazily, i.e. only for yet unknown users or if the login fails the subscription service needs to ask openfairdb. This approach nicely decouples both services and we only need to add as single request to openfairdb to read the user credentials. Of course, this route must be hidden and should only be available to the subscription service internally! |
@rizomaa How is the process for subscription? |
@wellemut thanks for the link we will drill the service. |
One more service https://www.mailgun.com/ |
@wellemut thanks for you feedback. Something has been already done. |
@VitalyMikulich праверыць працу рассыльшчыка.
|
in order to motivate to come back to the make and be updated about last changes
Make it possibel to subycribe:
This issue at kvm-reposit: kartevonmorgen/kartevonmorgen#325
The text was updated successfully, but these errors were encountered: