Win a copy of Getting started with Java programming language this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Best practice to send notification  RSS feed

 
Venkataraghavan Yenamanram
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to sending notification from spring application.

Actually I've made a task management application. In that When a task is assigned to a particular person it should be notifed to that recipient. for that I've  configured it as,

After submitting the task details will be persisted in database also notifications details are being persisted in  a separate table. then

I'm querying the database which isn't marked as sent and sending them then I make them as sent. Is it best practice?

How actually a notification is sent. I more detail when do I need to send the notification? before inserting into database or after inserting into database? Please clarify this.

Also attach UML/Flow design for sending notification if you can.
 
Tim Moores
Saloon Keeper
Posts: 3434
77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What, exactly, do you mean by "notification" in this context? Are you talking about a web app where a user will see a notice once they log in? Or do you mean sending a notification to a mobile device?

before inserting into database or after inserting into database?

Whatever makes the most sense, but I don't think this is an important point. It sounds (not sure, as you didn't provide much detail) as if both should part of the same transaction - both should happen, or neither, so that your data is consistent. But, again, it's important what you really mean by "notification" - for a web app, the DB entry likely *is* the notification.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!