简体   繁体   English

通过互联网传输大文件的可靠而快速的方法

[英]Reliable and fast way to transfer large files over the internet

I'm working with a setup involving many clients PCs and some server machines. 我正在使用涉及许多客户端PC和一些服务器机器的设置。 I need to organize a reliable and fast method of file transfer between these PCs, that will be initiated by C# apps running on both. 我需要在这些PC之间组织一种可靠而快速的文件传输方法,这将由在两者上运行的C#应用​​程序启动。 Any client may want to send/receive data from any server. 任何客户端都可能希望从任何服务器发送/接收数据。 The options are: 选项是:

  • FTP - Use FtpWebRequest or SOSFTP to upload files onto an FTP server. FTP - 使用FtpWebRequestSOSFTP将文件上载到FTP服务器。 The server checks for new files on its filesystem and does the required steps. 服务器检查其文件系统上的新文件并执行所需的步骤。

  • SCP - Secure file transfer. SCP - 安全文件传输。 Usage same as FTP but increased security between machines. 用法与FTP相同,但增加了机器之间的安全性。 Probably slower than FTP. 可能比FTP慢。

  • DropBox / Box.Net - Use an online cloud storage solution with a library such as SharpBox . DropBox / Box.Net - 使用带有SharpBox等库的在线云存储解决方案。 May be free / paid. 可以免费/付费。 May be less secure considering the said party has your files. 考虑到该方拥有您的文件,可能不太安全。

  • UDP - Use a library such as EME or GoAnywhere to transfer data from PC to PC directly via UDP. UDP - 使用EMEGoAnywhere等库直接通过UDP将数据从PC传输到PC。 Probably faster but probably more unreliable since it uses custom technology. 由于它使用自定义技术,可能更快但可能更不可靠。

What do you recommend? 您有什么推荐的吗?

I have a super-biased opinion, coming from a company that makes file transfer software, so I'm putting the disclaimer front and center to take everything I say with a grain of salt. 我有一个超级有偏见的意见,来自一家制作文件传输软件的公司,所以我把免责声明放在前面和中心,把我所说的一切都拿出来。 ;-) ;-)

If you are sharing very large files to multiple endpoints, you are well served with one of two things: 如果要将多个大型文件共享到多个端点,则可以使用以下两种方法之一:

  1. An MFT (Managed File Transfer) solution MFT(托管文件传输)解决方案
  2. A product or API that uses a UDP-based protocol 使用基于UDP的协议的产品或API

1 - The MFT solutions typically use TCP-based transfer (like FTP) as the transport mechanism, but usually include additional reliability mechanisms not found in pure TCP. 1 - MFT解决方案通常使用基于TCP的传输(如FTP)作为传输机制,但通常包括纯TCP中没有的其他可靠性机制。 They will also include tools to schedule and organize transfers between many endpoints. 它们还将包括用于在许多端点之间安排和组织传输的工具。 To the best of my knowledge, there are not any significant MFT solutions that are available for free or low cost, but there are a plethora of enterprise-grade MFT solutions out there at the expected costs. 据我所知,没有任何重要的MFT解决方案可以免费或低成本获得,但是有很多企业级MFT解决方案以预期成本出现。

2 - For several years now, some companies have built proprietary control and reliability mechanisms into protocols built on top of UDP. 2 - 几年来,一些公司已经在基于UDP的协议中构建了专有控制和可靠性机制。 By creating this custom layer, UDP (which has no reliability of its own) actually becomes MORE reliable and can have more features than TCP-based transfer can ever have, while not being adversely affected by packet loss and latency (read as: typically much faster transfer speeds). 通过创建这个自定义层,UDP(它没有自己的可靠性)实际上变得更加可靠,并且可以拥有比基于TCP的传输更多的功能,同时不会受到数据包丢失和延迟的不利影响(读作:通常很多)更快的传输速度)。 This protocol is not necessarily independent of MFT, either (it will inherently have some MFT characteristics and vendors might bake it into an MFT solution), but is potentially usable for its raw protocol (via API) and without all the UI trappings of a traditional "MFT solution". 该协议不一定独立于MFT(它本身具有一些MFT特性,供应商可能将其烘焙到MFT解决方案中),但可能可用于其原始协议(通过API)并且没有传统的所有UI特征“MFT解决方案”。

There ARE open-source UDP-based file transfer protocols out there like Tsunami or UDT. 有像Tsunami或UDT那样的基于UDP的开源文件传输协议。 They are not particularly well-maintained or feature-rich (there's some of my bias!) and as far as I know, none have a native C# library. 它们没有特别好的维护或功能丰富(我有一些偏见!)据我所知,没有一个本地C#库。 On the same note, though, none of the commercial offerings that I'm aware of have a native C# library either, though wrappers are available. 但是,同样的说明,我所知道的商业产品中没有一个拥有本地C#库,尽管包装器可用。


If the kinds of transfers you describe are going to be a regular and ongoing part of the organization's daily activities, I have a hard time recommending anything beyond what I mention above. 如果您描述的转移类型将成为组织日常活动的常规和持续部分,那么我很难推荐除上述内容之外的任何内容。 And to do it "right" (or at least without a non-trivial development project) you will probably want a commercial solution. 要做到“正确”(或者至少没有非平凡的开发项目),您可能需要一个商业解决方案。

I found it interesting that GoAnywhere is mentioned here. 我觉得有趣的是GoAnywhere在这里提到了。 It is considered an MFT solution. 它被认为是MFT解决方案。 I've used MFT for several years and found it very effective in doing exactly what you are describing here without having to write C# code. 我已经使用了MFT几年了,发现它非常有效地完成了你在这里所描述的内容而无需编写C#代码。 It's not free but I think it is well worth the cost. 这不是免费的,但我认为这是值得的。

It allows you to automate and schedule the various transfer protocols such as FTP, SFTP, FTPS, PGP, HTTPS, and also across network connections to multiple shared pc's and servers. 它允许您自动化和调度各种传输协议,如FTP,SFTP,FTPS,PGP,HTTPS,以及跨多个共享PC和服务器的网络连接。 MFT also allows me to work on formatting changes if I need to massage the data to work with different applications. 如果我需要按摩数据以使用不同的应用程序,MFT还允许我处理格式更改。 Run queries to extract just the data I need from various data sources. 运行查询以从各种数据源中提取我需要的数据。 It also logs all transactions so that I can verify that it has sent the files and can be setup to alert me with an email if there are any errors. 它还会记录所有事务,以便我可以验证它是否已发送文件,并且可以设置为在发生任何错误时通过电子邮件提醒我。 I found it to be the perfect tool for all my data transfer requirements. 我发现它是满足我所有数据传输要求的完美工具。

I am NOT an employee of any MFT software companies but a very happy customer that loves the product. 我不是任何MFT软件公司的员工,而是热爱产品的非常满意的客户。 It has made my work life SO much easier. 它使我的工作生活变得更加容易。 There's a great example of how it helps IT staff here at http://blog.linomasoftware.com/2012/01/24/managed-file-transfer-changed-my-life/ 这里有一个很好的例子,它可以帮助IT人员http://blog.linomasoftware.com/2012/01/24/managed-file-transfer-changed-my-life/

您可以使用WCF功能

As i understand what you have written, the data is shared to everyone client as server. 据我了解你所写的内容,数据作为服务器共享给每个客户端。 So why not consider using torrent protocol. 那么为什么不考虑使用torrent协议。 Here is a open source library. 这是一个开源库。 http://www.mono-project.com/MonoTorrent http://www.mono-project.com/MonoTorrent

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM