# RakNet

## Recommended Posts

Have any of you used Raknet? Is it easy to learn? I know the basics of winsock/socket programming, and I'd like to use RakNet since it uses UDP and is portable so they say. I just wanted to know you're guys' opinion, if not, what other library do you recommend? Or do you just use the winsock library? Thanks.

##### Share on other sites
I use it, and have found it really easy to use.

My advice: Try it yourself. It is very easy to integrate into a project, so try it out, read over the manual, and you'll get to see if it is what you're looking for.

##### Share on other sites
Thanks, is it pretty easy to learn? I'd just like to know a bit more but thanks anyways bud.

##### Share on other sites
I'm also a bit curious, how about performance?

##### Share on other sites
Quote:
 Original post by x_gamer_xreally easy to use....very easy to integrate into a project...

##### Share on other sites
i think learning RakNet is really easy.
before i use RakNet, i've never learned winsock, but i found that's not a trouble from using RakNet.

##### Share on other sites
do you know any open source projects using Raknet expect DemonBattle? and i really want to know its performance on a MMO? thx

##### Share on other sites
I wanted to use RakNet, but couldn't get it to compile under msvc++ 5.. I'd love to use it, but no-one could give me any support on getting it to work under this compiler, and I'm currently strapped for money.. so no new compiler. But the best thing to do would be look at the information on the RakNet website, and trawl through the forums. If you can get it to compile, all the stuff you need is on that site.

##### Share on other sites
I wont recommand RakNet for a MMO, when you initialize RakNet to accept 5000 connections it takes 2 Go of memory ...

##### Share on other sites

Hi,

I believe I read that the support for MMO's has briefly been taken out of RakNet and is to be supported again in a later version. I find the library to be very fast, efficient, and really easy to use. It's well documented and well thought out.

Later,

GCS584

##### Share on other sites
Quote:
when you initialize RakNet to accept 5000 connections it takes 2 Go of memory ...

As well it should....5000 connections in one server box is absurd!!!!
Most state-of-the-art servers will only handle two, maybe three thousand conections MAX for an MMO.

Even if it did take 2 gigs of memory, considering that most server boxes have at least 4 gigs, this isn't too bad IMO...and thus if you put in realistic connection numbers (say 2500 Max) you are only using 1 gig of memory and that doesn't sound too bad...but I don't know the arcitecture, so even this might be exessive.

Quote:
I believe I read that the support for MMO's has briefly been taken out of RakNet

What support would that be? I've never used Raknet, but am familiar with Net libraries and from what I've seen, Rak has everything you need for an MMO. Do you know what support it used to have?

##### Share on other sites
Quote:
 when you initialize RakNet to accept 5000 connections

Exactly how much simulation per second do you think you can do per player when you have 5000 players connected, and you also need to do connection filtering/management for each of them?

The trick is not to cram as many players as possible into a single server, because then you will be limited in scalability by the server hardware. The trick is to have a cluster architecture ("grid" to some) where you can add more server machines to increase the total capacity.

##### Share on other sites
Quote:
 Original post by hplus0603The trick is not to cram as many players as possible into a single server, because then you will be limited in scalability by the server hardware. The trick is to have a cluster architecture ("grid" to some) where you can add more server machines to increase the total capacity.

Can you explain more about the "cluster architecture" type stuff? I've always heard about this but never really could figure out how it all tied to together, or how much of it was software, etc...

Thanks :)

##### Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
 Original post by hplus0603The trick is not to cram as many players as possible into a single server, because then you will be limited in scalability by the server hardware. The trick is to have a cluster architecture ("grid" to some) where you can add more server machines to increase the total capacity.

Can you explain more about the "cluster architecture" type stuff? I've always heard about this but never really could figure out how it all tied to together, or how much of it was software, etc...

Thanks :)

I believe he means several computers ( usually a network, except on a server ) connected to act as 1 server.

Er.. several servers*

##### Share on other sites
That's the basic jist of it.

I break down server farms down by Vertical and Horizonatal. I hope the below clears up what is meant by Tiers, Shards, and Grids.

(NOTE: These my definitions and hold no industry standard. Any similarity to current practice and language is intentional, but these defs are by no means universal and accepted)

---------------------------------------------------------------------------

If you engage in vertical expansion of your server farm, , and you are talking about Tiers.

Example:

a) Games like NWN is a single tier system. It has a client that connects up to a server.

Client
|
|
Server

