Asiri Rathnayake wrote:
> Hi Devs,
> 
> I've looked into the issues with webdav on MacOSX and following is the
> diagnosis:
> 
> Finder(Mac) and other text editors on Mac relies a lot on temporary files /
> directories created just for the duration of their operation. These files
> usually start with a "." and can be easily distinguished from others. But
> ignoring these files does not help at all because they are needed for the
> proper operation of those applications. There for, we need to support them
> somehow.
> 
> Approach 1: Store all of those temporary files inside user's session object
> - This doesn't work always because some clients (Nautilus, Redirector,
> Davfs) creates a new session for each and every request they make, so the
> information will not be persistent across different requests. Although some
> clients (Konqurer, NetDrive, DAVExplorer) keeps a single session open
> throughout their operation and they can support temporary files with this
> approach.
> 
> Approach 2: Store the temporary objects (resources) inside a database table
> or file system - This can be complex to implement and will slow down the
> operations.

-1 for this one.

> Approach 3: Use an in-memory storage in a per-user basis and store temporary
> files there (Ex HashMap<User,Object>). This is quite easy to implement but
> we need to manage the temporary storage carefully.
> 
> I have implemented and tested Approach 1 and I will convert this to Approach
> 3 asap. In the mean time, if you think there is a better way to do this,
> please let me know.
> 

I would prefer 1, but since it doesn't work for all clients, +1 for 3. 
You should consider an expiration mechanism, since otherwise this will 
grow indefinitely. Maybe you could use the cache module, since it is a 
generic temp storage.

-- 
Sergiu Dumitriu
http://purl.org/net/sergiu/
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to