I have a java REST API server that serves different ressources with our client Angular web application. My problem is that one of these APIs is event based and the client application need to call it every X seconds to get the new events.
The server also suffer from it because it needs to store all the events beetween the calls so that the client doesn't miss any, which can cause an overload if the calls are too long appart.
Since in angular we can subscribe to an http call, i'd like to implement an API that pushs new events to the listeners everytime there's one.
Using an old JAVA 8 i was wondering how to do it.
I stumbled on this stackOverflow answer with websockets but it needs java EE 7.
I also thought about firebaseMessaging to send notifications when a new event happens but i don't really know about the feasability of this on a webApp.
Would there be a package or something that make it possible?
Thanks a lot for reading me and for any answer, i'll be glad to add any informations if needed.