Communication Protocol Improvements

4 min read

 

This post will dive into how player-to-player communication works inside Decentraland, and how this is about to get a lot better. We’ll get quite technical, but we’ll try to keep the gist of it approachable.

Changes are coming that will enable massive events and gatherings of players, making the world feel much more vibrant. Ever since Decentraland launched, we’ve had limitations in place that restrict each player who enters the world to be in touch with a fraction of the other players who are in the same location. However, the upcoming changes to Decentraland’s communication protocol will enable each player to interact with a far broader set of peers, paving the road toward a more robust and scalable communication protocol and bigger events.

Current limitations

As you might already know, Decentraland uses servers and layers to keep players in separate contained groups. You might have noticed that the Decentraland URL includes some random name followed by a color, like “fenrir-ambar” or “unicorn-blue”. The first name is the server, and the color refers to the layer within that server.

Why do we split players into groups? It’s because there are limits to how many people can connect 1 to 1 without blowing up a server. There’s a simple mathematical formula for how peer to peer communications grow exponentially as you add more people to a network. Google “Metcalfe’s law” if you want to nerd out on the math, but to illustrate the concept with a simple example, suppose we have a group of 4 people and they all connect to each other. At first, there are in total 6 connections to keep track of. Bring in a 5th person, and that adds 4 new connections, making the total 10. Add a 6th person, and this time we need to add 5 new connections, bringing the total to 15. Keep doing that for a while and you’ll realize that the power of exponential growth is not something you want to mess with. So, for now at least, a hard limit was set at 100 players.

This means that on all the servers that make up Decentraland’s communication network, we can only have 100 players per layer. A server might have multiple layers, but none of these layers can go over 100 players, and each of these layers is just as isolated as if it were its own server. We call these isolated groups “realms”. Players in different realms can’t see each other, interact, or chat publicly with each other, even if they’re standing next to each other on the same parcel.

This design is powerful because it enables us to handle a large total number of users on our servers, but it comes at a price:

  • You can only run into or chat with a fraction of the other players that are currently in the world.
  • A large crowded event might only feel partially full, because you’re only in contact with the people on your layer who happen to also be in the same location. If the 100 players in your layer are hanging out somewhere else in the map, you might feel entirely alone.
  • A confusing UX, as the concept of realms is not very transparent. In fact it’s only exposed within the URL. If you try to join a friend at a given location, you might not meet if you both end up on different layers. It takes a pretty advanced user to know that you can jump between realms simply by changing the not-so-pretty part of the URL.

What’s coming?

Enter Archipelago. This is a new way of organizing communication between peers that introduces the concept of communication islands, as opposed to layers. Just like layers, islands are a way to arrange players into sub-groups within a server; what’s novel about islands is that they take world positions into account, and they dynamically adjust as players walk in and out of a region.

So instead of having the 100 people you share a layer with spread out over all of the map, in an island you’re only grouped together with the people you might actually run into. For example, an island might include all of the players in the region around Voltaire District and its surroundings. If a player walks south from there to Crypto Valley, they’ll seamlessly switch islands to connect with the players in that other region. If a region becomes crowded beyond 100 players, then the island might shrink or split in two. An island still never includes more than 100 players by always re-grouping the players who are standing closest together.

This protocol change will enable us to:

  • Remove the concept of “layers” from players’ minds, making things simpler. Players won’t need to know about islands either, if they walk around the map they will be able to run into everyone who’s in the server, and it will feel like one single cohesive space.
  • Reduce latency between users.
  • Increase the success rate in P2P connections.
  • Take advantage of the current limits of the P2P network by automatically clustering users and building “connection islands”.
  • Support multiple overlapped islands, which should guarantee a cohesive experience while at the same time enabling large crowds to occupy the same place.
  • Prepare for future changes, which will enable greater scalability and support for truly massive events.

We’re super excited to see this radically change how Decentraland feels. As a scene creator, these changes shouldn’t affect you. As a player, you will surely start running into a lot more players when you take a walk around Decentraland.

API Support

As you may imagine, in order to deliver all of this greatness we need to change some APIs. As a result, some community-made integrations that rely on realms and comms may need to adapt. If you are responsible for maintaining such an integration, please review the changes and make adjustments when you are able to. Even though this may require some extra work, these changes will deliver a tremendous amount of value to the Decentraland platform and community.

In the following public Architecture Decision Record you can find the details of the API changes that will be introduced.

Rollout

There’s already a public Catalyst with these API changes implemented on Peer Testing. You may use the following link to connect to the Peer Testing Server from the Explorer and validate that your service works well with the new architecture.

August 16th, 2021 is the target rollout date for these protocol changes. After the 16th, we can expect to see some drastic changes to the social experience of exploring Decentraland.

 

Via this site

Kieran Warwick Has Big Plans for Illuvium | Longterm…

“Being brothers, we just couldn’t agree on game mechanics — we were arguing for 2–3 days until Aaron designed a beta version. That’s how...
Crystal Morales
7 min read

Investments Opportunities In Bear Market | Defi & Gamefi…

  There has been a severe downturn in the cryptocurrency market since April.  Ethereum is down 80% from its all-time high, while Bitcoin has...
Crystal Morales
5 min read