ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.


AddThis Social Bookmark Button

Replace those Shared Drives with Space Drives
Pages: 1, 2, 3

What are Space Drives?

Space drives provide an alternative or complementary technology to shares. They reflect the flow of information within your departments. Simply stated, a space drive is an index to content on the network, wherever it resides. It follows the natural flow of information from user to user; however, it does not attempt to force location or permanent ownership of content on a single entity. Space drives can go far beyond simply knowing where information is. They can be used to generate events and proactively alert you to changes in information or critical moments in the life cycle of a project or initiative. They are more "active" than simple shares. They create the foundation for building a collaborative workspace.

There are three primary components to the architecture of a workspace using space drives -- content, messaging, and workflow -- as shown in Figure 2.

Figure 2. Elements of space drives.

Content Index

The indexing component provides a simple mechanism to name and locate information on your network. Any member of the group can add an entry to the index. This will usually be a filename and a URL that points to the file on a server or your PC.

The content component allows you to download and view files in a peer-to-peer style of content exchange. You can publish a portion of your computer's directory to a shared space that is managed by the content service; therefore, you can add files -- although they remain on your PC -- to a shared repository. The content service maintains an index to all shared space drives. If you have given access to a file to another member in your group, that member can transfer your file to his local machine from your machine. In addition, all group members can share and exchange files located within the group shared space. The important point to note is the current version remains on the owner's PC, unless ownership is transferred. Therefore, the most recent changes to the file are always available. You can even monitor the progress of work as it's happening!

Content indexing involves recording the owner, the location, and the detailed shared space definition. A ContentMap captures the user ID, space ID, and location, defining a mount point on your local machine. The space ID is simply a name given to the space drive. A space drive is defined by a simple content map.

public class ContentMap implements Serializable {

    public String userId;
    public String spaceId;
    public String localPath;

    public ContentMap(String userId, String localPath, String spaceId) {
        this.userId = userId;
        this.localPath = localPath;
        this.spaceId = spaceId;

A user may define one or more space drives on their PC or any network-accessible machine. A share index maintains a list of content maps by user. Every shared space definition is added to the share index for that user. Every shared space has an owner. An owner is the user that initially defines or creates the shared space definition. A share index is also maintained for non-owned shares. These are the shares that you have been given access to by another share owner.

Content, such as files, images, etc., is assigned a content ID. Files are organized into sets. A combination of userId/spaceId defines a unique file set. A combination of userId/spaceId/contentId defines unique content in the workspace. Clients use the Content interface to identify and locate content. A simple interface is defined as:

public interface Content extends Serializable
   public String getLocation() throws RemoteException;
   public String getId() throws RemoteException;

The getLocation method returns a String URL and the getId returns a unique identifier. HTTP can be used to view and transfer files from any machine associated with a group member. Ownership is based on definition, and data can reside at the point of most recent use.

The following ContentAdapter interface is implemented to transfer any object implementing the Content interface to your local machine.

public interface ContentAdapter {

  public void transfer(Content from, Content to) throws 
                                 RemoteException, IOException;

  public URL createSource(Content content) throws 
                                 RemoteException, IOException;

  public FileOutputStream createDestination(Content content) throws 
                                 RemoteException, IOException;


Meta data can be associated with the space index entry to provide descriptive information and improve search capabilities. Default meta data can be generated to keep the system at an acceptable content-knowledge level. For example, many of the elements of Dublin Core Meta Data can be created programmatically, if not entered manually.

Pages: 1, 2, 3

Next Pagearrow