|
|
About
TODO
Blog
RSS
Old blog
Projects
Gallery
Notes
Fri, 18 Apr 2008
Poor man's cache coherency protocol design for POHMELFS.
As you might know,
POHMELFS is a network
filesystem with client's cache of data and metadata. Any place with cache has to
provide cache-coherency algorithm to sync data with other users.
There are two common cases when caches become non-coherent:
- client created/removed/modified object, which is not shared with other clients (i.e. this
object does not exist in theirs caches and no object with the same name was created on different
clients)
- object being handled by one client exists in other caches
Poor man's solution for the above problems resolves quite easily: client will flush its changes
to whatever objects it wants during local writeback, this changes are then propagated to all
other clients, which worked with parent object (this information will be stored in server
each time client read dir or perform a lookup). For the first non-coherent case above client
will just receive a new object from the server, which will be easily imported into existing tree
(because of async nature of the POHMELFS it is trivial task, which right now works out of the box,
although only on client). For the latter case there might be problem if local object was modified:
in this case we can either replace its context with new data, or (better) to rename local object to
something different (like old name plus sync time), so that user could merge data manually.
So far there will be no locks, which will be implemented next.
/devel/fs :: Link / Comments (0)
Please solve this captcha to be allowed to post (need to reload in a minute): 79 - 15
|