Advertisement

Peer to peer file system for Metaverse scale MMO

Started by May 01, 2014 06:26 AM
9 comments, last by ddn3 10 years, 6 months ago

For a couple years now I have been wanting to create a procedurally generated galaxy or even universe in which users can build cities and modify terrain. Once a user has bought or captured a sector they could deform the underlying procedural terrain and add structures to it. The structures would be made up of modular units that can be snapped together to form almost any structure one can imagine. The structures and deformations would be kept in a data file in a folder for that sector. There would also be data files belonging to each player in that sector that would store their position along with other information.

The underlaying technology that this game would use to store the vast amount of data that would quickly accumulate would be a peer to peer file system. Essentially, it would work exactly like the Linux file system with users, groups, and permissions. The client software would create a virtual hard drive that can be mounted just like a normal hard drive.

However, this virtual hard drive would work by using cryptography in order to enforce permissions. So if a file belongs to a user/group and other groups/users have read-only access then only the user/group that has the private key can transmit their signed version of the file to peers who would in turn transmit it to other peers who try to read the file. If the signature does not match that of the file's owner, peers would reject it. This would be similar to the way bitcoin proves ownership of bitcoins in the blockchain. If no one other than the owner has read privileges to the file then the file would be encrypted and only the user/group can decrypt it.

Beyond video games such a file system could have wider implications. It could be used for things like peer to peer web applications and file sharing. Which is a neat thought but I originally thought of it to solve the problem of hosting all the data required for my dream game. Anyway, my idea is that I as the game creator would own all the sectors and host a server that monitors those sectors. When a user or in game corporation constructs a spawn beacon in a sector (which is the only structure they can make without write permissions) and that spawn beacon stays up for a given amount of time with no other spawn beacons in the sector, the server would give them write access to the file.

Another corporation and or player could construct a spawn beacon in the sector and destroy the other corporation/ player's spawn beacon to gain control after maintaining supremacy for a period of time. Players / corporations could also sell the sectors on a game wide action house. Game play would be similar to Eve Online, Planetside 2, and Infinity: Quest for Earth. Would also be interested in integrating the Oculus Rift into the game as I have bought a dev kit a few months back that has only been gathering dust.

