I have a setup like this:
Client <----> Realtime Database <----> AppEngine Server
The AppEngine server has some code inside the servlet init() method.
@Override
public void init(ServletConfig sc) throws ServletException {
// Setup Firebase....
firebase.addChildEventListener(..nested SingleValueEventListener..);
}
Whenever the client updates a node in firebase, the AppEngine will listen for this change, and do some processing and update some other nodes.
This setup works for testing, as I am a single user. But what if 100 people are using this app? Am I guaranteed that this childEventListener will run code for every user? Will those nested SingleValueEventListeners also trigger?
Or will I have to deal creating threads on every different firebase request? Or is this all taken care of by Firebase Java Server SDK?
Also, is the init() method, the right place to put the ChildEventListeners and can I add like... 10 listeners in there?