XMLRPC in Sloodle

From SLIS Second Life Wiki

Jump to: navigation, search

NOTE: the implementation of XMLRPC in Second Life is experimental. Sloodle will be reducing its use of this technology for Sloodle 0.3.

Contents

What is XMLRPC?

XMLRPC stands for "Extensible Markup Language Remote Procedure Call", and it is a way in which a system can send information or control resources on another system. You can read more about this in Wikipedia's XMLRPC article.

XMLRPC in Second Life

An LSL script in Second Life can open an XMLRPC 'channel' (also known as a remote data channel) which can be used to recieve XMLRPC messages. The channel is identified by a UUID, so the script must also send this UUID to any server which needs to use it. You can read more on this in the LSLWiki's XMLRPC article.


How Sloodle uses it

Object Authorization

The Moodle site uses XMLRPC to send the object-specific session key during Object Authorization. Objects use this key to prove that they are authorized to communicate with the Moodle site.

Object Distribution

The Sloodle Object Distributor opens an XMLRPC channel when it establishes a connection with the Moodle site. Whenever somebody uses the Moodle Distribution Interface, or the Sloodle Object Selector, the Moodle site will send the Distributor an XMLRPC message indicate which object to distribute to which avatar.

Avatar Registration

When an avatar is registered, the Moodle site can send a registration confirmation message to the object in-world which initiated the registration (such as the Sloodle Registration Booth). In practice, however, this is rarely used. (The only object which currently uses it is the Sloodle Set during initial configuration).


Communications Format

Sloodle messages sent across an XMLRPC channel follow the standard Sloodle communications specification, just like HTTP responses. However, due to the way in which Second Life handles the messages, all newline characters must be further escaped by an additional back-slash, otherwise they will be completely removed which can make a message ambiguous or unreadable. (The double-escaped newline characters should appear as "\\n" instead of "\n").

XMlRPC in OpenSim

(By BlueSade)

In SecondLife, the xmlprc is handled by a gateway cgi program. So, all xmlrpc capable objects can be addressed from the single entry point at http://xmlrpc.secondlife.com/cgi-bin/xmlrpc.cgi . In OpenSim, there is no central gateway for this on a grid. Each region is responsible for communications on this channel. So, you end up with something like: http://myregion.org:21800 for each region a device is on.

So, the Sloodle backend will need to track the URI for each device deployed to be able to initiate communications with it. And the Sloodle objects will need a way to determine the URI when they are deployed so they can pass it to the backend with it is authorized or configured. Currently the SLOODLE Vendor object is the only one that uses xmlrpc.

This page is part of the Sloodle documentation
SloodleDocs Home | User Documentation | Administrator Documentation | Developer Documentation | Sloodle Wiki Home
Personal tools