Elastic Wonderland

We first came across Jeff Eastman on the Wonderland forum where he (as jdogsailing) chronicled his efforts to get Wonderland running on the Amazon EC2 cloud.  Recently, we had the opportunity to meet Jeff in person, and he kindly agreed to share his perspective on virtual worlds and also his recipe for starting a Wonderland server on EC2.  Read on for details.


Elastic Wonderland

I’ve been interested in 3d computer graphics since graduate school when I helped build the NCSU Computer Graphics Lab. Way before the cost of RAM had dropped enough to allow the construction of real time 3d frame buffers, we had a Varian 620 minicomputer that did hidden surface removal and shading to produce run-length encoded scan line segments that we squirted onto a 3-channel video disk to produce 3d images on a Sony TV screen. For many years, this system was the fastest 3d rendering platform around. We could completely render a scene composed of 200 polygons in about 30 seconds. How times have changed.

Hundreds of hours of D&D and Adventure later I was working with a small team at HP Laboratories in the mid ’80s. There  we built an immersive, 3d, virtual office environment in Lisp on an HP desktop system that had a 2d frame buffer and about 10mb of RAM. The project was based upon the ideas that fantasy role-play games and 3d virtual environments provided a strong metaphor for organizing and manipulating information in a distributed computer system. The environment had human avatars and NPC agents that could follow simple, rule-based instructions. It was, at the same time, populated with paper,  pencils, typewriters, calculators and file cabinets of a serious office mission and also the swords, daggers, treasure and scrolls of a fantasy adventure game. The agents could be serious, helpful creatures to find and deliver for you or they could be malevolent monsters bent upon your destruction. Of course, we had to keep them somewhat separated for political reasons, but the 3d metaphor was adequate to contain them all and there was only an artificial separation between the populations.

Today we have Second Life, a massively parallel, multiplayer 3d virtual reality in which the lines between fantasy role-play and serious endeavor are completely invisible. In SL, I can smoothly move between a serious customer presentation about Sun’s Eco Datacenters and a fantasy castle where I assume the shape of a white dragon to engage in mortal combat with its inhabitants. At the recent Virtual Edge 2009 conference in Santa Clara, Second Life’s Chris Collins reported they now have over 2 billion square meters of virtual real estate in SL organized into 27,000+ regions with 650,000 active users spending 44 million hours per month online. They have over two billion user-created objects in their universe which takes up 230 terabytes of storage. Chris reported an astounding $1.6 million dollars worth of goods and services change hands in Second Life every day.

Though fully immersive 3d technology is just beginning to appear in the commercial world, the Virtual Edge conference was sponsored by virtual event companies InXpo, On24, UnisFair, Virtual U and iCongo Live that were promoting Virtual Trade Shows, Virtual Offices and Virtual Universities. The physical conference itself was augmented by virtual attendees and presenters using Virtual U’s immersive 3d technology based upon the Active Worlds platform. Today’s virtual events are mostly limited to 2d renderings of 3d scenes by the available browser technology but this situation will change soon. Once true 3d model rendering is available as a browser plug-in, the entire web is poised to become 3d. When this happens there will be huge explosion in the data and server capacity required to support it.

Today I’m pursuing a business opportunity involving the use of immersive virtual reality and I’ve encountered Project Wonderland while investigating the available platforms. I’m still a Wonderland noob, but as a fan of open source and an Apache Mahout committer I can see how it could offer a serious and viable alternative to the other proprietary VR platforms on the market today. My involvement with Mahout and Apache Hadoop has necessarily led me to become a user of Amazon’s Elastic Compute Cloud (EC2). It’s tough to justify the purchase of a dozen computers just to run a couple Mahout clustering jobs so EC2’s on-demand computing platform was a natural choice when I needed a Linux server to bring up Wonderland for a test drive. The process itself was rather straightforward but there are some details that need to be done correctly in order for the deployment to function fully, especially the voice bridge.

