Room management application

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Room management application

Karl Haas
Dear OpenSim users,

I'm an Austrian student and I'm writing my master's thesis about flexible learning environments in virtual worlds. The practical part of the work will be a web-based room configuration and reservation tool. The configured rooms (walls, chairs, tables, whiteboards, ...) should be generated automatically by the application within an OpenSim region.

I just started with OpenSim and I have read about Application Plugins, Region Modules (which i could use to create and manage the objects) and the REST features. I have some questions concerning the realisation in OpenSim:
  • What's are possible ways to communicate with an external service (e.g. the room manager)?
  • How can objects (chairs, tables, whiteboards, ...) be crated by scripting?
  • How can the content or the state of an object (e.g. whiteboards) be saved externally?
  • How can I save the state of an object immediately after it has been changed (e.g. whiteboard content modified)?
  • In order to create a RESTful API, would it be a suitable approach to extend the class RestPlugin?
  • Would it be an appropriate approach to write a region module, which creates and manages the rooms and the objects within the rooms?
Also links to useful information about the related topics would help me a lot.

Thanks for any hint in advance!

Best regards,
Karl Haas





_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Toni Alatalo-2
On Apr 29, 2011, at 10:34 AM, Karl Haas wrote:

Hi,

  • How can objects (chairs, tables, whiteboards, ...) be crated by scripting?
  • How can the content or the state of an object (e.g. whiteboards) be saved externally?
  • How can I save the state of an object immediately after it has been changed (e.g. whiteboard content modified)?
  • In order to create a RESTful API, would it be a suitable approach to extend the class RestPlugin?
  • Would it be an appropriate approach to write a region module, which creates and manages the rooms and the objects within the rooms?

I would do it as a region module, we've had good experience with those in a learning env project and others, where have made code that saves / loads / configures / generates etc. scenes.

This is also because I don't really know what e.g. application plugins are for :)

An example of a region module that creates a lot of objects and manages them afterwards is the automated software project visualization thing we made -- it creates everything based on the info it gets with http (xml-rpc and such) from github, google code bug tracker and buildbot build status.

For example this implements a 3d tree with branches that are added when branches are added to the git repo that the app is watching: http://code.google.com/p/rexprojectspace/source/browse/trunk/src/swsourcetree.py

Uses opensim scene api to create objects like this:
sog.RootPart.UpdateRotation(rexprojectspaceutils.euler_to_quat(0,0,90))

Uses a func from another module that does the new object creation with: 
sceneobjgroup = scene.AddNewPrim(
        root_avatar_uuid, root_avatar_uuid,
        pos, rot, OpenSim.Framework.PrimitiveBaseShape.CreateBox())

http://blog.knowsense.co.uk/blog/_archives/2010/12/20/4707937.html has a screenshot and video of that, all those objects are created and controlled by that region module.

Markus wrote it by using the opensim api doc as ref etc., said that didn't encounter probs really.

  • What's are possible ways to communicate with an external service (e.g. the room manager)?

Anything is possible, you can write whatever code in our module. Use everything that .net provides or other libs.

What would be best is a good question :)

What sort of communication do you need? Realtime two way stuff? With complex or simple data?

Something custom with a TCP socket, doing http polling xml-rpc / json style, using some existing realtime protocol .. lots of options.

Also one option is just running the whole room manager app in the opensim module, but have it expose a http/html ui to ouside too. Might be most straightforward, 'cause then you don't need to communicate over the net, but can just call the functions in the other parts of your system etc.

Karl Haas

~Toni


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

justincc
In reply to this post by Karl Haas
On 29/04/11 08:34, Karl Haas wrote:

