The Glassfish Web Server that is built into Open Wonderland is already extensively used to administer the Wonderland virtual world server. For example, it’s responsible for providing the first page you see when you point your web browser at an Open Wonderland installation. When you click on the ‘Launch’ link, it provides the Java Web Start functionality, and when you click on the ‘Server Admin’ link it provides you with the list of tasks to manage various aspects of the server, such as placemarks, WebDAV content and user groups.
The Open Wonderland Module Warehouse is now becoming more populated with examples that extend the behaviour of the client or the virtual world server by the addition of extra cells or plugins. But what about extending the behaviour of the web server?
One of the features we want to introduce as part of the +Spaces project is to use web services as a means of controlling the behaviour of the virtual world server. As a simplified demonstration, we’ve created a Web-based Poster Module that provides users with a web page for editing and deleting the contents of wonderland poster objects. It is installed just like a regular Wonderland module, but doesn’t show up anywhere on the client or the server. Instead, it causes an extra option to be added to the list of tasks on the Wonderland Server Admin web page: Manage Posters.
The following video provides an example of it in use.
The code to develop the module borrows extensively from the core xapps-config module (in
wonderland/modules/tools/xapps-config) and the module itself is available to download from the Module Warehouse. The source for the module is also available from the public +Spaces SVN repository (details below).
One significant difference between this module and the xapps-config module is that no authentication is required to manage the posters. For the purposes of an example, this is OK; however, for more information about authentication, take a look at the source code for the xapps-config module.
Since my last posting on example polling apps, I’ve uploaded the modules to the Module Warehouse. The source for them is also available from the +Spaces SVN repository.
Accessing the +Spaces SVN Repository
The instructions to access the +Spaces SVN repository are very similar to those for accessing the additional Open Wonderland modules. The requirements are identical: you must have first downloaded and compiled the Open Wonderland source, following these instructions. I’m going to follow the example of the tutorial and assume that you have checked out the core wonderland workspace and the wonderland-modules workspace into a directory named
~/src/trunk. Below, you will create the +Spaces wonderland modules as a sibling to both the core wonderland workspace and the wonderland-modules workspace (that is, both directories have the same parent directory in the file system).
Inside a terminal window, execute the following commands:
% cd ~/src/trunk % svn checkout http://gforge.grid.ece.ntua.gr/svn/spacespublic/trunk/UEssex/wonderland-modules +spaces-modules
This will create a directory called +spaces-modules that is a sibling to the wonderland and wonderland-modules directories. At the moment, the +spaces-modules directory contains only four modules: three of the polling demos and the poster control module described above.