I am working on a web application the frontend of which is developed in angular js and spring mvc and which consumes the data from a RESTful webservice. There is a scenario wherein the REST webservice executes a tail command on a log file. Now this output should be streamed on the UI.Any pointers on this would be helpful.
Take the 2-minute tour
×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.
|
Solution 1 Maybe you want to take a look into WebSockets. The idea is, that you open a contineous connection between server and client for information exchange. This could be used for receiving log file updates from server. The scenario could be something like this:
-> Spring Websockets <- Solution 2 Another solution of plain polling would be to use a javascript timer function for repeating requests to your log file. Something like this:
However, this will result in a high amount of requests, so maybe you should use some kind of caching mechanism for your log file. |
||||
|