Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Using grid computing to solve game asset storage

blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-30-2004 12:08
Just for fun, I thought I'd propose a way to centralize game assets (avatar info / textures / notecards / ?) across a grid rather than on a central asset server:

Assets should be stored on one or more sims rather than a central server.

A very very fast, *in memory* and very *basic* lookup server would be required to respond to key lookup requests as to which is the home sims(s) for that server. And, potentially, which is the least loaded with requests.

First Advantage: the whole world is not held hostage by a single point of failure (no matter how 'replicated' that point of failure is).

Well, it would be held hostage by the very fast lookup server, much in the way the internet is held hostage by DNS.

Second Advantage: ability to decentralize servers and allow an anyone can host style of service, since they don't have to clog up your asset server with their assets.

Disadvantage: lag on a sim can cause localized problems.
Advantage: localized problems can be a much better problem than a global problem.


For fun, rather than criticising this idea, please propose your own.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-30-2004 12:16
It's a nice idea.

Course rez times would be longer. Also sims with high load on them could offload there assets to other sims. Spreading the load to the other sims. I like this idea.

/me wants to start poisoning the DNS cache.


Now if we could just get Trimming to agree it's a good idea the forums would be much more peaceful.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
splat1 Edison
Registerd Nut
Join date: 6 Sep 2004
Posts: 353
12-30-2004 13:28
The current asset server is a central server and each sim has a cache serving it (squid for people intrested) this seems to be the fastest setup once you have rezed an object once but has its down falls for grid reboots. Again its another system LL is looking to improve.
_____________________
Splat Soft - We exsist in the RL to!
Gigas Bunny (Mule)
####
You see, our experts describe you as an appallingly dull fellow, unimaginative, timid, lacking in initiative, spineless, easily dominated, no sense of humour, tedious company and irrepressibly drab and awful. And whereas in most professions these would be considerable drawbacks, in chartered accountancy they are a positive boon.
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-30-2004 14:02
Squid is very very cool. Interestingy enough, it would work just as well with the layout described above.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Khamon Fate
fategardens.net
Join date: 21 Nov 2003
Posts: 4,177
12-30-2004 14:09
the keys could be hashed to values that indicated what servers they were on. that'd eliminate the lookup point of failure. in fact, the software could essentially raid itself by hashing each key to two different servers. so the client could access the "backup" copy if the "main" hash wa down.
_____________________
Visit the Fate Gardens Website @ fategardens.net
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-30-2004 14:13
I believe....
Only problem with that is an object is defined as a list of other prims. Each prim with it's own key. So it's possible that a large object could be spread across all the servers. Downloading a single object could result in 264 connections (9 for textures).
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Kurt Zidane
Just Human
Join date: 1 Apr 2004
Posts: 636
12-30-2004 15:00
I think I sugested some thing simlar, just I called it p2p network located inside and only for ll.
Trimming Hedges
Registered User
Join date: 20 Dec 2003
Posts: 34
12-30-2004 15:02
Well, since my name was mentioned, I'll go ahead and opine here.

Grid computing is very good for some classes of problems, but not so good for others. I'm not entirely sure that this data model would be easy to break up across multiple servers; I imagine they have probably already done as much of that as they can comfortably/easily do.

Also, you wouldn't want the databases running on the sims, they're busy running other code! Any time they spend running a database is time they can't spend on your code.

A partitioned database approach could work, in that you could distribute load based on object keys. But there's a whole new class of bugs that could arise from this kind of distribution. Consider me transferring you a 6-prim object with a lot of inventory... most of my scripted objects end up looking like that. If I am just transferring you a copy, that's no big deal, my client can go talk to all the different databases. But what happens if you then want to transfer the locked, no-copy item to someone else? How do you handle it as a transaction? All the individual pieces must transfer, or none can. How do you handle a rollback if one server is down but all the rest of the objects think they transferred? What happens if a SECOND server goes down during the rollback process? And how do you guarantee being able to do all these things reliably, *wihout race conditions*, across an arbitrarily large number of machines?

The engineering involved in getting this working RIGHT would be extraordinary, far harder than creating the entire existing client has been. In other words, it would probably cost them AT LEAST ten times as much to develop this kind of system as to just buy a big-iron system from an existing vendor.

It might make sense for SOMEONE to develop this technology, if it's doable. But it doesn't look sensible for LL to try to develop this while doing all the other things they're also trying to do.
Eggy Lippmann
Wiktator
Join date: 1 May 2003
Posts: 7,939
12-30-2004 15:06
I would love to see SL running some sort of freenet-like dynamic replication/relocation model. If you think about it, it makes sense :)
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-30-2004 16:09
Well, one possibility would be that an avatar is completely homed on one sim rather than split across multiple sims, so the atomic transaction could occur that way and another process would be responsible for replicating it to its backup sim.
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Pedro Pendragon
Registered User
Join date: 15 Jan 2004
Posts: 77
12-30-2004 18:31
Okay, I guess this is only tangentially related, but...

