Re: In-memory caches and app server load-balancing

From: Kasper Dupont (kasperd_at_daimi.au.dk)
Date: 09/27/03


Date: Sat, 27 Sep 2003 15:35:22 +0200


"Venkatesh M.C." wrote:
>
> Hi,
>
> I have a program running on an application server that creates and works
> with the following.
>
> (a) in-memory caches of data from the database and
> (b) symbolic "locks" used to control concurrent user access to certain
> pieces of data.
>
> I have a requirement to have the program run on an application server farm.
> Any suggestions on how I can keep my caches in each of the server machines
> in synch with one another? The symbolic locks have be kept in synch across
> the servers without any delays.
>
> Any hints would be greatly appreciated.

All locks are to be maintained by the server. When a client needs to lock
an object, it sends a request to the server and waits for a response. The
response contains a serial number, if equivalent to the cached serial
number on the client the cache can be used, otherwise the cache on the
client have to be discarded. The serial number from the server is then
cached by the client.

When a read+write lock is unlocked, both client and server increases their
own serial number of the object. Any other cached instance of the object
will have a smaller serial number, and will thus be known to be invalid.

Recursive structures with locks of different granularity gets more
complicated, but I believe you can use some of the same ideas.

-- 
Kasper Dupont -- der bruger for meget tid paa usenet.
For sending spam use mailto:aaarep@daimi.au.dk
Their business was zero and it was shrinking.


Relevant Pages

  • How to implement synchronous rpc between 2 processes on the same machine.
    ... i.e it internally maintains a pool of threads i.e the server(process ... So here is my design the i want you to kindly kindly review and give ... The client i.e p1 invokes the function, ... The server thread gets the signal, locks mutex M1 executes the called ...
    (comp.programming.threads)
  • How to implement synchronous rpc between processes on the same machine
    ... i.e it internally maintains a pool of threads i.e the server(process ... So here is my design the i want you to kindly kindly review and give ... The client i.e p1 invokes the function, ... The server thread gets the signal, locks mutex M1 executes the called ...
    (comp.unix.programmer)
  • Re: 2.6.2-rc2 nfsd+xfs spins in i_size_read()
    ... >> On the NFS server I'm exporting an XFS filesystem to the client ... The client mounts using ... the server locks up. ...
    (Linux-Kernel)
  • Re: Should COBOL be lockedUP for good?...
    ... How do you _know_ that the locks will be released automatically? ... If a client machine crashes or just stops then the ... server simply never gets another message. ... gain is saving of network time, disk transfers, head moves. ...
    (comp.lang.cobol)
  • Re: In-memory caches and app server load-balancing
    ... The locks are in-memory locks on each application server. ... the cache synchronisation should not bring down the performance. ... When a client needs to lock ...
    (comp.os.linux.development.apps)