The age of cloud computing is upon us, and Amazon is a major player in the infrastructure-as-a-service component of the cloud. EC2 has been around for a couple of years and is growing rapidly in use. Apache Hadoop is an open source implementation of the Google Map/Reduce and BigTable platforms which can now sort a petabyte in a little over 16 hours. It has had direct EC2 support for a little over a year and Amazon has recently introduced Elastic Map Reduce using the Hadoop platform. As immersive virtual reality makes it into the main stream and the web adds an important new spatial dimension, its not hard for me to imagine Amazon offering Elastic Wonderland not far down the road.

Bringing Up Wonderland on EC2

If you have never used EC2 I highly recommend Amazon Web Service’s excellent tutorial. This will give you step-by-step instructions on starting up your first EC2 instance and is a necessary prerequisite for the other steps that follow. Once you have successfully created an AWS account, installed the EC2 tools and created your security key-pair you will have everything you need to bring up a Wonderland server instance.

  1. Make sure you have defined a security group (default is ok as below) and have configured the following ports:
    • ec2-authorize default -P tcp -p 22
    • ec2-authorize default -P tcp -p 80
    • ec2-authorize default -P tcp -p 1139
    • ec2-authorize default -P tcp -p 4848
    • ec2-authorize default -P tcp -p 5060
    • ec2-authorize default -P tcp -p 6666
    • ec2-authorize default -P tcp -p 6668
    • ec2-authorize default -P tcp -p 8080
    • ec2-authorize default -P udp -p 5060
    • ec2-authorize default -P udp -p 6666
    • ec2-authorize default -P udp -p 6668
    • ec2-authorize default -P udp -p 10000 12000
  2. Go to your AWS Console
    • Click the EC2 Tab
    • Sign in
    • Select Launch Instances with the following attributes:
      • select Getting Started on Fedora Core 8 AMI
      • 1 small [keypair] [group]
    • Select the Elastic IP tab
      • allocate one elastic IP
      • associate with your new instance
  3. Access your public URL in a web browser and you should see:
    Congratulations! You’ve successfully launched the EC2 Getting Started AMI.
  4. Now access it by your static IP just to check:
    Congratulations! You’ve successfully launched the EC2 Getting Started AMI.
  5. Now log in to your server using your elastic IP (e.g. ssh id_rsa-gsg-keypair root@[your Elastic IP])
    • install the Java 6 JDK
      • # wget -nv -O java.bin http://%5Bjdk 6 URL]
      • # sh java.bin
      • # mv /usr/local/.
      • # cd /usr/local
      • # ln -s java
    • set up environment variables
      • # cd
      • # vi .bashrc
        export JAVA_HOME=/usr/local/java
        export PATH=$JAVA_HOME/bin:$PATH
      • #. .bashrc
      • # java -version (verify java is working)
    • install Subversion and Ant
      • # yum -y install ant subversion
      • # yum -y clean all
    • check-out and build Wonderland dev5 tag then run it
  6. Now open a browser on your new wonderland server on EC2, port 8080 (you should see the wonderland welcome page)
    • click here to access server administration.
      • edit Voice Bridge
        add voicebridge.first.rtp.port=10000
        add voicebridge.last.rtp.port=10200
        add voicebridge.server.public.address=[your Elastic IP]
        add voicebridge.server.public.sip.port=5060
        change voicebridge.status.listeners=[your Elastic IP]:6668
        change voicebridge.local.hostAddress=[your Private IP]
      • click Manage Snapshots
        make celltest-wfs current (ok to restart server)
      • click Home
    • click Launch Wonderland
  7. The client should start (click Trust) and you should be able to hear the singing teapot if you walk near it.
Advertisements

3 Responses to Elastic Wonderland

  1. Morris says:

    I would be interested in a cost breakdown of the work you did.

  2. Jordan Slott says:

    Just a note about the instructions above, as I am trying it out.
    For Step 2, it seems Amazon tweaked the Web UI since these instructions were written.
    Once you are at the EC2 console, click "EC2 Dashboard" on the left hand-side navigation bar. You should see a "Getting Started" section, then click the "Launch Instances" button. The rest of the instructions should remain the same.

  3. Jordan Slott says:

    Also, for Step 5, getting JDK 6 on the machine, I had to visit the JDK 6 download page with my web browser on my local machine (you can start at java.sun.com and get there), and get to the point where it gave me a download link for Linux. I copied the URL for that link to use for the wget command.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: