The History of Hypergrid Directories: A Single Point of Failure

This article is not intended to be overly critical of those various people who have generously put their time and effort into providing directories of Hypergrid locations, which must have been very considerable. The phrase “single point of failure” is a technical description and not a criticism or judgement. It is no small feat to put the server infrastructure and programming time into making this work and maintaining it over a period of time. As one who has operated servers, I understand that the personal circumstances of such volunteers change and resources such as time and finance for servers can be limited.

By way of comparison, a number of the original OpenSim developers have moved onto new projects, yet OpenSim is still releasing new versions. Why? Because there is not, in computing terms, a single point of failure that will cause things to fall over if those individuals or servers can no longer contribute. All of these directories depend on a single, privately maintained database even where the code itself has been open sourced, e.g. TheHyperGates.com with code on GitHub developed by kidd piko (Zvi Ben Yaakov). This has recently had more downtime than ever before and appears to be unmaintained at present, for whatever reasons. [Ed.: in fact, I discover from kidd that the service needs a database sync but would then otherwise be functional, although the web site is not currently available.] Unfortunately, since Kidd put vast amounts of time into this development, all that fantastic effort now seems to be wasted [Ed.: but the situation is now under discussion since this was written.] because nobody else has put a system in place using this open source codebase. It was the most famous and widely used Hypergrid teleport network with its iconic Stargate styled gates.

Stargate out of order

Stargate out of order in Ocean Grid, January 2016. Will it work again? With existing or new code?

It was not the first, which was gridhop.net, defunct since about early 2013, if my records are correct. It seemed to survive a while but it was never clear how the database was being maintained or by whom. Most systems rely on the manual addition of regions either by an administrator or by grid owners, which may in some cases, e.g. Hyperica, be vetted by the grid owner.

Lately, iDreamsNet ceased to function, which was an easy to use system based on rezzing an item and then proceeding to a web page to register the region. Like Hyperica, it did not have an easy-to-use in-world directory, only one on the Web, but it was a great effort all the same.

Defunct iDreamsNet beacon

Defunct iDreamsNet beacon

The defunct iDreamsNet seems to have inspired the latest open source effort, OpenSimWorld, which is a brilliant combination of simple registration on the same principle as iDreamsNet with an easy-to-use in-world and out-of-world directory, like TheHyperGates except for the lack of the iconic Stargates – although there is nothing stopping you putting the HUD code in a Stargate and it will work in a similar way as its predecessor. (Maybe I will do this if TheHyperGates doesn’t come back on line soon. [Ed.: I have now used a modified HUD script in a telephone box because I wanted to keep the Stargate for its original purpose if at all possible.]) Being a HUD, the intention is that you wear it, which is another useful addition to the previous approach taken by TheHyperGates; however, you can just as easily rezz the script in an in-world object, or use the script both in a HUD and an in-world object too. You can only have one beacon script per region but the HUD script is not limited in the same way.

OpenSimWorld also shows you how many people are currently on line and orders the results accordingly: great for finding parties! I used the code from GitHub (which produces a prim like the one below, which I have framed in a sign with an added banner above) but you can also get a different design of beacon from the OpenSimWorld region on OSGrid. Finding people has hitherto been a major problem in OpenSim (and often in SL). It reported 30-40 people at any one time at LBSA Plaza on OSGrid (probably the most famous location in the OpenSim Hypergrid) over New Year 2016. Happy New Year, everybody!

OpenSimWorld directory on Ocean Grid

OpenSimWorld directory on Ocean Grid, Saturday 2 January 2016, 14:30 GMT

Clearly, these systems have been built on each other’s successes and evolved productively. The difficulty is that the database remains the single point of failure. If a single site goes down, the directory goes out of action entirely. I suggest that the next development would be to build a federated system with copies of the database that update each other, so if one breaks there can be a seamless (or at least simple) switchover to an alternative principle database, where perhaps the system records, e.g. in a notecard, the locations of active databases that are communicating with each other, i.e. that the administrator has registered with others, whether or not they are working, and then falls back to a different one and alerts the administrator if the main database stops working temporarily or permanently. One similar federated system in the system of PGP key servers, although that is only a general comparison of course.

