开发者

how do I get update notification from server to client?

Hi I am doing a task using socket programming,in this I have database on server side and whenver any employee update any table ,server should notify all employee by triggring pop up on employee pc.my qu开发者_StackOverflowestion is how to get any update from server and how to trigger pop up on server notifivation.plz help me.


Databases are poll-only, so you can't do this through the database. "whenever any employee update any table" - this happens through the server, no? The server needs to, when this happens, update the database and then send a message out after the database update is complete. This can be done through the open sockets to the clients through a protocol you define.


How many clients are we talking about? There are multiple ways of doing this, polling as was mentioned, is one that would be simple for a limited number of clients. It doesn't scale but would suffice for a small number of users.

Your problem is a classic pubsub issue that could be solved by various pubsub mechanisms. XMPP based pubsub, for example, using any one of a number of XMPP servers (OpenFire, ejabberd, ...) and writing your client code, including publishing trigger, with Smack.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