May 14, 2008
filed around lunchtime by DrScofield in: void
technorati tags:
QR code for this entry · average time to read 1:02 minutes

we are currently trying to figure out what the best approach for a REST “API” for regions is and would like to solicit comments :-)

currently the idea is to have a scheme as follows:

  • http://opensim.foobar.org:9000/admin/regions —
    • GET returns an array of (UUID, name, x location, y location, region’s REST URL)
    • POST would create a region
  • http://opensim.foobar.org:9000/admin/regions/4b787c46-1e3c-40ae-9494-2c924428f8e5/
    • GET would return detailed information about region
    • DELETE would delete region
    • PUT would update region information
  • http://opensim.foobar.org:9000/admin/regions/4b787c46-1e3c-40ae-9494-2c924428f8e5/name
    • GET would return name of region
    • PUT would update name of region
    • (similar for other region attributes if it makes sense)

current planning is to have this as an ApplicationPlugin level set of RestPlugins. an alternative would be to use region modules plus an ApplicationPlugin (for GET/POST on /admin/regions).

this applies to region (meta) data. the next question would be how to structure this for avatar information and also for stuff like inventory: something along the lines below?

  • http://opensim.foobar.org/admin/avatars
    • GET returns list of known avatars?
    • POST creates account?
  • http://opensim.foobar.org/admin/avatars/430f1da7-0e35-4c0f-985d-15046c077967/
    • GET returns detailed information about avatar?
    • PUT updates?
    • DELETE deletes?
  • http://opensim.foobar.org/admin/avatars/430f1da7-0e35-4c0f-985d-15046c077967/inventory/
    • GET returns inventory listing?
    • POST adds items to inventory?
    • DELETE deletes inventory items?
all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.
filed in the wee hours by DrScofield in: from the grid, void
technorati tags:
QR code for this entry · average time to read 1:04 minutes

we are currently looking at adding REST support to the RemoteAdmin plugin (other stuff to follow) — the idea being that we can get information about (as well as change state of) a running OpenSim instance not only via XmlRpc but also via REST.

looking at the way we currently deal with serialization we either

  • use LLSD where mandated by secondlife (e.g., CAPS)
  • use .NET’s System.Xml.XmlSerializer
  • use XmlRpc serialization (which goes back to System.Xml)

LLSD is being used by linden lab’s and is proposed by LL/SLAWG as the serialization protocol of choice (IIUC). in my opinion it suffers from being a bit verbose and not really easy to parse.

XmlSerializer is “built in”. on the other hand it’s wordy and more complex to parse; also, it doesn’t distinguish between the number 4711 and the string “4711″ — you have to know that a certain tag contains a string (or a number).

another alternative that has been suggested is JSON. JSON is lean, and easy to use from AJAX apps as well as python scripts (and the likes). it requires an additional DLL. it does however distinguish between strings and numbers. using a library like jsonexserializer — BSD license — makes it easy to use from C#.

personally, i’ve started to like JSON because it’s lean and easy to use — but i’d like to hear from you guys what you think about this. so, give it a vote!

which serialization format to use for OpenSim REST services?

  • JSON (78%, 18 Votes)
  • LLSD (13%, 3 Votes)
  • .NET native XmlSerialize (9%, 2 Votes)
  • ASN.1 (0%, 0 Votes)

Total Voters: 23

Loading ... Loading ...
all content posted on these pages is an expression of my own mind. my employer is welcome to share these opinions but then again he might not want to.