So some things I would like to discuss in this thread would include: Does such a peer to peer file system already exist?(Don't want to reinvent the wheel) What are your thoughts on the idea? Any critiques, suggestions or ideas? Is anyone working on an idea like this and can I join you? Would anyone be interested in working with me on the idea? Also if you are interested, this is some of my past work. Mind you the video is over two years old but there are a couple of posts I have made on procedural generation which might be of interest.

Anyone?...

Advertisement
My first thought was "surely this is a solved problem, there's likely a library for that"... But I can't name them.
I know of distributed file systems, but not a crypto-system like you specify... It's a very interesting project that would likely have many applications beyond just this game design.

My first thought was "surely this is a solved problem, there's likely a library for that"... But I can't name them.
I know of distributed file systems, but not a crypto-system like you specify... It's a very interesting project that would likely have many applications beyond just this game design.

Thank you for replying. I've went through lists of peer-to-peer file systmes and none of them that I found work like this. I find if very hard to believe that I am the only one who has thought of this. It seems like the natural way to move towards a peer distributed internet.

My first thought was "surely this is a solved problem, there's likely a library for that"... But I can't name them.
I know of distributed file systems, but not a crypto-system like you specify... It's a very interesting project that would likely have many applications beyond just this game design.

This looks promising. Not as simple to use as I would have hoped but it appears to be simular to what I was thinking.

I have used various corporate libraries for P2P gameplay and P2P data exchange. The original post hinted at the possibility that it could mean not hosting the material on their own servers, but I think this is a bad idea. You should always control the content. Allow others to share the content to reduce your distribution costs, but don't give up that control.

That said, I don't know of any 3rd party libraries to do the same thing, apart from various bittorrent protocol tools.

Beware that this type of connectivity gets nasty due to NAT and firewall rules. Some players will only get limited connectivity, many will have outbound-only connectivity. You will not get a complete P2P mesh. Businesses that use a P2P architecture inside the game will also need to provide public P2P repeaters for those with limited connectivity to bounce off of. Be prepared for the accompanying costs.

Advertisement

I have used various corporate libraries for P2P gameplay and P2P data exchange. The original post hinted at the possibility that it could mean not hosting the material on their own servers, but I think this is a bad idea. You should always control the content. Allow others to share the content to reduce your distribution costs, but don't give up that control.

That said, I don't know of any 3rd party libraries to do the same thing, apart from various bittorrent protocol tools.

Beware that this type of connectivity gets nasty due to NAT and firewall rules. Some players will only get limited connectivity, many will have outbound-only connectivity. You will not get a complete P2P mesh. Businesses that use a P2P architecture inside the game will also need to provide public P2P repeaters for those with limited connectivity to bounce off of. Be prepared for the accompanying costs.

My thought was that I would only keep a copy of ownership information for the sectors. The idea is that if there are no users online hosting the sector deformations and stuctures then it would just fall back to the procedural terrain. After 30 days if no users hosting the sector come online then the peers would delete any ownership of the sector.

I suggest usurping the block chain protocol from bitCoin and stuffing your tranactional information in there somehow which you can use to rebuild your procedural world. That way you offload the largest obstacle, secure transactional integrity.

See

http://blockchain.info/charts/blocks-size

it's nearly 18,000 MB now, if you can figure out a way to cleverly link the transcational data of bitCoin to your procedural world...

I suggest usurping the block chain protocol from bitCoin and stuffing your tranactional information in there somehow which you can use to rebuild your procedural world. That way you offload the largest obstacle, secure transactional integrity.

See

http://blockchain.info/charts/blocks-size

it's nearly 18,000 MB now, if you can figure out a way to cleverly link the transcational data of bitCoin to your procedural world...

While that's not a terrible idea, it could cause some problems. The data for sectors could grow exponentially and cause users' computers to crash as they enter a sector. To me it would seem better that if someone creates a situation where it could crash computers then the computers that crash would stop transmitting that data to peers. This would create a form of natural selection which will weed out bad data.

The main problem with the P2P approach that I see is that you basically must have the data more or less n-times redundant for n players. So basically, everyone is an "owner".

One could in principle imagine three approaches, but I think only one can really work:

  1. one user is the owner of a block n?1
  2. several users are concurrent owners (optionally with something like a reed-solomon code or such) n?m (with m 692c4c02d38a54fbef623527cf26a094.png n)
  3. every user who has visited a sector is an owner n ? n

The first approach has the problem that if I don't play, you can't play (other than using the procedurally generated content). It also means, among many other things, if I disconnect while you play, your entire world suddenly changes. If I realize that you are playing in my sector and I don't like you (or you're from the enemy faction), I'll just add your address as "malicious" to my application-level firewall. Bang, you're dead.

The second approach is much better. If there are, say, 25 owners on a particular sector, and it's late in the morning, so only 2 of these play, I can still enter the sector and get what I saw yesterday (which is what I expect to see!). One of them alone can't just block me out either, I'll still get data from the other one. One of them alone also can't easily cheat me, if I have a means of checksumming his data against the other's.

But what if none of them plays? What if you piss them off (which is kind of easy to do with online RPGers, simply make any kind of update, modification, or tweak), and they choose to delete their local copies? What if someone uses a hex editor just to see if it's possible to make some (more or less random) modifications, or worse, what if someone actually finds a vulnerability in your file format that lets him modify the data on his disk? It's not like that kind of thing hasn't happened to several major companies selling consoles in the past. Something that is at the user's home, under their control, is always at risk.

Only the third approach could work reliably, but none more securely (rather the opposite), and the bandwidth requirements would be immense.

Also, what if some user-generated content conflicts with the law in some country? Say, someone writes neonazi messages into the sand. How do you (who, as the maintainer has a legal responsibility) delete the contents if you do not have physical access to the data? Someone could pull a copy, disconnect and go on holiday, and come back 3 weeks later with the offending material still on the disk.

This topic is closed to new replies.

Advertisement