UDP Multicast

Started by
2 comments, last by phueppl1 22 years, 12 months ago
Hi There! I just wanted to know how reliable/fast the UDP multicast is... Is it any use for MMORPGs ? thx in advance.. cya, Phil Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
Advertisement
Multicast? Do you know what your talking about, or are you just throwing a buzzword in for its own sake?

Basically, multicast is used for stuff where many clients need to receive the same data, as in video streaming. It''s very problematic in the internet though.

But even if you could use it reliably, it wouldn''t make any sense. No game will ever need multicasting, because every player needs to get to different information.

Of course the situation changes when you allow spectators, but that''s a different story altogether.

Now for basic UDP. It''s faster in terms of ping as TCP because it doesn''t worry about streams, but this is a trade-off with reliability. Basically, a UDP packet may arrive or it may not. From what I''ve seen though, UDP is quite reliable on the internet today, unless you''re trying to send more data than the thinnest bottleneck can take, or the route between the host is extremely long. If this is not the case, you can expect to get >95% of the packets to your destination (though you shouldn''t rely on that of course).

cu,
Prefect

Resist Windows XP''s Invasive Production Activation Technology!
One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy
YES! I thought about it mister!

Did you?

Here you go.. it''s the situation of a MMORPG. A Client makes a move and all other players need to be notified.. (Did I head a click in your brain?). All other players need to get the same message that one player moved up 2 spaces or whatever.. instead of sending _thesame_ package to every client once I''d send it per multicast to all users on this map... ok?

So that way you''d save a lot of upstream. send the package once and every client/player that''s on this map server receives it.. the maps arent to big, so the extra downstream for the client doesn''t matter.

btw.. the smallest bottleneck is (should be, from the specs) 576 bytes... ok, but I gotta subtract the IP header (20 bytes) and the UDP header (8 bytes) then also some extra values that I''d use to check the sequence of the arriving packages, a timestamp and so on (2 - 4bytes, didn''t specify that yet). so I''d have something like 546 - 544 bytes left to be under the specs ;p.. I''ll set it to 512 bytes though, nice number *G*..

thx for the info on reliability....
anybody know somemore in-use UDP facts especially multicast?

thx,
cya,
Phil


Visit Rarebyte!
and no!, there are NO kangaroos in Austria (I got this questions a few times over in the states
Visit Rarebyte! and no!, there are NO kangaroos in Austria (I got this question a few times over in the states ;) )
First of all, sorry if I was a bit blunt. Now for the actual discussion...

Yes, you will indeed have to send one packet to several clients, but by far not to all. There''s no need to send information about another client which is >2 screens away.

The point is that multicast is hardly supported at all over IP (at least v4, maybe something''s even changed. Feel free to correct me). The point is, IPv4 only allows you to give one destination address for a packet. There are multicast addresses of some sort, but I have no idea how they can be used in practice. If I understand correctly, all backbone nets in the internet would have to register "your" multicast address in order to route packets properly.... this is not going to happen.
As I said, feel free to correct me (actually, I''d be glad if I were wrong ).

About the packet size thing... 512 is indeed a good number. Actually, the people who designed IP had exactly this number in mind (they say that in the RFC).

cu,
Prefect

Resist Windows XP''s Invasive Production Activation Technology!
One line of sourcecode says more than a thousand words.
Widelands - laid back, free software strategy

This topic is closed to new replies.

Advertisement