Re: WebDAV implementation
"Natalia Shilenkova" <[email protected]>
| Newsgroups | gmane.text.xml.xindice.devel |
|---|---|
| Message-ID | <[email protected]> |
On 5/9/07, Vadim Gritsenko <[email protected]> wrote: > > 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. > > Does the client needs only meta data, or both meta data and object data > (document/binary)? > > If you want to retrieve meta data only -- like modification time -- retrieving > complete record, with data, would be less efficient than retrieving meta data only. Well, most of the time record itself is not needed, but to find out the content type of the resource filer has to read entire record just because inline meta data is stored inside the record. To change that means totally changing the way inline meta data is handled. > > 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. > > Yes this sounds good. There is creation/modification time on filer level which > is not exposed properly through collection. > > I think I'd even prefer several variations of this method to cover different > usecases: > * Retrieve meta data only > * Retrieve object data only > * Retrieve both meta data and object data > > First one would need two hits -- read filer record [Note 1] and read additional > meta data from meta data collection. Second requires only one hit to filer, and > third -- again two hits. WDYT? Are you proposing that requests for meta data should always return merged information from both sources? I see no problem implementing that. I wonder if there is a need to have a method to read object meta data without reading custom document that may be stored in meta data collection, just to save some time on reading and parsing extra information. Natalia