> Dear OpenSim users,
>
> I'm an Austrian student and I'm writing my master's thesis about flexible learning environments in virtual worlds. The
> practical part of the work will be a web-based room configuration and reservation tool. The configured rooms (walls,
> chairs, tables, whiteboards, ...) should be generated automatically by the application within an OpenSim region.
>
> I just started with OpenSim and I have read about Application Plugins, Region Modules (which i could use to create and
> manage the objects) and the REST features. I have some questions concerning the realisation in OpenSim:
>
>     * What's are possible ways to communicate with an external service (e.g. the room manager)?

Hi Karl.  There are many ways, including communication out of scripts (via llHTTPRequest) and direct communication via
region modules.

>     * How can objects (chairs, tables, whiteboards, ...) be crated by scripting?

By scripting, this can be done via llRezObject().  There are many examples of this on the web, I'm sure.  Things can
also be created directly from region modules though this is currently a little tricky.  I don't know of any good example
public code but the regression test code might be worth looking at.

>     * How can the content or the state of an object (e.g. whiteboards) be saved externally?

If you're able to use Viewer 2 (though unfortunately there are some restrictions with this at present with OpenSim) then
the easiest way may be to use media on a prim to display whiteboard web pages from some external application that
synchronizes state between people looking at different webpages for the same whiteboard.

Alternatively, I think that the Immersive Education folks (http://immersiveeducation.org/) have a tool that enables a
whiteboard with older Second Life viewers, though I can't remember what the exact mechanism is.

>     * How can I save the state of an object immediately after it has been changed (e.g. whiteboard content modified)?

As before, by far the easier method is to use an existing synchronized whiteboard app if possible.

>     * In order to create a RESTful API, would it be a suitable approach to extend the class RestPlugin?

The RestPlugin has not been maintained for a long time, unfortunately, and is almost completely non-functional now,
afaik.  One would have to create ones own web services using the HttpServer facilities available in OpenSim.  If you
don't know the code, this probably isn't particularly simple though there might be public example code for this in the
coming months.  On a basic level, one could also look through the code that uses HttpServer in OpenSim, though none of
that implements much of a REST interface afaik.

>     * Would it be an appropriate approach to write a region module, which creates and manages the rooms and the objects
>       within the rooms?

Personally, I would recommend this approach if you're familiar with C# and don't mind spending quite a lot of time
looking through OpenSim code (and asking questions).  The advantage over scripts is that there are no delays or any need
to perform synchronization between operations that occur on different script engine threads.  Also, one gets to use all
the power of C# and a good IDE.  One can implement sophisticated applications this way without using scripts at all, or
one can use a hybrid script + region module approach.

The disadvantage is that the OpenSim internal 'APIs' are ad-hoc and often undocumented and little good example code yet
exists of writing these kinds of modules.

The advantage of scripts is that one can port them to other hosts without requiring server access.  And if one sticks to
LL functions then one can port them to Linden Lab's grid (though there are some gotchas due to subtle differences
between the XEngine script engine, the parser for LSL on OpenSim and the Linden Labs implementation of these things).
One can also take the approach of offloading as much logic to an external application as possible and using the
environment as just a view layer.  I suspect this is the approach that you're considering from your earlier questions.

>

> Also links to useful information about the related topics would help me a lot.
>
> Thanks for any hint in advance!
>
> Best regards,
> Karl Haas
>
>
>
>
>
>
> _______________________________________________
> Opensim-users mailing list
> [hidden email]
> https://lists.berlios.de/mailman/listinfo/opensim-users


--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Lindy (McKeown) Orwin
In reply to this post by Karl Haas
Hi Karl
Have you had a look at Kitely?
http://www.kitely.com

Might give you some ideasĀ  of another way of approaching the idea of preconfigured and book-able spaces.
More book a world that is preconfigured rather than configure the world on the fly.

Also the old Enterprise version of Second Life that is now off the market had the ability to hot swap region builds through a web interface. There might be something written about that.

I know this is not the very technical information you are looking for but the user interface is also an important part of this kind of effort and these two items might have some history that will inform your decisions.

Hope this helps
Lindy

aka Decka Mah in Second Life and OpenSim.