I'd like to see them open up the data-fetching architecture... so I could run my own caching proxy locally. :)

Then, if I wished to, I dedicate 50gb on my (usually fairly idle) linux box to caching. With some good indexing. There are many things in the world that change fairly infrequently -- the textures for all your close neighbors' houses, that club you go to every couple of days, all your friends' custom animations and sound clips -- but they can fall out of the simple 1gb max SL cache before you need them again.

This could really improve rez times in places that I go frequently. Also, this would be a tremendous benefit for when my girlfriend and I are both on SL at the same time -- the proxy can fetch the data once and give it to both of us, instead of having to download it all twice.

And if enough people did it, it could reduce the load on the asset servers. And, there'd be no reason that LL couldn't colo a caching proxy on the east coast, or europe, distributing the load even more.
Trimming Hedges
Registered User
Join date: 20 Dec 2003
Posts: 34
12-30-2004 18:56
Pedro, I assume that would be quite doable... SL is already caching, it must have an algorithm all done for that. Just move the caching to another machine, let it be much larger, and share it. Not a bad idea at all.

Simply allowing individual caches to be larger would, in many cases, allow the same thing, and probably would only require a few lines of code be changed.

blaze, you could home an avatar on one sim, but what about his/her inventory? An inventory is just a set of pointers to objects in the data store. If the data store is scattered across many sims, then my inventory is still scattered across many sims, even though all the pointers might be local to the current sim.

What if I transfer something to someone who's in another sim? Who's responsible for the transfer, my sim, or his? And what if something fails, how do you roll the transaction back?

What if I move from sim to sim? Does the entire database for me get sent over the wire? What happens if I move back before the transfer is complete? What happens if I go into a third or a fourth server before the second server has all my data?

We already have big, big problems at corners as it is, with the tiny bits of handoff data going from sim to sim. Transferring an entire inventory at every sim crossing is going to add a vast amount of load, and I don't see that it would give any particular benefit.
Azelda Garcia
Azelda Garcia
Join date: 3 Nov 2003
Posts: 819
12-31-2004 03:25
*must... not...mention... the...product...that...already...uses...a distributed...data....architecture :D *
Issarlk Chatnoir
Cross L. apologist.
Join date: 3 Oct 2004
Posts: 424
12-31-2004 03:29
They use Squid for cache? Are the sims talking with the asset server through HTTP requests or XML RPC O_O ?
That sounds very unefficient.
_____________________
Vincit omnia Chaos
From: Flugelhorn McHenry
Anyway, ignore me, just listen to the cow
Ace Cassidy
Resident Bohemian
Join date: 5 Apr 2004
Posts: 1,228
12-31-2004 03:59
From: splat1 Edison
The current asset server is a central server and each sim has a cache serving it (squid for people intrested) this seems to be the fastest setup once you have rezed an object once but has its down falls for grid reboots. Again its another system LL is looking to improve.


Does the use of Squid imply that its HTTP between sim and asset server? And if so, doesn't that imply a lot of TCP session creation/destruction as HTTP links are established?

Not that I'm brazen enough to be telling the Lindens how to build their grid.

- Ace
_____________________
"Free your mind, and your ass will follow" - George Clinton
blaze Spinnaker
1/2 Serious
Join date: 12 Aug 2004
Posts: 5,898
12-31-2004 08:49
I agree Trimming, acidity is an issue and not one easily overcome. Something I probably neglected to consider as a con in my original email.

However, I still believe the distributed architecture outweighs the centralized one. The internet is a pretty good model for what this world should become, but with just a little more segue from site to site.

Hopefully they are migrating that way..
_____________________
Taken from The last paragraph on pg. 16 of Cory Ondrejka's paper "Changing Realities: User Creation, Communication, and Innovation in Digital Worlds :

"User-created content takes the idea of leveraging player opinions a step further by allowing them to effectively prototype new ideas and features. Developers can then measure which new concepts most improve the products and incorporate them into the game in future patches."
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-31-2004 10:56
Trimming, you could have a central inventory server. One that just handles inventory lists & transactions. Since it doesn't actualy have to have the assets it shouldn't have to much trouble with the capacity. This would also eliminate the need to develope code to handle bad transactions on a multi system level. There really can't be more then 80GB devoted to inventory lists at present.
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey