discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Keyed Archiver and partial information retrieval


From: Stefan Urbanek
Subject: Keyed Archiver and partial information retrieval
Date: Sat, 07 Feb 2004 16:42:24 +0100

Hi,

I have a question about keyed archiver in GNUstep. One of disadvantages of 
NSCoding protocol is, that I can not get partial information from the archive 
and i have to load and read whole data. Sometimes there are situations, that I 
would like to know only one value from the archive. Does (will) NSKeyedArchiver 
get only value for key I request or it does load the whole data?

It can be very handy for large archves, where user can store information about 
data stored and then be able to retrieve only those data. Concrete example:

In AgentFarms I would like to store simulation state and several other objects 
like collections of data in archive. Simulation state can be quite big (all 
simulated objects are stored), also the collected data can be large. There are 
situations, where i would like to 'peek' into the stored simulation to get 
essential information about saved state, like simulation time, model used, 
'thumbnail' of the state, etc... Moreover, sometimes it is not possible to read 
whole archive, because it may contain classes that are just going to be loaded 
from bundles. (and i do not want to load them if i do not know whether they wil 
be used or not)Currently I am going to solve this problem by using two files: 
archive and property list. However, this solution requires directory-like 
storage and is not very practical. Keyed archive would be excellent solution 
for this problem, if GNUstep is/was able to fetch only several objects from the 
archive. Root object keys would be sufficient.

Is this feature implemented or planned?

Stefan Urbanek
--
http://stefan.agentfarms.net

First they ignore you, then they laugh at you, then they fight you, then you 
win.
- Mahatma Gandhi






reply via email to

[Prev in Thread] Current Thread [Next in Thread]