notification in saas application over azure -
we working on saas based application (built on azure). in application web server , app server shared among tenants database separate (sql azure).
now there need implement notification service can generate notifications based on events subscriptions. system can generate different kind of event (like account locked , many other) , user can configure notification rule on these events. notification can in form of email , sms.
we planning implement queue events. event notifier push on queue. notification engine subscribe queue. whenever receive new event, check if there notification rule configured on type of event or not. if yes, create notification, result emails/sms. these emails/sms can stored in database or pushed queue. different background process (worker role) can process these emails.
here queries.
should keep 1 single queue (for events) tenants or create separate queue different tenants. if keep single queue, can shared subscriber service can subscribe queue. can scale in-out machine.
since have different databases each tenant, can store emails respective databases , using service, can pool database , send email after defined interval. not sure how share subscriber code in case.
we can store mails in nosql database (like table storage in azure). subscriber (window service/worker role) can pool table , send mails after defined interval. again, scaling can challenge here too.
we can store emails in queue (rabbitmq instance). worker role can subscribe queue. scaling of worker role should not issue in case keep single queue tenant.
please provide inputs on these points.
thanks in advance
i separate queues not tenants function. queue handlers specific type of message processing.
ie: order processing queue, account setup queue, , etc.
creating queues tenant /headache/ manage when want scale based on them , want presumably sync/add/remove them customers come , leave. so, avoid scenario
ultimately, scaling based on multiple queues harder without auto-scaling services such cloudmonix (a commercial product built)
hth
Comments
Post a Comment