Need to bounce some ideas here...

A while back I put a URL array in the ServerMetaData so the client could
failover.  I now need to get that list to the client.

So here is an idea...

1) The server has knowledge of the list of EJB servers in the cluster.
It computes a hash on this list.

2) The client, on initial contact with the JNDIRequestHandler, will get
the server list in the payload response.

3) The client computes a hash of this list and keeps it somewhere on
it's side.

4) With each interaction or method call (or other EJB lookup), the
client sends this hash (4 bytes?) along with it's request payload to the
server.

5) The server gets the EJB request and compares the hash against it's
own computed version (see step 1).

6) If the hash equals the client's version, the server sends the normal
payload response.  Goto step 4.

7) If the server's cluster list changes, it has a different computed
hash, and notices the client's hash is different.  It sends a normal
payload, but also adds a new cluster list for the client to use appended
to the payload.

8) Client has new cluster list and computes a new hash. Goto step 4.

Thoughts on this?

Jeff

Reply via email to