VirtoCommerce / vc-platform

Virto Commerce B2B Innovation Platform
https://virtocommerce.com
Other
1.23k stars 845 forks source link

Implement DB storage for platform Push notifications #1349

Open tatarincev opened 6 years ago

tatarincev commented 6 years ago

Problem: Now we have only InMemory build-in storage for all the platform push notifications and it leads to problems when platform running on multiple instances. Solution: Need to replace current 'InMemory' PushNotificationManager with new implementation which would use DB for store pushNotifications records. To do that, need to extend IPlatformRepository with new table PlatformPushNotifcation and implement the follow classes structure image

All previous WEB API methods should be preserved for backward compatibility with already exists UI

Woland2k commented 6 years ago

Shouldn't we use some queueing service instead? There is one available in azure.

tatarincev commented 6 years ago

The use of additional services such as Azure.ServiceBus at the moment significantly complicates the platform primary configuration and deployment. Therefore, using a DB storage for these purposes looks as the simplest solution to this problem.

Woland2k commented 6 years ago

It won't complicated things much in azure (it is a simple queue service, not servicebus), and it is a better approach for notifications than database.

Actually if the goal is to have persistant notfications with a history of all notifications available, then database solution is actually better than queueing. Just need to make sure those are requirements.

tatarincev commented 6 years ago

There is PR https://github.com/VirtoCommerce/vc-platform/pull/1350 about this feature need to verify it and test