问题标签 [roundtrip]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
177 浏览

.net - 客户端从服务器复制到同一台服务器,没有往返?

这受到启发,Does File.Copy() from a network share to another share on another share copy the file over the network?

在 .NET 中,客户端是否可以让服务器将服务器文件复制到同一服务器上的不同位置,而无需通过客户端往返文件?

是否有对这种操作的内置支持,如果没有,你将如何启用这样的东西?

0 投票
4 回答
413 浏览

xml - “XML 往返”对 Word 2003 文档有什么影响?

将 Word 2003 文档保存为 XML,然后再返回会导致文件大小减小,而且可能还有更多我不知道的内容。新文档与旧文档的 WordML 差异仅显示修订保存 ID 的差异。那么,往返中丢失了什么?

如果实际上什么都没有丢失,那么如何解释文件大小的几千字节呢?

0 投票
4 回答
8538 浏览

synchronization - 好的多人/mmo 客户端<>服务器游戏在移动计算中使用延迟吗?

这里有几个问题。

想象一下,我有客户端 A 将向服务器发送以下消息:“开始移动”。

服务器不会立即收到此消息,因为延迟会导致延迟。

问题 1:ping(或更好:往返时间​​)是客户端向服务器发送消息并收到响应所需的时间。如果您可以忽略服务器注意到它已收到消息并开始发送响应所需的时间(这应该很短),这是否意味着以下情况?

  1. 客户端向服务器发送某些信息所需的时间 = 往返时间 / 2
  2. 服务器向客户端发送内容所需的时间 = 往返时间 / 2

因此,当客户端 A 发送该消息时,服务器应该会在客户端发送消息后的往返时间/2 毫秒内收到该消息。这引出了下一个问题。

问题 2:客户端是否应该先发送包,然后等待往返时间/2 毫秒,然后才能在客户端实际执行该命令(在这种情况下:向前移动)以补偿延迟/滞后?

现在,服务器将向附近的所有玩家发送以下消息:“客户端 A 正在向前移动”。然后,这些客户将确保客户 a 的角色开始移动,这将引导我进入下一个问题。

问题3:接收其他客户端移动的消息的客户端是否应该考虑到该消息是由服务器往返时间/ 2毫秒前发送的?因此,用于移动计算时间戳的当前时间应该减少往返时间/2?

在我看来,所有这些方法都会确保客户端之间的同步得到改善,因为考虑到了延迟。这是正确的做事方式吗?大多数其他优秀的多人游戏都这样做吗?您想给出任何评论、建议、替代方案或随机但相关的呼喊?提前致谢。

0 投票
1 回答
99 浏览

performance - 在 ELinq 中设计查询时需要帮助

这是我的查询:

我觉得我可以提高性能,因为上面的查询是(如果我错了,请纠正我)对服务器执行 2 次往返;由 Count 执行 1 次,然后在执行时执行。

我想把这个 Count 东西发送到数据库,所以它应该只是到服务器的一次往返。

即使它不是确切的东西,这实际上是我需要的:

我希望我可以使用这个 SPROC(即函数导入等),但我需要Include("Vendor"),这限制了我用 Linq 来做。

任何形式的建议都会受到欢迎!

0 投票
1 回答
45 浏览

asp.net - 在哪里可以查看我的 ASP.NET 应用程序中的往返信息?

我正在尝试将应用程序设置存储在我的数据库中,但我想我可能已经创造了一种情况,即进行了多余的往返。有没有一种简单的方法可以查看到 MS Access(我知道,我知道)后端的往返行程?

我想当我在这里的时候,我应该就处理这个项目的最佳方式征求意见。我正在构建一个基于文件名生成链接的应用程序(文件编号为整数,0-5000)。文件存储在网络共享上,按名称排列,并且路径经常更改,因为文件被批量传输以创建空间等。

例子:

  • 文件 1000 - 2000 转到 /path/1000s
  • 文件 2001 - 3000 转到 /path/2000s
  • 文件 3001 - 4000 转到 /path/3000s

ETC

我敢肯定,现在你可以看到我的目标了。最终,我试图避免往返以获取每个文件的路径,因为它们显示在网格视图中。

我对我的想法完全错误并且我的想法可能是垃圾的想法持开放态度。我玩弄了只创建一个平面文件的概念,但如果我这样做,我是否仍然会遇到为 gridview 中显示的每个文件打开和关闭该文件的问题?

0 投票
3 回答
453 浏览

performance - Sharepoint Web 性能优化