_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Toni Alatalo-2
In reply to this post by justincc
On Sat, 2011-04-30 at 00:59 +0100, Justin Clark-Casey wrote:
> also be created directly from region modules though this is currently a little tricky.  I don't know of any good example
> public code but the regression test code might be worth looking at.

Well the region module I pointed to is one example -- it is a bit tricky
indeed, dealing with the SOP/SOGs etc, but not awful.

> Personally, I would recommend this approach if you're familiar with C# and don't mind spending quite a lot of time
> looking through OpenSim code (and asking questions).  The advantage over scripts is that there are no delays or any need
> to perform synchronization between operations that occur on different script engine threads.  Also, one gets to use all

I think the biggest advantage of region modules over LSL is that the
application code can just have all the scene objects (walls of the room
etc) and all the functionality directly accessible, instead of making
multiple separated LSL scripts for the different parts and then using
chat messages for their interplay etc.

Markus managed by reading some example codes and the API docs, iirc
didn't ask questions nor complain much :)

> the power of C# and a good IDE.  One can implement sophisticated applications this way without using scripts at all, or
> one can use a hybrid script + region module approach.

If someone is wondering how the example I pointed to is a .py file, it's
because .NET is a multilang system so if you prefer something else to C#
there are alternatives. The API is the same, you're still just calling
the opensim code c# stuff directly, there are no bindings or anything
like that. Erno wrote a py regionmodule loader for opensim earlier and
Markus used it then for his module, the py module loader addon to
opensim is hosted by Melanie at
https://github.com/MelanieT/opensim-modules/tree/master/xpython
nowadays.

Is nice if you like py, and also has the advantage over current c#
region module system that getting your modified module to run doesn't
require restarting Opensim .. can just use a console command to reload
the py module. The repo has an example module, and we're happy to help
if someone else wants to use this,
https://github.com/MelanieT/opensim-modules/blob/master/xpython/bin/samplemodule.py

But C# is also a really nice lang, and indeed the good IDEs for it help
greatly in diving in the OpenSim code. I've used a C# IDE & py editor
side by side, IDE to explore the code, get tab-completion etc., and then
when find the right func, copy-paste it to the py app code, and reload
changed code to see it live running on Opensim :)

> The advantage of scripts is that one can port them to other hosts without requiring server access.  And if one sticks to
> LL functions then one can port them to Linden Lab's grid (though there are some gotchas due to subtle differences
> between the XEngine script engine, the parser for LSL on OpenSim and the Linden Labs implementation of these things).

Yep, region modules are an option only when you have direct server
access (and I think most practical when devving on a local server).

MRMs by Adam were an interesting effort to get kind a kind of a
scripting like toolset for region modules -- c# modules but in a safe
sandbox, with remote editing without access to server, and live reloads
that didn't require a server restart. I don't know if the old MRM stuff
is functional still, didn't find docs with quick googling and this blog
is not answering to me now .. http://www.adamfrisby.com/blog/tag/mrm/

~Toni

> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Opensim-users mailing list
> > [hidden email]
> > https://lists.berlios.de/mailman/listinfo/opensim-users
>
>


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Karl Haas
In reply to this post by Toni Alatalo-2
On 04/29/2011 05:53 PM, Toni Alatalo wrote:
On Apr 29, 2011, at 10:34 AM, Karl Haas wrote:

  • Would it be an appropriate approach to write a region module, which creates and manages the rooms and the objects within the rooms?

I would do it as a region module, we've had good experience with those in a learning env project and others, where have made code that saves / loads / configures / generates etc. scenes.

I think I will try to implement a region module which should manage all created objects.


  • What's are possible ways to communicate with an external service (e.g. the room manager)?

Anything is possible, you can write whatever code in our module. Use everything that .net provides or other libs.

What would be best is a good question :)

What sort of communication do you need? Realtime two way stuff? With complex or simple data?

