在非常大面积的模拟中对同伴的nr进行合格估计? [英] Qualified estimation of nr of peers in a very-large-area simulation?

查看:130
本文介绍了在非常大面积的模拟中对同伴的nr进行合格估计?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这个问题是针对指示/预感的.我意识到它可能之前已经讨论过,并且没有很好的科学答案.但是,我寻求有经验/合格的意见,因为没有确定的答案.指示将是有价值的线索,因此,我要求社区允许一些模糊性.

This question is for an indication/hunch. I realize that it may have been discussed before and that there is no good, scientific answer; nevertheless i seek for experienced/qualified opinions, as there are no definite answers to be found. An indication will be valuable as a clue, hence i ask the community to allow a bit of fuzzyness.

背景:

考虑进行超大面积3D仿真

  • n个参与者(同行,NAT背后的人)分布在多个城市.
  • 在模拟中,每个参与者都被视为一个运动对象"(因此,每个运动对象都由对等方拥有).
  • 每个对等方都应正确看到所有其他运动对象(即需要位置更新).

(整个模拟较大,因此我们现在只关注一个斑点,并将其视为整个世界".)

(The entire simulation is larger, so we now focus on one single blob, and consider it to be the entire "world").

比例:

  • 世界/血球尺寸10x10公里(几乎是平坦的世界).
  • 对象大小:最大长度10米

(我们省略了遮挡,优化,平衡等操作.假定所有内容都需要查看和更新​​).

(We omit things like occlusion, optmisations, balancing etc. Assume that all there is needs to be seen and updated).

移动对象"的性质:

  • 它在物理上/位置上都是不安定的(与大型船相比) 波浪).
  • 必须将其动作 与所有同级同步(但单个同步不需要与其他同步同时进行).
  • 如果X看到一个但不拥有它,它可能会表现良好(确定地,通过X的本地物理计算)大约1秒钟,但此后它会发散(由于不同的帧速率)并且需要位置更新(UDP数据包)来自其所有者.
  • it is physically/positionally restless (compare to a boat in big waves).
  • it's movement must be sync'ed to all peers (but individual sync does not need to be simultaneus with other syncs).
  • if X sees one, but does not own it, it will behave well (deterministically, by X's local physics calculation) for maybe 1 second, but after that it will diverge (due to different frame rates) and needs a positional update (a UDP packet) from it's owner.

从同行的角度来看:

  • 他需要更新n-1个其他同伴
  • 他需要接收其他n-1个同行的更新

位置更新是关键更新,因此请仅关注这些更新.一个更新是大约20-30倍. 200个字节.仅考虑UDP.

The positional updates are the critical ones, so focus only on those. One update is ca 20-30 doubles, ca. 200 bytes. Consider UDP only.

如我所见,有两种选择.第一个是无服务器的,其中所有内容仅在peer2peer通信上工​​作.第二个是中间有一个服务器(现在是一个).

As i see it, there are two options. The first one is serverless, where everything works solely on peer2peer communication. The second one is having a server (one, for now) in the middle.

1.无服务器,p2p 每个对等方都必须与许多其他对等方交谈.一个问题是"Nagle'ing"是没有用的.第一个原因是所有端点都不同,第二个原因是本地数据在帧之间变化,并且累积多个帧的数据以稀疏地发送更大的数据包毫无意义.最旧的帧的数据将过时.但是,优点是不依赖于服务器.

1. Serverless, p2p Each peer must talk with many other peers. One problem is that "Nagle'ing" is useless. First reason is that all endpoints are different, Second is that the local data changes from frame to frame, and there is no point in accumulating multiple frames' data, to send in a larger packet, more sparsely. The oldest frames' data would be outdated. An advantage is however not being dependant on a server.

2.服务器支持 每个对等方将其信息发送到高性能,高带宽服务器,该服务器可以更好地快速接收并分发给所有对等方.同样,任何对等方只能从一个端点(服务器)接收所有对等方的数据.

2. Server-supported Each peer sends it's info to a high-performance, high-bandwidth server which is able to better receive and distribute to all peers, at a fast rate. Similarly, any peer would receive all peers' data from one endpoint only, the server.

从自然上讲,每个对等方都会运行一个游戏循环.

Naurally, each peer runs a game loop.

问题:希望基于某种经验,作为情况1,情况2的最大对等端数目,您将抛出什么?谢谢.

Question: Hopefully based on some kind of experience, what would you throw as a maximum functional number of peers for case 1, case 2? Thx.

推荐答案

很难量化,但是对于如此全面的同步,我建议使用集中控制.

It is difficult to quantify, but for such a level of all-to-all synchronization I would recomend centralized control.

在p2p模式下,每个对等方将在每个伪回合中发送n-1个数据包并接收n-1个数据包.在集中模式下,他们将接收n-1个数据包,但仅发送1个数据包,从而在此任务中花费的时间更少.因此,集中化模式似乎更具可调用性.

In p2p mode each peer would send n-1 and receive n-1 packets each pseudo-round. In centralized mode they would receive n-1 packets, but would send only 1, spending less time in this task. So centralized mode seems to be more scallable.

服务器可以在传送更新消息之前检查它们是否一致.在p2p中,每个对等方都必须处理不稳定或断开连接的对等方,这可以由服务器更好地进行管理.

A server can check if update messages are consistent before delivering them. In p2p, each peer would have to deal with instable or disconnected peers, which could be better managed by a server.

在集中模式下,必须更好地选择更新时间,因为客户端更容易经历更高的延迟,因为每个数据包必须先行进到服务器,然后再返回到客户端.为客户选择最佳服务器是要考虑的一件事.

In centralized mode update-time has to be better carefully choosen, because clients are more susceptible to experience higher latencies, as each packet has to travel towards the server, and then back to the clients. Choosing the best server for clients is one thing to consider.

组合数据包可以使信息更快地通过网络,但是由于数据过时是一个问题,请尝试确保每个数据包尽可能小,在这种情况下,传输时间更短.

Combining packets could make the information traverse the network faster, but as outdating of data is an issue, try to make sure each packet is as small as possible, transmission time is smaller in this case.

这篇关于在非常大面积的模拟中对同伴的nr进行合格估计?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