我们可以 P2P 下载 .js 文件和图像吗?
我注意到 Chrome 中有一个 p2p api 仍在开发中,这让我想知道如果我可以从附近也访问该网站的同行那里下载公共数据(如 .js 文件、图像),会不会更快?有一些作品是这样做的吗?
I noticed that there is a p2p api in Chrome which is still under development, it make me wondering that would it be faster if I can download public data(like .js files, images) from a nearby peer who is visiting the site too? Is there some works doing this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
就我个人而言,我怀疑,考虑到使用 P2P 协议所涉及的所有开销,使用 P2P 网络下载资源是否会提高速度。事实上,除非这些资产相当大(例如,大于 20Mb),否则大多数时候您的服务器连接将击败任何非 LAN 的连接,因为它的上传速度比大多数家庭连接更快。
如果您想以具有真正可衡量性能的方式分发资产,可以使用内容分发网络,例如Akamai 或新的 Google Page Speed Service 工具将产生更直接的影响。另外,如今这些功能可以在所有设备上使用,包括移动设备和所有设备。
Personally, I doubt, with all the overhead involved in using a P2P protocol, that there would be a speed improvement using a P2P network to download assets. In fact, unless those assets were fairly large (say, greater than 20Mb), most of the time your server's connection will beat out anything that isn't LAN, simply because it has a faster upload speed than most home connections.
If you want to distribute assets in a way that has real measurable performance, a Content Delivery Network, such as Akamai or the new Google Page Speed Service tools will have a more immediate impact. Plus, these work across the board, mobile devices and all, today.