Pour compléter le billet de LeoMaxx sur l'Hypergrid avec des informations plus techniques, voici tel quel une revue du fonctionnement de l'hypergrid, brut de décoffrage droit sortie de la mailing list des developpeurs d'OpenSim.

Cool, the patch in http://opensimulator.org/mantis/view.php?id=2640 now builds and passes tests (for what that's worth, currently) against r7391 right now.

Having read Cristina's wiki page and the code, I think the hypergrid is a neat architecture. Essentially, a hypergrid is a confederation of grids. Each user has their own home grid or standalone, which is where their user profile, inventory and assets are stored. When they travel to a different grid via a hyperlink (set up via some funky map and region handle manipulation), the new grid is told the address of that user's home asset and inventory services. Thus

1. If a user rezzes an object from their inventory, the assets for that object are fetched from the home asset service and permanently inserted into the foreign asset service. So when that user goes away or logs off, the assets are still available to be seen by everybody else.

2. If a user copies/takes an object from a foreign grid, then the relevant inventory and asset data gets sent to their own home services.

Please correct me if I'm wrong, Diva.

As I see it, on a conceptual level, some of the pros are:

  • Effectively distributes asset and inventory load over multiple services on multiple grids. This is a really good

alternative to scaling up a central service to internet scale.

  • Allows grids to seamlessly linked to others yet retain control over their own services.

And the cons:

  • Assets are liberally spread around grids. I don't think that this is much of an issue in view of the client hole, but

this is merely my own opinion.

  • Regions must be manually linked and appear in a grid's map. One can't just enter an address in a url bar to go to

another grid, the grid owner must set up the link. As far as I can see this is a limitation of what we have to work with in the client. There may be some arguments for restriction (you don't want someone coming to your pg grid from an adult grid and depositing god knows what).

  • Services need to be exposed to other grids. So malicious grids could possibly fetch and put things they shouldn't. I

think Diva already has some proposals for dealing with this. This may also be another good argument for controlling who can link to you, for now.

I've read the code but I don't intend to actually run it right now - I was more concerned about trying to identify any nasty architectural problems. As far as I can see there is nothing too significant. However, I do see some implementation weaknesses.

1. Assets associated with worn attachments and appearance are not uploaded to a foreign grid from the home grid on teleport in. For other users without cache copies, such avatars will always appear gray and I don't think that any attachments would appear. This is fixable.

2. Prim inventory inspection does not go deep enough. As far as I can see, in the 'asset mapper' you look for contained textures when rezzing an item, but not any other contained assets (including contained objects, clothing, notecards, scripts, etc.). This will result in an incomplete rez. However, this is fixable. Indeed, I've already written all the code required to do this for the OpenSim archiver. If this patch goes in then this should be reused.

3. Better class and method documentation. From what I've seen, what appears to be there at the moment is probably a result of initial copy and paste from existing code. I know this is the pot calling the kettle black to some extent, but I feel that proper class and method documentation is something that we ought to be working towards, to help prevent parts of the code from turning into the private fiefdom of whoever originally wrote it. Also, logging messages are not quite correctly formatted (colons are missing after the <log name> section and copyrights are missing or inconsistent.

4. The code exists in separate Hypergrid packages from all the existing OpenSim packages. This is very understandable due to its origin as a forge module. And I think we can take it as is, but these separate packages should probably go away over time.

Items 1, 2 and 4 could be fixed up after an initial patch goes in. However, I really would like to see more documentation, license fixes and log message uniformity (3). Please could you do this, Cristina?

If this is done then in my opinion the hypergrid facility would be a +1 addition to what is currently in the core. However, I'm not an expert on various areas (map, teleport) so would greatly appreciate another pair of eyes if anyone can spare them. Therefore, if we are to commit this patch I think we should hold off until Monday of next week to give anybody else a chance to look at it.

I'd also quite like to know who intends to support this in the future. It would be a shame if we took it in and then nobody was prepared to keep it going (which I think would mean eventual removal).

Sorry for the long post.