Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  How do I diagram ping between servers on the Net?  (Read 5815 times)
0 Members and 1 Guest are viewing this topic.
Offline jc

Senior Newbie




Java games rock!


« Posted 2004-02-22 06:13:46 »

If I know the ping between several servers on the Internet, how do I diagram that ping as a two-dimensional map of the "location" of those servers? Has anyone developed an algorithm to achieve this?

I want to write a program that uses that map to assemble those servers into a network for grid computing. The network hosts a world that comprises a grid of squares. Each server hosts a square, and the four closest servers host squares that border the original server's square. The result is a mesh network.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #1 - Posted 2004-02-22 08:01:29 »

Search for RFC's on DNS and geographical location. There are standards for approximating a PC's latitude and longitude based on IP address (IIRC it's actually based on the DNS...but I haven't looked for years).

Alternatively, there are commercial providers who for a small fee do the job for you. They have names like "GeoIP". Some have "free" versions which are less accurate.

malloc will be first against the wall when the revolution comes...
Offline jc

Senior Newbie




Java games rock!


« Reply #2 - Posted 2004-02-22 13:07:18 »

I do not want a map that measures the geographical distance between servers. I do want a map that measures the ping between servers. If two servers are separated by a vast ocean but low ping, then the those two servers should be relatively close to each other on the map, without any regard to the geographical distance between them.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-02-22 13:20:01 »

Quote
I do not want a map that measures the geographical distance between servers.


