cancel
Showing results for 
Search instead for 
Did you mean: 

Inter-application data exchange in clustered environment

Former Member
0 Kudos

Hi all,

I have two applications - one is web dynpro, second one is servlet which do some job with data passed from web dynpro application. For data exchange i use my own simple cache implementation (just a server library with class with static synchronized HashMap inside) based on key-object access.

Communication looks like:

1. web dynpro app generate cache entry and create link to servlet application - key is part of url

2. servlet read key from url parameters and read key related object from cache

3. web dynpro clean cache entry in exit hook

Everything works fine in testing environment - my question is, if the principle is good for clustered environment with many server nodes - can be some problems with this approach?

I think there can be problem if request to servlet application will be dispatched to another server node - but it is possible? I hope all request from one user session are dispatched to same node.... please give me some hints about this....

Thanks for help.

Michal

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

> I hope all request from one user session are dispatched to same node

Yes, because of the concept of "sticky sessions" in the NW web AS there is a guarantee that requests will always be distributed to the same node within the same session, unless of course there occurs a fault in which case the dispatcher will re-route the request to some other server node.

The ServletContext runs redundantly on all cluster nodes and the ServletContext instances of the single nodes are not aware of each other. As a result in case of HTTP session failover, the object references stored in the ServletContext are not transferred to a new node and are thus lost, because the ServletContext itself is not replicated in the cluster.

In a nutshell your approach should work unless you are attaching anything to the ServletContext, in which case it will fail in a failover situation.

Regards,

Satyajit

Answers (0)