b) The internet is almost entirely 3-tier. We still have the client, but now the server duties have been split (vertically) so that we have the Gateway server that handles the connections and the Database server that handles DB queries. This is vertical because the client alwasy connect to he gateway, but never the DB....while the DB also always connects to the gateway, but never interacts directly with the client.

Client
|
|
Gateway Server
|
|
Database Server

c) Most MMOGs are n-tier, meaning they can have many such vertical layers (including a accounts server, a combat server, a patching server, etc)

Tier1
|
|
Tier2
|
|
Tier3
|
|
etc

-----------------------------------------------------------------------

If you engage in horizontal expansion, you have several diffrent groups of servers farms, each one independently doing the same thing as the others, and you are talking about Shards.

Example:

1) In everquest, you have multiple versions of the same world. Architecturally, what this means is that once you are in the game, you are actually being sectioned off to your particular world that doesn't inteact with other shards (eg, client 3000 will never communicate in game with client 1000). Given that each shard can be on one server and the each server can host say 2000 ppl, this is where the MMOG comes into play...10 shards, 20000 players 100 shards 200K players, etc.
Clients 1-2000           Clients 2001 - 4000           etc|                         ||                         |SHARD1 Gateway           Shard2 Gateway                etc|                         ||                         |Shard1 Database          Shard2 Database                etc

------------------------------------------------------------------------

Finally, If you have several diffrent servers all collaborationg on the same singular task, you have Grid computing. This is another example of horizontal expansion, but unlike shards, we have the notion of a "node" and each grid node is collaborating with (potentially) every other node to get a single job done.

Example:

1) Nasa's Desktop Seti program put an application that DL raw information gathered from Satellites and telescopes and used your computer's idel cpu time to crunch numbers. This processed information is then sent to a central repository for further use and analysis. Given that millions of people downloaded this app, you had millions of computers in this example of an ASYNCHRONOUS grid.

2) In Physics, in order to solve complex Color issues (Color in reference to SU(3) Quark physics), they had to interconnect hundreds of university's computers to perform the massive calculations necessary. All of these computers run simultanously and concurrent to each other, making this an example of SYNCHRONOUS Grid computing.

Node 1  ----------- Node 2 ------ Node 3 ----- etc|                     ||                     |Node 4  ----------- Node 5 ------- etc |                     ||                     |etc     ------------ etc  --------

##### Share on other sites
Quote:
Original post by hplus0603
Quote:
 when you initialize RakNet to accept 5000 connections

Exactly how much simulation per second do you think you can do per player when you have 5000 players connected, and you also need to do connection filtering/management for each of them?

The trick is not to cram as many players as possible into a single server, because then you will be limited in scalability by the server hardware. The trick is to have a cluster architecture ("grid" to some) where you can add more server machines to increase the total capacity.

someone might have mentioned this already, but.. i believe the AP was saying that RakNet uses 2 gigs of memory when you just initialize RakNet, sending it 5000 as the max # of conns.. not when you actually have 5000 people connected.

##### Share on other sites
Oh, that's exatly what I thought they were saying. :)

Initializing to 5k assumes you can reach that number on one application (you can't) and thus why even do it in the first place?

##### Share on other sites
So in horizontal "shard" setups, are all the users essentially on different copies of the game world and therefore the game boasts 200k users but that doesnt matter because you'll only ever meet 1k of them?

##### Share on other sites
You got it AP. EQ booast over 3 million subscribers with an average load of 200 to 300k per day....but you will only ever see that 1 to 2 thousand of those on your shard. This is one reason why you have multiple characters, so you can explore diffrent shards and interact with a greater, diffrent set of people.

These are basic server farms I presented above. There are ways to get around these limits and have 10's of 1000's of people interacting with each other, but they demand more sophisticated network architectures design (combining both Grid and Shards for example) and usually involves more hardware than simply hosting the same number of people in shards

##### Share on other sites
Actually, I think current EQ shards are more like 3000 players -- maybe more with the newer zones (I stopped playing many years ago). EQ shards the world -- which is smart from a world design point of view; designing a world that scales to 100,000 people wanting to go to the same place at the same time is very hard. However, EQ still splits different zones onto different physical servers; for example, steamfront mountains and kelethin may be on one machine, and south qeynos and eurudin might be on another. However, as there's "zoning" between these different zones, it's not really a "seamless" distributed system; each new zone you load is somewhat like re-logging into the shard, which greatly simplifies implementation.

## Create an account

Register a new account

• ### Forum Statistics

• Total Topics
628362
• Total Posts
2982266

• 10
• 9
• 13
• 24
• 11