METHOD AND SYSTEM FOR ATTRIBUTE MANAGEMENT IN A NAMESPACE
A computer-based method and system for managing attributes of objects in a namespace and for allowing multiple views into the namespace. The namespace system allows the objects identified by the names of the namespace to be hierarchically organized. The namespace system allows for attributes of various objects, including directory objects and data objects, to be dynamically defined after creation of an object. The namespace system also allows for the querying of objects based on their dynamically defined attributes. When the namespace system receives a query specification that includes a newly defined attribute, it identifies the objects that match that query specification that includes a newly defined attribute, it identifies the objects that match that query specification.
The following application is incorporated by reference as if fully set forth herein: U.S. application Ser. No. 11/589,397 filed Aug. 9, 2006.
FIELD OF THE INVENTIONThe described technology relates generally to namespaces and particularly to managing of attributes for objects within a namespace.
BACKGROUND OF THE INVENTIONA namespace is a collection of names that each uniquely identifies an object. For example, the pathnames of a conventional file system uniquely identify the files of the file system and are thus a namespace for the file system. Namespaces, however, can contain the names of a wide variety of objects including files, computer input and output devices, users, and so on. A namespace service typically provides various functions through which applications and users can access the information of the namespace. For example, a namespace may provide a function to retrieve a reference to an object having a specified name. When the function is invoked, it accesses various data structures to locate the object and return its reference.
The difficulty with namespaces is that they typically have predefined attributes associated with their objects. As such, applications and application developers are constrained by the attributes defined by the namespace developers. In addition, namespaces typically provide a logical view of their objects that corresponds to the physical organization of the namespace. For example, if the namespace is hierarchically organized, then the only view of that namespace reflects that same hierarchical organization. It would be desirable to have a namespace service that would allow for more flexible handling of attributes and would allow for more flexible views into the namespace.
Preferred and alternative embodiments of the present invention are described in detail below with reference to the following drawings:
A computer-based method and system for managing attributes of objects in a namespace and for allowing multiple views into the namespace is provided. In one embodiment, the namespace system allows the objects identified by the names of the namespace to be hierarchically organized. One skilled in the art would appreciate that the namespace of the namespace system need not be hierarchical. For example, the namespace could be flat. The namespace system allows for attributes of various objects, including directory objects and data objects, to be dynamically defined after creation of an object. For example, an object representing a video may have the predefined attributes of format type and length. The namespace system allows for an additional attribute, such as title, to be dynamically added to the object. The namespace system may define a namespace interface (e.g., a collection of methods or functions) that each object identified by the namespace implements. The namespace interface may include a function for defining new attributes and setting the values of those attributes. The namespace system also allows for the querying of objects based on their dynamically defined attributes. When the namespace system receives a query specification that includes a newly defined attribute, it identifies the objects that match that query specification. In this way, the namespace system allows for flexible customization of the information or metadata associated with the objects of a namespace.
In another embodiment, the namespace system generates different views of portions of a namespace based on a query specification and a view specification. The query specification specifies the criteria for the objects that are to be included in the view. The query specification may use any conventional querying language, such as an SQL-type language. The query specification may specify attribute names and the values for the objects that match the query specification. The view specification specifies how the objects that match the query specification are to be organized when they are returned. The objects may be organized hierarchically based on values of certain attributes. For example, a query specification may indicate to retrieve objects whose data type is “video.” The view specification may specify to organize those objects hierarchically by their genre and then by the director within each genre. The genre and director may be attributes of the video objects. In such a case, the view specification may be “genre/director.” More generally, the view specification may specify a hierarchy of attribute names and attribute values defining the organization of the objects.
In another embodiment, the namespace system allows for caching of attribute names and values so that objects that are stored remotely can have their attributes accessed without the need to access the remote storage each time. When an attribute of an object is initially accessed, the namespace system accesses the remote storage to retrieve the attributes (e.g., metadata) of the object. The namespace system then stores the attribute names and values locally. When the attributes are next accessed, the namespace system need only access the local storage. By caching the attribute names and values, the namespace system can reduce the number of remote accesses.
In another embodiment, the namespace system allows for the duplication of objects so that they can be accessed when a computer system is off-line. For example, a user may want to store a duplicate portion of the namespace relating to customer addresses on a personal digital assistant (“PDA”). The namespace system allows the user to specify a query specification and a view specification for the duplicate portion of the namespace. The namespace system then identifies the objects that match that query specification, generates a hierarchical organization of those objects using the view specification, and makes a copy of that hierarchical organization as a duplicated namespace for use off-line. After the duplicate namespace is created, a user may change the objects of either the duplicate or original namespace. In such case, the namespace may be out of synchronization. Eventually, the user may want to synchronize the namespaces. To synchronize the namespaces, the namespace system may rerun the query specification against the original namespace, as modified. The namespace system may then compare the objects returned by the query to the objects of the duplicate namespace. The namespace system can then resolve any differences by updating the original namespace or the duplicate namespace as appropriate.
The computer systems and servers of the namespace system may include a central processing unit, memory, input devices (e.g., keyboard and pointing devices), output devices (e.g., display devices), and storage devices (e.g., disk drives). The memory and storage devices are computer-readable media that may contain instructions that implement the namespace system. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium, such as a signal on a communications link. Various communications links may be used, such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection.
One skilled in the art will appreciate that although specific embodiments of the namespace system have been described herein for purposes of illustration, various modifications may be made without deviating from the spirit and scope of the invention. Accordingly, the invention is not limited except by the appended claims.
The embodiments of the invention in which an exclusive property or privilege is claimed are defined as follows:
Claims
1. A method in a computer system for managing attributes for objects in a: namespace, the method comprising:
- providing a plurality of objects;
- providing a namespace interface for each object, the namespace interface for defining new attributes for an object after the object is created and for setting a value for a newly defined attribute;
- receiving a query specification that specifies the newly defined attribute; and
- identifying the objects that match the query specification.
2. The method of claim 1 wherein the objects are directory objects or data objects.
3. The method of claim 1 wherein the namespace interface includes a set functions for setting the value of an attribute with a specified name to a specified value.
4. The method of claim 3 wherein the setting includes when the object has no attribute defined with the specified name, adding an attribute with the specified name to the object.
5. The method of claim 1 wherein a data object includes non-attribute data.
6. The method of claim 1 wherein the namespace interface includes an interface for determining whether the object matches a query specification.
7. The method of claim 1 wherein an object is stored remotely and attributes of the object are cached locally.
8. The method of claim 1 wherein an object is a portion of a file system and the namespace interface serves as a wrapper for the file system.
9. The method of claim 8 wherein the portion of a file system includes directories.
10. The method of claim 1 wherein an object is an instantiated object in memory and the namespace interface serves as a wrapper for the in-memory object.
11. The method of claim 1 wherein the namespace interface can be used to retrieve references to other interfaces provided by an object.
12. The method of claim 11 wherein the other interfaces are customized to the type of data of the object.
13. A method in a computer system for generating a hierarchical view of a namespace, the method comprising:
- receiving a query specification and a view specification for the namespace;
- identifying objects of the namespace that match the query specification; and
- organizing the identified objects in a hierarchical manner as specified by the view specification.
14. The method of claim 13 wherein the view specification includes a list of attribute names that specify an attribute name for each level of the hierarchical organization of the identified objects, which indicates that the identified objects are to be organized based on attributes values for that attribute name at that level.
15. The method of claim 13 wherein the view specification is a tree structure of attribute names.
16. The method of claim 15 wherein the view specification indicates an attribute value corresponding to an attribute name.
17. The method of claim 13 wherein when the view specification indicates an attribute name for a level, the identified objects are organized based on their attribute values for that attribute name at that level.
18. The method of claim 13 wherein an attribute can be dynamically created for an object.
19. A method in a computer system for synchronizing a duplicate namespace with an original namespace, the method comprising:
- receiving a query specification and a view specification;
- identifying from the original namespace the objects that match the query specification;
- generating a duplicate namespace using the identified objects and the view specification;
- associating the query specification and view specification with the duplicate namespace;
- modifying one or more objects so that the original namespace and duplicate namespace are not synchronized;
- re-identifying from the original those objects that match the query specification; and
- modifying one or more objects so that the original namespace and duplicate namespace are synchronized.
20. The method of claim 19 wherein the modifying of the one or more objects so that namespaces are synchronized includes identifying differences between the re-identified objects and the objects of the duplicate namespace and reconciling those differences.
21. The method of claim 19 wherein the duplicate namespace is stored on a device that is only temporarily connected to the original namespace.
22. The method of claim 19 wherein the modifying of one or more objects so that the namespaces are not synchronized includes modifying an object of the duplicate namespace.
23. The method of claim 19 wherein the modifying of one or more objects so that the namespaces are not synchronized includes modifying an object of the original namespace.
Type: Application
Filed: Oct 31, 2007
Publication Date: Oct 9, 2008
Inventor: Edward Balassanian (Seattle, WA)
Application Number: 11/933,068
International Classification: G06F 7/06 (20060101); G06F 17/30 (20060101);