Something custom with a TCP socket, doing http polling xml-rpc / json style, using some existing realtime protocol .. lots of options.

Also one option is just running the whole room manager app in the opensim module, but have it expose a http/html ui to ouside too. Might be most straightforward, 'cause then you don't need to communicate over the net, but can just call the functions in the other parts of your system etc.

I want to write an external service which manages all rooms of an organisation (just a proof of concept). It should be possible to connect also other virtual worlds or also a real world room management tool. The management service has to be able to send a room configuration to the OpenSim region module at a scheduled time (room reservation) and the region module has to send the content or position of the objects to the management service. It should be possible to save the state of the learning session for later continuation. Therefore I need a two way communication.

Thanks for your help!

Karl

Karl Haas

~Toni

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Toni Alatalo-2
On May 2, 2011, at 7:32 AM, Karl Haas wrote:
I want to write an external service which manages all rooms of an organisation (just a proof of concept). It should be possible to connect also other virtual worlds or also a real world room management tool. The management service has to be able to send a room configuration to the OpenSim region module at a scheduled time (room reservation) and the region module has to send the content or position of the objects to the management service. It should be possible to save the state of the learning session for later continuation. Therefore I need a two way communication.

This is actually quite interesting for us too, 'cause one of the parts of the TOY (open source) learning env thing we made last year (is just coming out for public now, and was piloted in some schools a few months ago) is exactly that there are pre-made room configurations (for splitting classes for group works etc), and saving scenes from sessions for continuation later. For saving we wrote a region module that utilizes the underlying save-xml2 functionality in Opensim (that is like OARs but without assets, so very light small saves of scene confs).

I'm not sure how I'd do that two way conn. HTTP of course has been fashionable for the past >10 years, and it would be possible to just make either side poll with that. But for realtime 2-way comms something over a TCP socket that stays open might be better, both faster and more reliable. That's why web browsers have now gotten websockets support too -- so that apps like gmail can better get notifications from servers, instead of doing periodic http polls.

One open source virtual world system that uses a persistent TCP connection from a management tool for a number of simulator services is the Overseer app in Metaverse 3d, http://www.mv3d.com/trac/wiki/StartYourOwnServer has screenshots. That GUI allows to select a configuration for a server, could be a room configuration, and launch servers with that content (template). After a server is launched, there is an always-on connection between the management tool and the sim, so the management GUI can show realtime info of the server load, number of users etc .. both sides can easily send whatever information is needed. The implementation uses the Twisted networking lib's Referenceable for remote function calls, so the managent gui can command the sim by saying things like self.subordinate.callRemote("startNewService", name, config) in http://www.mv3d.com/trac/browser/trunk/mv3d/tools/overseer/overseer.py#L883

If you only need the sim -> manager comms for the saving, and you need to save the full state of an opensim scene, I'd use that builtin xml saving to files and then just store/transfer those files. Could send the file over, e.g. with HTTP post, or with the possible custom TCP protocol somehow.

If there's some project page / plans for your tool, and if it becomes available as open source later, I'd like to keep posted .. perhaps we could utilize it, even. The guys have now been porting some of the TOY tools for Tundra too, there is a public demo server of that up actually .. if you wanna see how the lobby scene looks like, press 'try it' in http://www.realxtend.org/ (need Tundra 1.0.6 installed, the download button there points there). The floating round platforms in that public lobby are same/similar elements which we use for room configurations in the classroom spaces .. I put a screenshot of that scene, made for school kids originally, yesterday to http://wiki.realxtend.org/index.php/Getting_Started_with_Tundra . That instance is not running on opensim, but the same scene & tools as we have for opensim too .. so as you plan to allow usage of the config tool with any server, should work for Tundra usage as well (it supports modules, similar to region/app/whatever modules in Opensim, but no .net currently .. c++, python and javascript is what works now, can do http or custom tcp or whatever).

Karl

~Toni


Karl Haas

