Arquisoft / dashboard_i3b

The Unlicense
0 stars 1 forks source link

Send several new messages asynchronously to html view from several methods #1

Closed juanfadev closed 7 years ago

juanfadev commented 7 years ago

I have tried, and I got one method updating asynchronously with a kafkalistener the messages in screen.

An impovement of it would be to make several methods send an asynchronous update to the same view (one for the data of the database and one for the logs of each "role").

Link with some examples: https://infinitescript.com/2015/06/use-server-sent-event-in-spring-4-2/

juanfadev commented 7 years ago

Sending data using the same event but divinding between methods

juanfadev commented 7 years ago

This is done in last commit https://github.com/Arquisoft/dashboard_i3b/commit/bc71252e3410410df7da96f1d35f5d4ff2a5c928

Maybe some refactoring or enhancement could be done. But it sends Server-side events to different views, which then are processed by the index itself as messages.

juanfadev commented 7 years ago

https://www.html5rocks.com/en/tutorials/eventsource/basics/