java - Tomcat update event -
I am working on an application that uses a web server and a tomak as a Java swing application. As the only client to communicate with the webservices on the web server.
I am stuck in a situation where I have to inform the client of an updated event in some way of the server, which happened on the server side. Something like reverse ajax or similar
Any thoughts ...
Abdul Khaliq
The most common way to choose your server will be your client, that means issuing requests from the server from time to time to ask for new programs. This will start a delay between the presence of an event and the client's notice.
Another way is to issue an HTTP request to the customer and leave it open until an event is displayed. Such notifications come immediately after an incident. When an incident is reported, you issue another request. The disadvantage of this approach is that it strongly prohibits the number of customers that a server can server at any time. The default value of threads for tomcat is 150. For every HTTP request you need a thread, so you can not request more than 150 open requests.
Comments
Post a Comment