[Opensim-users] Loading regions configuration from a webserver...

Justin Clark-Casey jjustincc at googlemail.com
Mon Jun 2 18:03:54 UTC 2008


Thanks for posting the results of your experimentation Olish.

Don't worry about the mantis - I'll pop the information in within 
OpenSim.ini.example.  What would be really helpful is if you could 
document this on the opensimulator wiki somewhere.

Just as a small clarification, the default region_info_source will be 
'filesystem' to preserve the current behaviour.  This is also the value 
used if no region_info_source is present at all.


Olish Newman wrote:
> Hello !
> 
> I experimented the region web loader. To resume, here is how it works :
> 
> We have to set this 2 switches in OpenSim.ini as Justin said :
> 
> *region_info_source = "web"
> regionload_webserver_url = "http://mywebsite/regions.php"*/
> 
> /And the file format must be as described below :
> (an XML <Region> node containing as much <Root> nodes as you have regions
> in the simulator : <Root> nodes are similar to default.xml region files)
> 
> *<Regions>
> *
> 
>     *<Root>*
>     *<Config sim_UUID="b19966b7-6264-4e1f-ade8-b4ebca894e74"
>     sim_name="My Island 1" *
>     *sim_location_x="1001" sim_location_y="1000"
>     internal_ip_address="0.0.0.0" *
>     *internal_ip_port="9000" allow_alternate_ports="false" *
>     *external_host_name="127.0.0.1"
>     master_avatar_uuid="00000000-0000-0000-0000-*
>     *000000000000"
>     estate_covanant_uuid="4a439117-d3f1-417f-9d8c-7c466c298f7e" *
>     *master_avatar_first="Test" master_avatar_last="User"
>     master_avatar_pass="Password" />*
>     *</Root>
> 
>     **<Root>*
>     *<Config sim_UUID="b19966b7-6264-4e1f-ade8-b4eb7a894ee4"
>     sim_name="My Island 2" *
>     *sim_location_x="1000" sim_location_y="1000"
>     internal_ip_address="0.0.0.0" *
>     *internal_ip_port="9001" allow_alternate_ports="false" *
>     *external_host_name="127.0.0.1"
>     master_avatar_uuid="00000000-0000-0000-0000-*
>     *000000000000"
>     estate_covanant_uuid="4a439117-d3f1-417f-9d8c-7c466c298f7e" *
>     *master_avatar_first="Test" master_avatar_last="User"
>     master_avatar_pass="Password" />*
>     *</Root>*
> 
> *</Regions>
> *
> Imagine you want to manage your regions through a web interface, this allows you to tell
> your simulators which region to run.
> 
> I can file a mantis to ask to add these switches if it could be useful to add them.
> Many thanks for your help !
> 
> Kind regards,
> Olish Newman.
> 
> 
> 
> Olish Newman a écrit :
>> Justin Clark-Casey a écrit :
>>   
>>> Olish Newman wrote:
>>>   
>>>     
>>>> Hello !
>>>>
>>>> I'm not sure, but is it possible to load a region config file 
>>>> (/Regions/default.xml) from a webserver. Does one of the command line 
>>>> option for the opensim.exe is used for this ?
>>>> -config or -configfile or another ?
>>>>     
>>>>       
>>> Curiously, there is a mechanism for this but I've never seen it used. 
>>> The code is contained in the OpenSim.Framework.RegionLoader.Web 
>>> namespace.  To make OpenSim use this rather than the usual file loader 
>>> it looks like one would need to set something like
>>>
>>> region_info_source = "web"
>>> region_webserver_url = "http://site/your-region-file.xml";
>>>
>>> in OpenSim.ini (neither of these switches appear in OpenSim.ini.example)
>>>
>>> The xml file itself would contain all the usual region xml, but that 
>>> would be wrapped up in a <Regions> tag (rather than the <Root> tag, I 
>>> suspect).  However, I'm purely guessing from just reading the code.
>>>
>>> I'm not sure how much this is supported or whether it even works 
>>> currently.  I'm interested Olish, could you explain further how this 
>>> would make things easier to manage?
>>>   
>>>     
>> Thanks for the informations Justin :)
>>
>> In fact, using a webserver to tell simulators which regions to run can
>> be very useful because a webserver with PHP can dynamically tell each
>> simulator which region to run or not, and on which server.
>>
>> As an example, I can have many servers hosting simulators. If I want to
>> host a simulator on another server, or if I want a region to be hosted
>> on another simulator, I can just tell on which server I want them to be
>> hosted, and an automation script made with PHP + Cron (PHP because it is
>> multiplatform) can make an opensim instance to be installed, then
>> configured, then started with its region file pointing to a 
>> PHP file that would return the region config file according to which regions
>> I want to run on this simulator...
>>
>> I hope I am clear enough on my explanations :s
>>
>> There are surely many applications possible using such methods...
>>
>> This week, I will start to develop some PHP application melting Cron,
>> RemoteAdmin, and region files hosted on a webserver to make an exapmple
>> and show the result. ;)
>>
>>
>> Kind regards,
>> Olish.
>>
>>
>>   
>>> Also, is anybody currently using this facility?  Would this be a 
>>> generally useful facility for other people too?
>>>
>>>   
>>>     
>>>> As an example, a region config file is hosted on a local webserver at 
>>>> http://localhost/myfile.xml and this file could be :
>>>>
>>>> <Root>
>>>>   <Config sim_UUID="b19966b7-6264-4e1f-ade8-b4ebca894ee4" sim_name="My 
>>>> Island" sim_location_x="1000" sim_location_y="1000" 
>>>> internal_ip_address="0.0.0.0" internal_ip_port="9000" 
>>>> allow_alternate_ports="false" external_host_name="127.0.0.1" 
>>>> master_avatar_uuid="00000000-0000-0000-0000-000000000000" 
>>>> estate_covanant_uuid="4a439117-d3f1-417f-9d8c-7c466c298f7e" 
>>>> master_avatar_first="Test" master_avatar_last="User" 
>>>> master_avatar_pass="Password" />
>>>> </Root>
>>>>
>>>> This way it would be easier to manage.
>>>> Any help is much appreciated. Thanks in advance. :)
>>>>
>>>> Kind regards,
>>>> Olish.
>>>> _______________________________________________
>>>> Opensim-users mailing list
>>>> Opensim-users at lists.berlios.de
>>>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>>>
>>>>     
>>>>       
>>>   
>>>     
>> _______________________________________________
>> Opensim-users mailing list
>> Opensim-users at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-users
>>
>>
>>   
> 
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
> 


-- 
justincc
Justin Clark-Casey
http://justincc.wordpress.com



More information about the Opensim-users mailing list