[Opensim-dev] GridServer RPC security and region alive heartbeat

Brian Wolfe brianw at terrabox.com
Sat Feb 9 02:32:50 UTC 2008


Chris' concern about frequency of updates is why I was looking at
leveraging the existing packet traffic as a heartbeat so we didn't have
to send extra packets from an actively used sim. Second, the tuneable
parameter of packet frequency can also be used to lower the traffic, or
raise it for finer resolution of online status.

On a centralized public comemrcial grid, we certainly would want a ping
time of 1 minute or less. At this point, a monitoring daemon woudl then
be able to use this detail to relaunch the region.

There is another option, but it doesn't deal well with a simulator
crashing. In region.communications.ogs1 there is an unregisterregion
method that is currently empty.  At the minimal this method needs to be
filled in with a call to region_logout on the grid server. 

Without this call, it is entirely possible on a long running grid server
that "disapeared" regions would indefinitly hold a grid slot. This can
be used as a denial of service for grid slot choices (yeah, petty
denial, but still a potential harassment point). So there is a decent
call security wise for keeping track of where regions are still alive.

I think being able to turn off the region ping should also be an option
for those that want the laxest tracking possible. :)

Normally a heartbeat function would be done with a minimal impact UDP
packet. However I don't see a UDP service in GridServer. Using UDP would
certainly reduce the overhead, both in network and server.

My curently planned phases are as follows:

1: implement region_logout in GridServer and region.communications.OGS1
2: Add online bool to the table regions and update on region
login/logout.
3: add security check call in gridserver that has an on_authenticated
event. add this call to the region RPC calls in gridserver. (this will
eventually seperate out into it's own project for use in all services
that use keys)
4: add DateTime lastseen (not stored in DB, runtime value only in
RegionData class) and hook security check method RegionSeen to the
update LastSeen value.
5: add region_heartbeat rpc OR udp ping server GridServer and pinger to
region.communications.????
6: add timer to check LastSeen of each RegionData element. on elapsed >
timeout.seconds mark as offline and update DB.

This should keep the impact in small manageable parts that can be
reviewed for correctness of coding style, code, etc by those that are
interested in reviewing it for possible SVN inclusion.

If there are no objections I can get started saturday. :)

on a side note, I do have extensive systems administration and systems
architecture experience. If there are other areas that I can use my
experience to help OpenSim development, please let me know where to poke
around at. :)


On Fri, 2008-02-08 at 22:19 +0000, Chris Down wrote:
> By having reasonably frequent updates of connected regions, it would then be
> possible to show the region status on the client map. In addition perhaps
> the status could be used to check a region is up prior to teleporting.
> Currently, if you teleport to an inactive region, there is quite a delay
> before the user regains control of the client interface.
> 
> Chris
> 
> > One problem that surfaces are regions that attach to a grid and then go
> > away. Having a simple, low-bandwidth way for the grid servers to know if a
> > region is online or not would be useful. I was originally thinking once a
> > day,but certainly not every few seconds.
> > 
> > 
> > Charles
> 
> > From: Brian Wolfe <brianw at terrabox.com>
> > 
> > On the Region side, when a packet is sent out, it sets it's
> > HeartbeatSent = true. I would also add a timer that every X
> > (configurable via OpenSim.ini) seconds the timer would check
> > HeartbeatSent, and if false send a heartbeat RPC call, then clear it to
> > False.
> > 
> 
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev




More information about the Opensim-dev mailing list