Hi all, While working on Webadmin, I found that existing Xindice code may need some modifications in order for WebDAV implementation to work more efficiently.
1. According to WebDAV specification, methods such as PUT, COPY, or MOVE must return different codes depending on previous existence of the target resource. COPY and MOVE methods also have an option that specifies if existing target resource can be overwritten. Because of multithreading, to follow the specification most of the WebDAV methods have to be synchronized, which is bad for performance. Alternatively, class org.apache.xindice.core.Collection may provide some additional functionality. Though currently Collection has methods insert() and set(), they are not really different and not enforced (looks like they were more separated in the past). My suggestion is to change them so insert() throws fault code if that key already exists in database and set() inserts the resource if it is a new key or replaces existing resource. It will help to resolve the problem with minimal changes in the existing code. 2. Creation and modification time for the resource can be accessed from both filer record information and meta-data collection, but using meta-data collection means client have to access two collections instead of one for no reason. The only problem that Collection class does not provide a way for its clients to get this information, when Collection reads record from a filer, it discards everything except record value. Well, what if Collection's method getEntry() returns not just an object, but some additional information it gets from the filer? Return type would be an instance of a class that is similar to class Record, but more high-level, so client can get basic resource properties without making another round trip to database. What do you think? Any other ideas, objections? Regards, Natalia