Using XML to Configure Groove
July 11, 2001
This article examines the use of XML to configure custom applications for Groove, a peer-to-peer groupware platform.
One of the most promising applications of peer-to-peer technology intended to enhance online collaboration is Groove, the P2P platform of Groove Networks. Groove announced the general availability of its flagship product earlier this year, and since that time there's been quite a bit of attention drawn to the Beverly, Massachusetts technology company. Led by Lotus Notes pioneer Ray Ozzie, the company has raised $60 million of funding to develop and market its collaboration platform.
Unlike P2P applications that focus on file sharing or distributed computing, the Groove platform focuses on sharing integrated workspaces among corporate users. Groove users can set up secure workspaces to collaborate on projects by accessing corporate databases, sending instant messages, or browsing the Web together.
Generally the response to the technology has been favorable, but at this point it lacks the custom applications needed for acceptance. Its impressive standard capabilities allow users to send voice messages, share documents, and synchronize offline users, but it cannot be used in many organizations without additional development. However, using Microsoft's Component Object Model (COM), Groove offers an appealing option for many companies wanting to improve the online collaboration capabilities of their content management, customer relationship management, or supply chain systems.
Realizing that adoption of the technology is dependent on vendors developing applications that use its collaboration platform, Groove Networks has partnered with several technology companies, who in turn have customized the platform to meet the specific needs of their clients.
Groove provides a set of code samples and API documentation to help developers who want to begin building Groove tools, which are custom applications designed to work within the Groove platform. Programmers can quickly develop collaborative P2P applications by creating these tools with the Groove Development Kit (GDK).
This process of "injecting" tools into the Groove platform involves four steps.
- Create a Groove Injector file that points to a URL, which contains information about
tools to be injected into the Groove environment. These XML files typically have a
GRVextension, which is associated with the Groove application upon installation. This allows users to double-click on injector files to automatically add tools to their system.
- Create an Open Software Description (OSD) file, which is linked to the Groove Injector file. OSD files tell Groove where to find the tool description and tool templates, both of which are required to inject a tool.
- Create a Tool Descriptor file, which contains metadata about the Groove tool (name, version, author, and so on).
- Create a Tool Template file, which is identified by a
TPLextension, catalogs all of the application components required to execute the tool. These files often contain scripts that can control the application components once they are loaded.
Once developers master the process of injecting Groove tools by manipulating these XML configuration files, they can concentrate on building their application. For the purpose of demonstration, an XML Example tool was developed using three standard Groove layout components: ViewContainer, HTMLLayout, and Static Label. This tool does nothing other than define a canvas to display a simple text message. Nevertheless, it provides a good starting point to learn how to develop more advanced Groove tools.
What follows are descriptions of each of the XML configuration files required to inject the XML Example tool into the Groove environment.
Injector File: XMLExample.grv
Although injector files can be used for other purposes, such as sending invitations to shared workspaces, XMLExample.grv (shown below) is configured to provide all of the information necessary to inject the XML Example tool into a user account. This file is interpreted by Groove and identified as tool message through the MessageType attribute of the MessageHeader element. Its main objective is to pass the appropriate tool TemplateDescriptorURL to Groove, by pointing to the tool's OSD file as shown in bold below.
Groove Injector File -- XMLExample.grv
<?xml version='1.0'?> <?groove.net version='1.0'?> <g:fragment xmlns:g="urn:groove.net"> <g:InjectorWrapper AccountGUID="grooveIdentity:///DefaultIdentity" MessageID="d7g4v4pbmpqdu2wk6bs3hsvqsx4meamiwtk6s7c" ResourceURL="grooveIdentityMessage:///ToolMessage;Version=3,0,0,0" LocalDeviceURLs="Injector"> <g:IdentityMessageHeader> <g:MessageHeader MessageType="ToolMessage" MessageID="d7g4v4pbmpqdu2wk6bs3hsvqsx4meamiwtk6s7c" Version="1,0,0,0" CreateTime="9/24/00 7:41 PM" CreatorDeviceURL="dpp://friends.groove.net/0sGnePZSnu-AY-fe PpNqEqzwSOPo9910"> <g:SenderContact/> <g:RecipientContact/> </g:MessageHeader> <g:MessageBody BodyName="MessageBody"> <g:ToolMessage> <g:ToolMessageHeader ToolURL="grooveAccountTool:;CategoryName=grooveToolCategory:// Account/ToolTemplateList,ComponentName=ToolTemplateList"/> <g:ToolMessageBody> <g:TemplateDescriptorList> <g:TemplateDescriptorURL URL="http://www.dakotasystems.net/Groove/XMLExample/ XMLExample.osd?Package=net.dakotasystems.Groove.XMLExample.XMLExample_ XML&Version=0&Factory=Open"/> </g:TemplateDescriptorList> </g:ToolMessageBody> </g:MessageBody> </g:ToolMessage> </g:IdentityMessageHeader> </g:InjectorWrapper> </g:fragment>
Once users click on the XMLExample.grv file, Groove follows the
TemplateDescriptorURL to access XMLExample.osd, which is used to find
the tool description (XMLExample.xml). Groove then registers the tool in the current
user account, as shown below.
Open Software Description File: XMLExample.osd
The XMLExample.osd file shown below is used, when the injector file is processed, to
deliver the tool descriptor file (XMLExample.xml) to the user account injecting the
tool. The instructions to complete this task are provided within the content of the
SOFTPKG element. The tool descriptor file is identified by the
CODEBASE element, and the processing instructions are provided by the content
of the Implementation element, namely the
elements. Once the tool descriptor file is copied into a user account, it can be added
This file is accessed a second time when users add the XML Example tool to a shared
workspace for the first time. The second
SOFTPKG element is used to locate the
tool template file (XMLExample.tpl). Tool templates contain information about the
application components that make up the tool. Consequently, they are parsed and imported
into the Groove environment rather than just copied like tool descriptor files. However,
instructions for this processing are contained within the content of the Implementation
Groove OSD File -- XMLExample.osd
<g:Document Name="XMLExample.osd" xmlns:g="urn:groove.net"> <!-- NOTE: Case sensitivity is important for directory/file names --> <SOFTPKG NAME="net.dakotasystems.Groove.XMLExample. XMLExample_XML" VERSION="0,0,0,0"> <TITLE>XML Example</TITLE> <IMPLEMENTATION> <LANGUAGE VALUE="en"/> <CODEBASE HREF="http://www.dakotasystems.net/Groove/ XMLExample/XMLExample.xml"/> <g:Install Type="Copy" TargetDir="$GROOVEDATA$\XML Files"/> <g:Factory Name="Open" Type="Temporary XML Document" Filename="$GROOVEDATA$\XML Files\XMLExample.xml"/> </IMPLEMENTATION> <DEPENDENCY> <SOFTPKG NAME="net.dakotasystems.Groove.XMLExample. XMLExample_TPL" VERSION="0,0,0,0"> <IMPLEMENTATION> <LANGUAGE VALUE="en"/> <CODEBASE HREF="http://www.dakotasystems.net/Groove/ XMLExample/XMLExample.tpl"/> <g:Install Type="Import To XSS" DatabaseURI="$TEMPLATESURI$" DocumentName="XMLExample.tpl" SchemaURI="$DEFAULTSCHEMA$"/> <g:ComponentURLProvider ProgID="Groove.TemplateParser" DatabaseURI="$TEMPLATESURI$" DocumentName="XMLExample.tpl" Argument="XMLExample.tpl" DocumentType="Template"/> <g:Factory Name="Open" Type="XML Document" DatabaseURI="$TEMPLATESURI$" DocumentName="XMLExample.tpl"/> </IMPLEMENTATION> </SOFTPKG> </DEPENDENCY> </SOFTPKG> </g:Document>
Those familiar with the OSD NOTE, submitted to the W3C by Microsoft and Marimba in 1997, will notice that, although similar, Groove's implementation of OSD differs slightly as it allows for finer granularity; it identifies software components, not just software packages.
Descriptor File: XMLExample.xml
The descriptor file shown below provides all the necessary information to register the XML Example tool in the Groove environment. Not only does this file contain basic tool metadata, like as name, description, author and version, but it also points to the OSD file that stores the location of the tool template, which is accessed when a tool is first added to a shared workspace.
Groove Descriptor File -- XMLExample.xml
<g:Document Name="XMLExample.xml" xmlns:g="urn:groove.net"> <g:TemplateDescriptorList> <g:TemplateDescriptor Name="XML Example" LongName="XML Example" Category="\groove\starter" Description="XML.com Groove Example" Author="Brian Buehling" HelpAbout="Created by Dakota Systems Inc., Copyright 2001" ReleaseDate="July 2, 2001" Version="0,0,0,0" Type="Tool" ResourceURL="http://www.dakotasystems.net/Groove/XMLExample/ XMLExample.osd?Package=net.dakotasystems.Groove.XMLExample. XMLExample_TPL&Version=0&Factory=Open"/> </g:TemplateDescriptorList> </g:Document>
Tool Template: XMLExample.tpl
The tool template shown below defines each of the components that make up the XML
tool. These components are COM objects that implement Groove's
interface, and they represent the building blocks of all Groove tools. Groove components
either provided as part of the standard platform, like the ones in this example, or
developed independently. In either case they have to be explicitly defined in each
template. The XML Example tool defines a
Static component named
Groove Tool Template -- XMLExample.tpl
<g:Document Name="XMLExample.tpl" xmlns:g="urn:groove.net"> <g:ToolTemplate DefaultToolDisplayName="XMLExample" Name="XMLExample.Tool" TemplateDisplayName="XMLExample"> <g:ViewInfo Lifetime="Limited"/> <g:ComponentGroup DefaultView="YourViewContainer"> <g:Component Name="YourViewContainer"> <g:ComponentResource URL="http://components.groove.net/ Groove/Components/Root.osd?Package=net.groove.Groove.ToolComponents. GrooveCommonComponents_DLL&Version=0&Factory=ViewContainer" FingerprintID="Groove"/> <g:PropertyList Version="1"> <g:Property Name="Background"> <g:BackgroundStyle Style="SectionBackground"/> </g:Property> </g:PropertyList> <g:ComponentConnections> <g:Connection ConnectionID="0" Name="YourLayout"/> </g:ComponentConnections> </g:Component> <g:Component Name="YourLayout"> <g:ComponentResource URL="http://components.groove.net/ Groove/Components/Root.osd?Package=net.groove.Groove.ToolComponents. GrooveCommonComponents_DLL&Version=0&Factory=HTMLTableLayout" FingerprintID="Groove"/> <g:PropertyList Version="1"> <g:Property Name="Layout"> <g:PropertyValue> <TABLE CELLPADDING="2"> <TR> <TD HEIGHT="30" WIDTH="100%"> GrooveLabelComponent </TD> <TD/> </TR> </TABLE> </g:PropertyValue> </g:Property> </g:PropertyList> </g:Component> <g:Component Name="GrooveLabelComponent"> <g:ComponentResource URL="http://components.groove.net/Groove/ Components/Root.osd?Package=net.groove.Groove.ToolComponents. GrooveCommonComponents_DLL&Version=0&Factory=Static" FingerprintID="Groove"/> <g:PropertyList Version="1"> <g:Property Name="Style" Value="Normal"/> <g:Property Name="HAlignment" Value="Center"/> <g:Property Name="BreakType" Value="WordBreak"/> <g:Property Name="Label" Value="XML Example Tool"/> <g:Property Name="FontStyle" Value="LabelText"/> </g:PropertyList> </g:Component> </g:ComponentGroup> </g:ToolTemplate> </g:Document>
Injecting the XML Example Tool
The XML Example tool can be injected into a shared workspace by following these steps.
Following Groove's installation instructions, download and install Groove.
Adjust the Groove registry settings to allow for injecting tools with unsigned components:
[HKEY_LOCAL_MACHINE\SOFTWARE\Groove Networks, Inc.\Groove\Development]
Note: This setting only should be activated when testing or developing components from trusted sources. To restore component security, remove this registry setting.
Following Groove's user documentation, create a user account and shared workspace to test the XML Example tool.
Download the injector file.
Double click this file to start the injection process. In some cases this process will begin automatically. After injected, the XML Example tool should be listed in the "Add Tool" tab as shown below.
Add the tool to a shared workspace using the "Add Tool" tab. Once added, the tool should appear as shown in Figure 2.
Groove offers an interesting alternative for developers wanting to create advanced collaboration applications without worrying about many of the complicated aspects of developing distributed applications, such as synchronization, security, and data storage.
With a little work upfront to understand the platform's architecture and configuration rules, developers have access to many sophisticated features like VOIP messaging and shared web browsing. Whether Groove becomes the next application to find a permanent home on corporate desktops along with word processors, web browsers, and email applications is yet to be seen. However, what is certain is that the ultimate success of Groove Networks depends heavily on how quickly customized systems are developed and implemented in real business settings.
The XML configuration files discussed in this article can be downloaded using the following links:
For more information about developing Groove tools, visit the following resources.