my question is more than i need a little bit of the community experience.
i have a project that works on Android and desktop application
(Engineer from Android side, and Agent from computer side)
both applications can chat between them and need to notify each other when data need to refresh from database (SQL).(when engineer send a message to agent or vise versa)
i have some difficulties using sql dependency notification (fires multiple times, or under some circumstances e.g internet connection reconnect, or when datetime change, or under some other unknown cases which i still didn't understand) and thought good to ask if i need to move on tcp client server approach.
another issue i have is that
i need to implement multiple instance of different kind of notifications which make the code more complicated
1.notification for text message
2. notification when an agent add a price
3. notification when something else
4. and so on
and all these under the problems I faced about multiple event fires from notifications and therefore multiple refresh on UI for no reason
is it good practice or pattern to follow and change logic to tcp server client for such a kind of application? or should i stick to sql notifications and try solve all that above one way or another?
Are chat apps using tcp client server for their exchange messages in now days?
in my case if I use tcp for the beginning it will be used only to send a small text "refresh" to the appropriate device (mobile or desktop) to notify the user and refresh the data.
but still not sure if i need to move on this way for such application
any help and which directions to follow is much appreciated.