publish subscribe - How to inform client about new messages on the server -
i created web application jhipster (java, spring boot, angularjs,..) , want implement messaging system users of app. want reach is, show message user in client, if has received new message other user. e.g. "hello xyz, have 3 new messages".
what best approach reach goal?
i think have these possibilities:
- client polls server (call service), if there new messages in database.
- some publish/subscribe mechanism: client subscribes server , gets informed new messages
- use permanent connection web sockets.
what think , want know...
- is not idea if app has lot of users (creates lot of traffic)
- what possibilities implement publish/subscribe system spring?
- is idea use web sockets , create lot of permanent connections, if system has lot of users? e.g. >1000000 user or so
are there other possibilities?
Comments
Post a Comment