Our web application’s structure is 3 Tier. (Presentation layer, Business layer, DB layer)
All business logic is in the business layer.
Presentation layer requests CRUD to business layer and get result to process users’ request.
By the way, we configured read time out on presentation layer. (3 secounds)
In this case, if some results slowly come from business layer, user get error message and the CRUD processing is correctly finished. So user try action again. As a result, data is duplicated.
How to solve this problem? Just increase read time out?
Our web application’s structure is 3 Tier. (Presentation layer, Business layer, DB layer) All
Share
For long running transactions in the business layer, you should implement a COMET like mechanism on the Presentation Layer:
Unfortunately, this mechanism usually requires some significant implementation changes in both the Presentation and Business Layer. On the client side, javascript frameworks provide these kind of features out of the box. On the server side, Asynchronous Servlets found in servlet 3.0 may help.
Increasing read timeouts alone is simple but will not get you out of this in most cases: if the clients requests go through proxies/firewalls etc…, the latter will likely timeout and close connections before your Presentation Layer does.