OK. But that's what the term "location" refers to by default; it would have helped if you'd defined your concept of "location" (your definition still isn't complete, see below).

Quote

I do want a map that measures the ping between servers. If two servers are separated by a vast ocean but low ping, then the those two servers should be relatively close to each other on the map, without any regard to the geographical distance between them.


Do some searches on graph theory and IIRC Klein maps (items in a Klein map move about, and push each other out of the way).

However, I think you need to go away and think about your problem a bit more. You don't seem to have worked it out very well   - e.g. have you tried drawing what you're imagining, to check if it's even possible to draw meaningfully in 2D? My current understanding of what you're after suggests it's not going to be possible to draw, physically, in 2D without making a complete mess. It's like when people want to draw medium sized binary trees - they soon find out that an exponential is rather hard to draw on any finite 2D surface.

Perhaps you could do a sketch / diagram and that would save you having to explain more precisely?

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2004-02-22 13:22:27 »

Quote
If I know the ping between several servers on the Internet, how do I diagram that ping as a two-dimensional map of the "location" of those servers? Has anyone developed an algorithm to achieve this?


Actually, do you mean "diagram"? Because:

Quote

I want to write a program that uses that map to assemble those servers into a network for grid computing.


Which sounds like you just want a data structure, not a diagram.

malloc will be first against the wall when the revolution comes...
Offline Jeff

JGO Coder




Got any cats?


« Reply #5 - Posted 2004-02-22 17:59:05 »

the traceroute command will show you all the hops between two end points.

If you search the RFCs you could find the protocol for thqt and re-implement, but it might be easier just to exec otu and catch the output for processing.

JK

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline jc

Senior Newbie




Java games rock!


« Reply #6 - Posted 2004-02-23 00:55:31 »

Google didn't find any Web pages containing "IIRC Klein maps." However, a weighted graph in which "items in a Klein map move about, and push each other out of the way" is exactly what I need. What I need is a weighted graph that represents servers by vertices and ping by edges.

If a network hosts a world that comprises a grid of squares, then each server hosts a square in the network's world. If a server is connected to another server, then the server's square borders the other server's square in the network's world. If a client moves from square to square in the network's world, then the client moves from server to server.

A weighted graph illustrates which squares are east, west, north, or south of which squares. A server is connected to a maximum of the four closest servers. A mesh network is the result.

If a server is connected to four servers, then the server's square borders the four servers' squares in the network's world. If a server is connected to three servers, then the server's square is at the edge of the network's world. If a server is connected to two servers, then the server's square is at the corner of the network's world. If a server is connected to only one other server, then the server's square borders the other server's square, with nothing at the square's other borders.

Second Life implements a similar system. Read "Enabling Player-Created Online Worlds with Grid Computing and Streaming" at http://www.gamasutra.com/resource_guide/20030916/rosedale_pfv.htm.
Offline cknoll

Junior Member




Flame On!


« Reply #7 - Posted 2004-02-23 14:27:57 »

Hmm, blablabhablahba i think you are being a little hard on him.  He did say that he wanted to find the ping between servers, not the distance.  In the context of his applicaiton, servers with low pings are close, servers with large pings are far.  Hence, they can have a location relative to the source server.

As far as wat JC is looking for:  I thought they introduced the ability in jdk 1.4 (maybe even 1.3) that allow you to do more low level networking calls (I think one such thing was ICMP??  Not sure about that it's foggy but I thought it was used in programs such as PING to measure latency).  You'll have to look into that.  However, I think the best you will be able to do is find the locations of the other hosts relative to the host that is actually measuring the latency.  In other words:  if you do a traceroute, you are getting the latency from your machine to each machine in the route (not the latency between each machine in the chain).  I could be wrong, but i'm almost positive about this.  So, that means that each host would have to run your program to measure it's latency betwen each other host in the graph and report that information back to a central host that can then diagram the locations based on the data from each host.  Sound complicated? Yeah, sorta.  However, here's a program that is very very nice with graphing:

yEd Graph Editor (JNLP enabled! and free)
http://www.yworks.com/en/products_yed_about.htm

This is a very very nice tool, it will attempt to layout as cleanly as possible even the most complicated graphs.  I think the graph mode you will want to use is Smart Organic Layout.  Once you figure out the data you want to diagram, you can possibly write a file in the format that yEd can read, and you can use the yEd tool to layout the graph.

As far as the data you are going to try to diagram, Blahblahabbahahaa is right, the diagram will look very messy if you have edges going from each node to every other node in the graph.  (20 nodes will have 380 edges!)  So, perhaps you only want to capture the 'closest neighbor (or in your case, the 4 closest neighbors) and attach edges between those nodes, and then let yEd lay it out for you.

But your first problem is going to be programatically findnding the ping times between those servers.  Quick and dirty could be to exec a ping to each server and capture the output, but I was almost certain they added an API that allows you to write your own ping. Maybe google search on +ping and +java will turn something up.

-Chris

Offline cknoll

Junior Member




Flame On!


« Reply #8 - Posted 2004-02-23 14:36:12 »

I should have looked further: yEd uses a file storage mehanism called yFiles (found on the same site).  while yEd is free, i'm not sure about yFiles.  But maybe you could try creating your graphs in yFiles format and use yEd to lay it out.  In any case, have fun!

-Chris
Offline cknoll

Junior Member




Flame On!


« Reply #9 - Posted 2004-02-23 14:49:09 »

Ok, last follow up.  I did some searching on ICMP (needed to do full-fledged pings), and as of a 4/2003 post, there was no ability in java to do this, outside of using JNI.  So, your options are as follows:

1: Take a look at http://www.geocities.com/SiliconValley/Bit/5716/ping/index_eng.html  to see if a Win32-only native lib will work for you.

2: Write your own JNI lib that will get at the proper native calls.

3: Parse the output of Ping.

4: Write a program that measures the response time between sending a packet to an echo server and receiving a response.  This is very inaccurate however.

5: Wait for ICMP support in the JDK (doesn't seem to be comming any time soon).

Hope this helps.

-Chris
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #10 - Posted 2004-02-23 15:37:52 »

Quote
Ok, last follow up.  I did some searching on ICMP (needed to do full-fledged pings), and as of a 4/2003 post, there was no ability in java to do this, outside of using JNI.  So, your options are as follows:


It's in 1.5, IIRC, Not as the ability to craft arbitrary ICMP messages, but as a specific feature to support ping.

PS IIRC = If I recall correctly Smiley

The real problem is not just the number of edges, it's the fact that some people assume you can just say "take the nearest four only", and it will work when in fact that is not necessarily a mathematically possible algorithm, unless you have a particularly cunning co-ordinate system and/or graphing algorithm.

e.g. what do you do when you have servers ABCDEFGHI like this:

A B C
D E F
G H I

and E's four closest neighbours become A, B, F and H, but all the rest remain the same?

You now have a topology that is mathemtically impossible in 2D cartesians because you hadn't thought about your definition of "location" and "closest" properly. Drawing it is going to be a major PITA.

If I sounded harsh it's just because I'm pressed for time right now, and if I've understood jc's aims properly, then fundamentally jc needs to go and think about this some more.

It would also help if jc put together some use-cases to explain why and how this information will be used, for instance why don't you just make the relative locations permanent and ignore the ping time?

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #11 - Posted 2004-02-23 15:39:36 »

Quote

Second Life implements a similar system. Read "Enabling Player-Created Online Worlds with Grid Computing and Streaming" at http://www.gamasutra.com/resource_guide/20030916/rosedale_pfv.htm.


Only had time to skim it, but...their system is completely different (I may have misunderstood from reading too fast, apologies in advance if so).

They do not move their servers around, they ahve a static topology that ignores ping times.

I'm afraid I can't see any valid reason why you want to do what you are describing, so I'm probably missing the point somewhere here...?

malloc will be first against the wall when the revolution comes...
Offline jc

Senior Newbie




Java games rock!


« Reply #12 - Posted 2004-02-23 17:20:38 »

Well, I want to write a manager that manages a mesh network for grid computing, allows donors to donate servers to the mesh network, and intelligently incorporates those servers into the mesh network.

Items in a Klein map move about, and push each other out of the way. Thus, the Klein map represents servers by vertices and ping by edges. However, if the edges are invisible, then a scatter plot is the result. After all, we care only where servers are on the Klein map, not necessarily the ping between them.

I realize that my original idea will not work, so I devised another. The manager analyzes the Klein map, superimposes a grid of squares over the Klein map, and instructs each square's most powerful server to host a square in the network's world. If the first server is adjacent to the second server, then the first server's square is adjacent to the second server's square in the network's world.

Alternatively, the manager analyzes the Klein map, superimposes a grid of squares over the Klein map, and clusters together each square's servers to host a square.
Offline cknoll

Junior Member




Flame On!


« Reply #13 - Posted 2004-02-23 17:55:20 »

Yes, I came to the same conclusions as blahblahhahbabhah about the article:  JC seems to be talking more about a ad hoc mesh network where, based on network latencies, the servers will arrange themselves.  But, if he's trying to recreate what they have done in second life,   it's not going to happen:  You'll end up in situations where there's supposed to be a server to the east but that server has already been claimed as some other server's north!  It's complicated.  Plus, if this post is related to the 'Replication of Server Sate' post, you'll notice that in the Second Life schema, no state is being replicated across servers (except perhaps for 'fringe' events that need to be seen across server boundaries, but that only ever impacts up to 4 servers.

-Chris
Offline jc

Senior Newbie




Java games rock!


« Reply #14 - Posted 2004-02-23 18:29:06 »

Yes, I realize that my original idea will not work. What if a master server builds a Klein map, superimposes a grid of squares over the Klein map, creates a cluster in each square with said square's servers, and instructs each square's cluster to communicate with adjacent squares' clusters only?

The grid of squares determines which squares are east, west, north, or south of which squares. Thus, a square at the center of the grid communicates with four adjacent squares, a square at the edge of the grid communicates with three adjacent servers, and a square at the corner of the grid communicates with two adjacent servers only.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #15 - Posted 2004-02-23 18:58:51 »

Quote
Yes, I realize that my original idea will not work. What if a master server builds a Klein map, superimposes a grid of squares over the Klein map, creates a cluster in each square with said square's servers, and instructs each square's cluster to communicate with adjacent squares' clusters only?


The same problem exists: you can't actually guarantee to make the Klein map, unless you are willing to work in a lot more than 2 dimensions.

Fundamentally you have several problems here:

  •  A game where each map square is actaully a valley which you can't see out of makes this all very sensible and clever; in similar games, ignore the next point...
  • It is foolish to try to do multi-server maps using a grid of squares and random self-organizing clusters spread over the internet. It simply doesn't work. A lot of people have tried it and it is fundamentally really foolish - if they sat down and really thought about it they'd realise it was a dumb thing to do. I'm not suggesting you're a fool - you're wise enough to ask first, which is more than a lot do!
  • It's a bad architecture to try to do multi-server maps using a grid of squares. There's some fundamental problems to do with synchronization that would make anyone who knew their stuff tear their hair out. In fact, a square grid is possibly one of hte most stupid things you can do, because there are obvious ways of doing it much better that are no more programming time but increase performance without increasing complexity. Shrug.


The fact that second life chose a square grid implies that their architects might not be very good - but there's no way of being sure wihtout looking at the rest of their system; it might be that some aspect of the game design means this really doesn't matter (in which case, fair enough). Looking at other online games, the chances are they probably hadn't done something like this before.

malloc will be first against the wall when the revolution comes...
Offline Jeff

JGO Coder




Got any cats?


« Reply #16 - Posted 2004-02-24 21:18:50 »

The OTHER big problem here ofcourse is that ping time is highly variable.

So your are either going to have to do some kind of average over a fairly long time or your grid will constantly be re-arranging itself.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline jc

Senior Newbie




Java games rock!


« Reply #17 - Posted 2004-02-25 01:59:46 »

What if the MMOG comprises a master server that manages a distributed network of servers? If a client wants to participate in the MMOG, then the client queries the master server for a server list. Then the client connects to the server with the lowest ping.

Each server runs a common map and multicasts packets of its clients' actions to every other server. The master server determines how many servers to which to multicast. Each packet's header declares where on the map the packet's client's action occurred. If a server receives a packet in which the packet's client's action has no effect on the server's own clients, then the server ignores the rest of the packet. This should substantially reduce each server's required bandwidth.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #18 - Posted 2004-02-25 09:45:51 »

Quote
What if the MMOG comprises a master server that manages a distributed network of servers? If a client wants to participate in the MMOG, then the client queries the master server for a server list. Then the client connects to the server with the lowest ping.


Short answer: you're getting into very seriously complex programming problems. Distributed systems tend to be very hard to do, to get right, and to make fast. Some people believe this is largely because the majority of programming and OS paradigms we have today were designed for non-distributed programming, so whilst we use a C derivative language to program it will always be difficult, etc. I suspect there's a lot of truth there from what I've seen of some of the research environments.

But there's also a lot of fundamental problems, mainly to do with uncertainty. A perfect OS still has a probability of crashing, even with automatic crash-prevention, because your hardware can *never* be perfect (cosmic rays corrupt your RAM every day, for instance). But on one PC the failure rates are so low you never need worry about this in ordinary programming - you assume that 1 + 1 always equals 2 (even though even something that simple can go wrong!). In distributed programming, the failure rates go up by a factor of billions, to the point where everything has a reasonably high chance of failing, acting in the wrong order, etc. This makes distributed programming very hard; you can check everything, but then you have so little performance you can't run your app. Or you can check nothing, and find your app never works (note: this actually happened to The Sims Online, they couldn't get the game to work at all for a long time, until they changed their development methodologies).

That's a gross over simplification. If you are interested in this area in a personal sense, you should go and do a lot of background research in distributed systems - most of the books that are 10-15 years old are still 100% valid today because the same major netwokring etc problems exist (although you can ignore any chapters on "efficient algorithms for real-time backup to tape drives" etc Grin).

If you want a commercial solution now, you shouldn't even beign to consider rolling your own. There are dozens of 3rd party systems available right now (including ours, although we soon will run out of resources to take on any more customers, at least for the next 4 months). They all have pros and cons, and few are particularly similar, so you need to evaluate each on a case-by-case basis.

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #19 - Posted 2004-02-25 09:48:27 »

Or, to put it another way:

<shameless plug>
http://www.stratics.com/content/articles/mmoguide.php
</shameless plug>

The reason I'm saying this now is that the problems we're highlighting at the moment are only the first in a list of a couple of hundred you'll end up having to go through. If you were asking problems that were down at about number 50 then it would be worth us just answering them for you. As it is, I'm guessing you've not really looked at this in detail yet, and so I'm trying to make sure you understand how long a path you're embarking on before you start Smiley

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #20 - Posted 2004-02-25 14:40:51 »

Quote


A distributed network should be more reliable than a centralized network. All servers on a distributed network function collectively, but can also function independently. If each server multicasts packets to every other server on a distributed network, then failure of one server should not affect the distributed network.


This is what I was talking about... you don't appear to know the fundamental technology problems. Note that I say "appear" because at the moment I'm only guessing at what your knowledge and experience is of dist sys; I may have guessed wrongly.

A dist net is fundamentally incredibly unreliable.

To say that a dist net is "more reliable" suggests you have a high-level awareness of a single feature called failover. Failover is really unexciting and trivial, and can make a cluster appear to have the conjoined uptime of all it's members. It doesn't change the fact that reliability between members is poor, and it only works if you have lots of difficult and complex stuff going on in the background to *enable* it to work, or if you have a game where each server is a shard, and runs as a completely separate "game"; even then it's often still difficult because real-time replication/distributed-mirroring is non-trivial (mainly because it's difficult to make sure it goes fast enough).

For instance, the simple question of altering game-data. How do you ensure there are no conflicts when two servers want to write to the same data? If you make each server authoritative for it's own data only, how do you make sure the other servers can read that data?

If you think your multicast system will solve this, you probably haven't done the calculations for your bandwidth usage, latency inflation, and above all the per-server storage needs and unmarshalling processing needs (iterating over the locally stored game state implementing changes encoded in incoming packets).

malloc will be first against the wall when the revolution comes...
Offline Mark Thornton

Senior Member





« Reply #21 - Posted 2004-02-25 15:19:49 »

Perhaps make these synchronization problems a feature of the game --- just like the space time distortions Enterprise is encountering every week. Hey maybe that is how they came up with those plots --- someone dropped the original scripts on the floor and picked them up out of order.  Smiley
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #22 - Posted 2004-02-25 15:51:12 »

Quote
Perhaps make these synchronization problems a feature of the game


IMHO this is the best solution of all for such problems - cheapest, least risky, most effective. But you can't do it effectively until you have a *really* good and comprehensive understanding of all the problems Sad.

malloc will be first against the wall when the revolution comes...
Offline jc

Senior Newbie




Java games rock!


« Reply #23 - Posted 2004-02-25 17:34:02 »

Quote


For instance, the simple question of altering game-data. How do you ensure there are no conflicts when two servers want to write to the same data? If you make each server authoritative for it's own data only, how do you make sure the other servers can read that data?


What if each server is responsible for its own game data? For example, if a client creates an account on Server 1, then the client is allowed to create a certain number of objects with his account on Server 1. Server 1, which is authoritatively responsible for the client's objects, periodically sends multicasts of the client's objects to every other server on the distributed network.

If Server 2's client affects Server 1's client's objects, then Server 1 authenticates any actions to the objects. If Server 1's client cancels an account, then Server 1 destroys the client's objects. Synchronization should not be a problem. However, if latency causes two objects to overlap, then Mark Thornton's solution is necessary.

An inexpensive solution to latency does not exist. If it did, then "rack-mounted Linux-based IBM eServer xSeries systems hosted by IBM and running on internal fiber-optic networks" would not be http://Butterfly.net's solution to latency. Hardware and bandwidth are expensive. I simply want to develop the world's cheapest, but most scalable, MMOG.
Offline Mark Thornton

Senior Member





« Reply #24 - Posted 2004-02-25 18:07:44 »

Quote

An inexpensive solution to latency does not exist.
Each server is reponsible for a planet (town), the population of each planet (# of clients) is restricted to the servers capacity. Information flow between planets (towns) is limited by the speed of light (horse and cart). So latency need only be less than the model time it takes for information in the model universe to travel between places. So latency between servers ceases to be a problem. Doesn't help with latency between a client and a server.
Thus if a user in the UK wants to play on Mars and the Mars server is in Taiwan, it won't be much fun.
Offline jc

Senior Newbie




Java games rock!


« Reply #25 - Posted 2004-02-25 18:57:29 »

Unfortunately, your solution means that each server can host only a portion of the world--which completely contradicts the notion of scalability via donors who donate servers to the distributed network. Yes, each server should host only a limited number of clients, but a truly scalable MMOG should allow as many people as possible to assemble anywhere on the map. Thus, all servers must host the same map of the whole world so that each server's clients can be anywhere on the map.

The solution that I outlined in my previous post is incredibly crude, but I cannot think a cheaper way to implement a seamless, yet scalable, world without a hideous amount of expensive hardware.

A MMOG should be a window into another reality, and to artificially limit the number of clients who can assemble at a single location on the map is totally unrealistic. Expensive hardware can solve this problem with brute force, but if a MMOG is too expensive for a university to host, then nobody will play it. If a university can host a MUD, then a MMOG that scales linearly with the university's budget is the next logical step.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #26 - Posted 2004-02-25 18:59:46 »

Quote

If Server 2's client affects Server 1's client's objects, then Server 1 authenticates any actions to the objects.


How do you know they affect each other? This is usually a hard problem you won't notice until a little further on in your planning. Here you've glossed over it.

Assuming you can fix that, you go on to mention your multicast again. How do you know you have the available bandwidth and latency to afford the amount of multicast traffic you'll generate without it overloading (and breaking the rest of the system!) or bottlenecking?

I wish there were a single resource I could refer you to (e.g. a good book) that explained all this in detail so you could just read it up and end up with the wisdom of decades. This is theoretically possible - the knowledge exists and people have learnt how to describe it effectively - but I haven't yet seen a book that covers the issues for games Sad.

Quote

An inexpensive solution to latency does not exist. If it did, then "rack-mounted Linux-based IBM eServer xSeries systems hosted by IBM and running on internal fiber-optic networks" would not be http://Butterfly.net's solution to latency. Hardware and bandwidth are expensive. I simply want to develop the world's cheapest, but most scalable, MMOG.


Butterfly does not provide a solution to latency. Bearing in mind my huge prejudice against butterfly, my opinion is that they are using the wrong tool to solve the problems of MMOG's, and any games developer that is unfortunate enough to buy their solution will soon find this out. Grid computing is a solution that has desperately been seeking a problem to solve for many years (hence IBM's backing of BF - they need more problems for all their existing research there to solve). IMHO it's inappropriate for the majority of games, and BF has a good business model (for them: it makes them much money and power) but which screws the games developers (wrong tool coupled with some nasty long-term side-effects).

But as MT points out, latency is a separate issue entirely in each of several different parts of the system. Which one were you referring to? Do you know all the different places, and understand the importance of each to the success of the system?

malloc will be first against the wall when the revolution comes...
Offline Mark Thornton

Senior Member





« Reply #27 - Posted 2004-02-25 20:09:23 »

Quote

A MMOG should be a window into another reality, and to artificially limit the number of clients who can assemble at a single location on the map is totally unrealistic.

I wasn't being entirely serious. However out in the real world most locations do have capacity limits --- there are only so many students who can fit into a Volkswagen Beetle! The International Space Station is currently limited to two (or five during mission change over).
Offline Mark Thornton

Senior Member





« Reply #28 - Posted 2004-02-25 20:36:43 »

Suppose your virtual world tries to simulate a visit to Highbury Stadium (capacity ~39000) to watch a football match. Each server could manage perhaps a block of seats. There will be no problem maneging the irritating lard mountain in front of you who keeps blocking uour view, or the actions of other in the immediate vicinity. However every so often someone tries to start a Mexican wave or sing some song. Due to latency effects this will propagate rather erratically around the stadium. One block of seats may not even be singing the same song (unless the announcer is attempting to 'conduct' proceedings, but that doesn't always work).
In a system such as this the information from other servers could be late, inaccurate or only a rough approximation of activity elsewhere, but it wouldn't actually matter. You could subdivide the work down to the level of a server per seat block, but beyond this users may start to notice the seams.
Offline jc

Senior Newbie




Java games rock!


« Reply #29 - Posted 2004-02-25 21:18:53 »

I love this place. Any attempt to gloss over a mediocre explanation is glaringly obvious, and the experts will detect it instantly. The experts are, like, debuggers. Smiley

If a server periodically sends multicasts of the location/state of its clients to every other server, then the server also receives the location/state of every other server's clients. A server ignores packets that have no effect on the server's clients.

For example, assume that all of a server's clients are located in a castle on the map. The server receives multicast packets of other servers' clients. However, the server analyzes each packet's header and determines that only a few packets describe events that occurred near the server's clients. The server accepts those packets that describe events that occurred near the castle on the map, but rejects everything else. (The existence of the castle is irrelevant. I merely mention it as a point of reference.)

I mention multicasting because the multicasting is supposed to reduce the amount of required bandwidth. If 64 servers exist on a network, then a server sends out a multicast packet to 63 other servers only once. Otherwise, a server sends out a unicast packet to 63 other servers, 63 times.

I cannot control bottlenecks on other people's routers, so this is the best I can do. I have absolutely no idea on how to reduce the amount of required bandwidth further.

BTW, I can settle for a late, inaccurate, or rough approximation of activity from other servers. The objective is to cram as many people into a map as possible, as cheaply as possible, without zones or shards.
Pages: [1] 2
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (55 views)
2014-04-15 18:08:23

BurntPizza (53 views)
2014-04-15 03:46:01

UprightPath (66 views)
2014-04-14 17:39:50

UprightPath (49 views)
2014-04-14 17:35:47

Porlus (66 views)
2014-04-14 15:48:38

tom_mai78101 (90 views)
2014-04-10 04:04:31

BurntPizza (151 views)
2014-04-08 23:06:04

tom_mai78101 (246 views)
2014-04-05 13:34:39

trollwarrior1 (204 views)
2014-04-04 12:06:45

CJLetsGame (211 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!