~Toni

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Karl Haas
On 05/02/2011 02:15 PM, Toni Alatalo wrote:
On May 2, 2011, at 7:32 AM, Karl Haas wrote:
I want to write an external service which manages all rooms of an organisation (just a proof of concept). It should be possible to connect also other virtual worlds or also a real world room management tool. The management service has to be able to send a room configuration to the OpenSim region module at a scheduled time (room reservation) and the region module has to send the content or position of the objects to the management service. It should be possible to save the state of the learning session for later continuation. Therefore I need a two way communication.

I'm not sure how I'd do that two way conn. HTTP of course has been fashionable for the past >10 years, and it would be possible to just make either side poll with that. But for realtime 2-way comms something over a TCP socket that stays open might be better, both faster and more reliable. That's why web browsers have now gotten websockets support too -- so that apps like gmail can better get notifications from servers, instead of doing periodic http polls.
I don't want to implement a polling mechanism - i think i will implement some kind of socket connection that stays open.

If you only need the sim -> manager comms for the saving, and you need to save the full state of an opensim scene, I'd use that builtin xml saving to files and then just store/transfer those files. Could send the file over, e.g. with HTTP post, or with the possible custom TCP protocol somehow.
I'm thinking about a solution that allows to continue the session within a different environment. Therefore i just want to store the size, the position and the content of objects. How to recreate the object should be up to the environment (e.g. the region module). I'm not sure which limitations and drawbacks this will cause, but the main goal of the work is to learn more about the available technologies.

If there's some project page / plans for your tool, and if it becomes available as open source later, I'd like to keep posted .. perhaps we could utilize it, even. The guys have now been porting some of the TOY tools for Tundra too, there is a public demo server of that up actually .. if you wanna see how the lobby scene looks like, press 'try it' in http://www.realxtend.org/ (need Tundra 1.0.6 installed, the download button there points there). The floating round platforms in that public lobby are same/similar elements which we use for room configurations in the classroom spaces .. I put a screenshot of that scene, made for school kids originally, yesterday to http://wiki.realxtend.org/index.php/Getting_Started_with_Tundra . That instance is not running on opensim, but the same scene & tools as we have for opensim too .. so as you plan to allow usage of the config tool with any server, should work for Tundra usage as well (it supports modules, similar to region/app/whatever modules in Opensim, but no .net currently .. c++, python and javascript is what works now, can do http or custom tcp or whatever).

Thanks for your input - i don't know yet how much i can implement within my master's thesis and if somebody will continue the project...


Karl

~Toni


Karl Haas

~Toni

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users
Reply | Threaded
Open this post in threaded view
|

Re: Room management application

Toni Alatalo-2
On May 2, 2011, at 10:26 AM, Karl Haas wrote:
I'm thinking about a solution that allows to continue the session within a different environment. Therefore i just want to store the size, the position and the content of objects. How to recreate the object should be up to the environment (e.g. the region module). I'm not sure which limitations and drawbacks this will cause, but the main goal of the work is to learn more about the available technologies.

i figure it'd be ok to do that with files -- is a fair requirement that the platform allows the env to be serialized. Opensim does that with oar/xml2, which used to be just automated .net serializations of the scene objects (iirc  Diva made a bit on top of that recently, to have control of the format to ease compatibility cross different opensim versions). Tundra has it as the txml & tbin formats. VastPark is all built on the file based scene format they have etc.

Thanks for your input - i don't know yet how much i can implement within my master's thesis and if somebody will continue the project...

Fair enough. I suspect even just how you view and analyze the requirements and design some toolset for working with the configs will be interesting .. at least if/when there's enough of an implementation that we can actually try it too :)

Have fun!

~Toni
Karl Haas

~Toni

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________ Opensim-users mailing list [hidden email] https://lists.berlios.de/mailman/listinfo/opensim-users

_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users


_______________________________________________
Opensim-users mailing list
[hidden email]
https://lists.berlios.de/mailman/listinfo/opensim-users