Wednesday, February 9, 2011

Connecting Open Wonderland to external services

I've been working on a tutorial about how to connect Wonderland to (and from) services on the Internet (webservices).

I am a big fan of REST so that's what I chose for the first tutorial that can be found in the community wiki.
The  code for the module can be found in my github account: REST sample module, and this is a screencast showing what you can expect from the module:

As per the utility of this module, as it stands it is quite limited, but what I am trying to show here is that it is very simple to connect to external sources, and in the same way that this very simple module sends information to be stored in an external database, other REST communication could be as easily programmed, be it integration with services such as twitter or facebook, or learning management systems such as moodle or sakai.

You can see some similar examples by Bernard Horan in Wonderblog and his youtube channel.

Client communication is not the only way that Open Wonderland can communicate with external services and I have started documenting this topic in this page. Please feel free to contribute; help will be much appreciated.


  1. Great Job !!!

    What about the opposite scenario ?
    A cell with a webservice or rest service

    I want to test a cell with a webservice endpoint to control it from outside world

    Any restriction to do this ?

  2. Hey Marlon, there are a couple of ways to do that.

    I'm afraid the REST service in a Cell would be a bit more involved, with a service running in the server and communicating with the Cell via messages. But no restrictions; Any JAX-RS application can work and can even be hosted in the glassfish instance that runs the webserver. So all the infrastructure is in place.
    I am working on a darkstar service too, but that is gonna take me a bit longer.

    Another way to do it is through scripting. The Component written by Morris has a servlet accepting external connections; you could control an NPC or any other kind of Cell through that.
    He was talking about abstracting that piece of code into its own module, so that could be handy!