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:

  1. client polls server (call service), if there new messages in database.
  2. some publish/subscribe mechanism: client subscribes server , gets informed new messages
  3. use permanent connection web sockets.

what think , want know...

  1. is not idea if app has lot of users (creates lot of traffic)
  2. what possibilities implement publish/subscribe system spring?
  3. 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

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -