I see where you are coming from, and I have the same issue, only slightly different.
I have a
multi-tenant app - where many
bosses need updates from many
employees - that reside on a common DB (MySQL) server...
Your issue is easier - yet it should incorporate the same - since you never know where it will lead in the future...
Currently, I use a timer that fires every 60 seconds. ( I personally don't like this approach ).
Upon entering the page, code gets the number of messages for this comp_id. Each timer cycle will see if the number of records is greater than the base amount.
If a new message was posted, a Label, button, toast - will show new data has arrived - now press the Update Button to show new content.
We force the user to press Update, since they could have been doing something else - that we did not want to interrupt.
I want to use a MySQL trigger - or Stored Procedure, that would fire "something else" - to notify the app of new data - for the specific "boss" that needs to be notified.
This is where I fall down.
The timer works good - cause it knows how to ask the query for the company ID (comp_id - signed in user - who belongs to a company).
Yet, the Timer is not immediate. Trigger would be immediate - to fire some event... (to complete the notification)...
Just wait and see what
our smart fellows here shall contribute to a well founded solution. For you, me and everyone that needs this...
@Cableguy , I like and support your approach in this post.
Ask the right questions based on your research of "what to ask"... You know what you don't understand - and what you do...
This helps everyone in a qualified response - without trying to ascertain what the heck you meant in the first place...
This is a classic example of how complex questions should be posed. Clear and concise - to your best ability...
Thanks