我们在以下服务器拓扑上的 SSL 上运行:

  • 1 个 ISA(SSL 终止/缓存/代理+AD 身份验证)
  • 1 个共享点
  • 1 IBM DB2 数据库作为企业/企业数据库
  • 1 MS SQL Server 作为本地数据库
  • 我们最近优化了缓存、压缩、缩小和其他 ASP.net 最佳实践,例如视图状态和 cookie 大小、最小化往返、并行连接/域分片等等......

    现在我们不相信我们处于优化位置,因为网络资源(即带宽,尤其是延迟)超出了我们的控制!

    服务器/共享点的客户端/浏览器是跨大西洋的,即(亚洲、美国、欧洲)。

    据我了解,改善网络(延迟)的唯一方法是: - TCP/SSL 优化 - 硬件/软件?- CDN - 云还是我们自己的?

    0 投票
    3 回答
    1896 浏览

    reverse-engineering - Are there any tools that make keeping the UML models in-sync with the code completely seamless?

    UML Round-Trip Engineering tools with seamless synchronization?

    The Rational suite purports to do it. But it's so pricey and clunky at drawing (worse than the Rose days) that it's not in the reach of most departments.

    What’s amazing is that the free Bouml seems to do a fantastic job. It’s just feels too clunky to use. It has a great deal of functionality, is free (!), very fast, and reverse-engineers complex C++ very well. It also has some nice diagram support, including a very nice sequence diagram. Although the interface is unpolished (and constantly opens dialogs on the rightmost monitor), it does have the beginnings of a very capable product. It's a shame that the interface is so bare-bones and requires the expenditure of a lot of effort. Maybe it's because the author puts most of his time into the actual functionality. Does anyone have experience using Bouml throughout the product lifecycle?

    That leaves the pricey MagicDraw, the very-capable yet reasonably-priced Enterprise Architect, and the slick-looking Visual Paradigm. Of these, only Visual Paradigm had an issue reverse-engineering my project's C++ headers.

    MagicDraw has a strange, old feel. It does a good job at reverse-engineering on its own, although it remains to be seen whether round-trip engineering of complex C++ projects is seamless. They want over $1800 for the multi-language version, so it's priced similarly to Rational tools.

    Enterprise Architect, although far less expensive than most, seems like it may be the most feature complete. It parses and generates C++ flawlessly. Even the comments and formatting are left intact. There are great training materials. But it doesn't handle Objective-C, so less useful for iOS and Mac OS X mixed code projects. The automatic Sequence Diagram generation sounds awesome, but sounds like it only works on Windows .NET projects.

    Visual Architect (>$800 for multi-language 2-way) is bar far the best-looking software modeling tool I've come across. Although it may have some round-trip issues remaining, it is a pleasure to use for building the models by hand. It's even nicer than Rose was in some ways. It has an intuitive way of bringing up the tools you need right at the cursor. Yet as I mentioned, it currently falls short of the goal to keep the model in sync with the source. And it often doesn't even give notification that the import didn't fully work, or that duplicate classes have been created (with the same names). It also makes entry of message parameters difficult, using dialogs, whereas others allow the parameters to be changed right on the diagram. (The free Bouml excels at this, as does MagicDraw and others.)

    Has anyone found a multi-language (Java, C++, C#, ObjC++, Python, Ruby, SQL) round-trip engineering tool that will hold up to real world projects, where customizations are handled (like custom parameters on messages), yet are not wiped out by the next source code import?

    And where all the formatting and comments are completely preserved on generation. Close is not really good enough. If the tools mess up the source code formatting, no developer is going to want the tool run on his source.

    0 投票
    1 回答
    4056 浏览

    tcp - TCP RTT 计算时间戳

    我在这里有一个简单的问题,如何计算 tcp 连接中的往返时间。我使用 tcpdump 获得了通信数据包。在 tcp 数据包中,有时间戳选项,包括 TSval 和 TSecr。RFC 1323 说它可以用来计算 RTT。但是,它没有说如何,或者我没有找到它。无论如何,我对此感到困惑。任何人都可以向我解释这个吗?我只想知道如何计算单个发送的 msg 的 rtt,它是 ack,而不是平均 rtt。

    0 投票
    2 回答
    4267 浏览

    java - 一种在 Java 中使用 IP 地址计算往返时间的方法,在 ping 命令旁边

    我已经使用以下代码在 unix 系统上实现了一种在 Java 中获取 RTT 的方法:

    这工作正常,我可以用输出计算以毫秒为单位的 RTT(延迟)。但是,如果主机阻止了 ICMP,则 ping 将超时。(即使在 Mac OS X 终端或 Windows CMD 中。)

    现在我想找到一种替代方法来以某种方式获取 IP 地址的 RTT/延迟。(我不想在主机端安装软件。)如果您不能提供 Java 示例,请给我其他输入。我可以在多种语言之间进行翻译,而且我真的可以使用 Google。

    0 投票
    2 回答
    956 浏览

    uml - 哪个UML工具可以真正往返java代码?

    许多 UML 工具声称可以对 Java 代码进行正向/反向工程。然而,从以前的经验来看,很少有工具能真正在这个领域发挥作用。

    我已经 3 年没有做 Java 项目了,我想了解这个领域的最新情况。

    特别是我对从图表创建状态机骨架感兴趣,能够为我自己的代码创建挂钩,并能够对状态图进行反向工程(不想在工具之外更改状态机本身)。

    哪些 UML 工具适用于该领域?企业架构师?视觉范式?其他的?

    Geir Ove 挪威