缓存FileSystem并读取.Net [英] Caching FileSystem and reading .Net

查看:122
本文介绍了缓存FileSystem并读取.Net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嘿伙计们,我只是想知道你是否可以帮助我,并可能就如何实现这一点给我一些建议。好的,我们有一个文件传输解决方案,将文件从A移动到B然后再移动到C.文件需要很长时间才能从A传输到B,因为远程服务器上有超过300,000个文件,因此每个文件请求都必须读取整个文件系统并返回最新的文件。我想做的(如果可能的话)是创建一个服务,它将从A一次抓取30个文件并将它们存储在内存中,然后有两个或三个单独的服务从缓存中读取文件,然后将它们传输到C.任何帮助都非常苛刻。



先谢谢。

解决方案

在我看来,那是什么你真正需要的是一种更快的方法来获取文件系统上的文件列表,而不是在内存中保存30个文件。



实际上,更好的解决方案鉴于您在此处所写的内容是将这30个关键文件的PATHS保存在内存中或日志文件中 - 并让需要这30个文件的远程客户端从日志中提取其位置。



但是,您没有提供有关此系统如何工作的任何代码或信息,因此我认为此处的人员无法提供太多帮助。



祝你好运,



-Pete

Hey guys, I'm just wondering if you could help me and possibly give me some suggestions on how to achieve this. Ok, We have a file transfer solution which moves files from A to B and then to C. Files take a long time to transfer from A to B as there is over 300,000 files on the remote server so each request for files has to read the entire file system and return the newest files. What I want to do (if possible) is create a service which will grab say 30 files at a time from A and store them in memory and then have two or three separate services reading the files from the cache and then transferring them to C. Any help is very much apreciated.

Thanks in Advance.

解决方案

It seems to me that what you really need is a faster way to get the list of files on the file system, rather then keeping 30 files or so in memory.

In fact, a better solution given what you've written here is to keep the PATHS of those 30 critical files in memory, or in a log file - and have your remote clients that need those 30 files pull their locations from the log.

However, you didn't give any code or information about how this system works, so I don't think people here are going to be able to offer much help.

Good luck,

-Pete


这篇关于缓存FileSystem并读取.Net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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