It should be possible to re-use the open source code of either TheHyperGates or OpenSimWorld and add a federated database system underneath. It might even be possible to create a database standard that any and all systems could query with only relatively small changes to the code, making the user interface and underlying server code independent of each other, with a modular approach.

In the meantime, OpenSimWorld looks like a major success and I really hope it keeps going in the future.

 

lookat vector with OsTeleportAgent & OsTeleportOwner

I’ve noticed various advice about how to point the agent (i.e. your avatar) after teleporting using a script in OpenSim. This is done with OsTeleportAgent and OsTeleportOwner. Unlike llMapDestination, the lookat vector is actually implemented, which is rather pleasing. However, there is no documentation on how to use it, at the time of writing.

There are no clear instructions anywhere on the Web, and some of the advice I have seen appears to be wrong. For instance, one person suggested putting a prim on the ground in the direction you want your avatar to look and then using its coordinates. I can confirm that this does not work except for in one case (rather like the stopped clock being correct once a day). It is not a Euler vector in radians corresponding to a rotation, so please don’t waste your time trying stuff like llRot2Euler(rot) and so on. This will simply confuse you for longer than is necessary.

It appears that these work if you are teleporting within a region, but the lookat vector simply fails if you are teleporting between regions. In inter-region teleports, I am always pointing due East, or slightly turned to the SE if I am too near to non-phantom objects. It just doesn’t work, whatever the numbers are. However, intra-region teleports appear to work as follows:

Teleporting within the same region

In fact, the actual numbers in the vector don’t seem to matter if they are high enough, and only X & Y work at all because your avatar will not be pointing upwards. Quite simply, due North is <0,10,0>, due South is <0,-10,0>, due East is <10,0,0>, due West is <-10,0,0> and so on. The figure 10 is arbitrary. I’ve found it works with any positive number. Provided that X and Y are equal, this would mean that NE is <10,10,0>, SE is <10,-10,0>, SW is <-10,-10,0> and NW is <-10,10,0>. You can work out the minor points of the compass yourself from those, I hope.

So, to summarise, the agent is pointing in the direction of the relative axes, not rotated around them as with other vectors.

Another very weird aspect of OsTeleportAgent and OsTeleportOwner is that, after saving the script and teleporting, you will notice that it always fails the first time but succeeds on every subsequent attempt. This seems to be a very minor, completely reproducible bug. This confused me for a long time, leading me to much unnecessary extra fiddling with my scripts before I realised how it actually works.

Teleporting to other regions

Apparently, any lookat vector will currently give the same result. I am currently using the OpenSim 0.7.5 release version.

Further notes

I used the following syntax (the second variant in the documentation):

void osTeleportAgent(string agent, string regionName, vector position, vector lookat)

void osTeleportOwner(string regionName, vector position, vector lookat)

I have not tested the other two variants:

void osTeleportAgent(string agent, integer regionX, integer regionY, vector position, vector lookat)

void osTeleportOwner(integer regionX, integer regionY, vector position, vector lookat)

void osTeleportAgent(string agent, vector position, vector lookat)

void osTeleportOwner(vector position, vector lookat)

The former pair just show an alternative way of describing a region, using its coordinates rather than its name. The variant that I have used is the best for hypergrid even though the documentation wrongly says it can only be used for a local grid. The code examples prove otherwise. Obviously, the last variant is only useful within the current region. There is no reason to think – although I have not tested this – that the lookat vector behaves any differently in inter-region teleports based on how you specify which region is your destination. However, just as a last caveat, I should add that I did this testing within a local grid, as I have not yet had time to wait for the often slow hypergrid teleports in order to test it on hypergrid fully.

Please let me know if you’ve found any relevant bug reports or documentation that I’ve missed 🙂

It’s a real shame that the lookat vectors only work within the current region, as they are very useful.