简体   繁体   English

Windows Workflow Foundation在我的示例中有用吗?

[英]Windows Workflow Foundation usefull in my example?

I basically want to process a large file of records ie 2 million. 我基本上想处理一个很大的记录文件,即200万个。 Parse the file and send each record to a web service which will for the sake of argument return a string value if success and an error string if unsuccessful which have to be appended to that record file. 解析文件并将每条记录发送到Web服务,为了成功,参数将返回一个字符串值(如果成功)和错误字符串(如果失败),必须将其附加到该记录文件。

So the output of my process will be the same file as original but an extra string value for each record. 因此,我的过程的输出将与原始文件相同,但每个记录都会有一个额外的字符串值。

So the workflow will be something like 因此,工作流程将类似于

1) Read in File 2) Parse File 3) Send Data to webservice 4) Reconstruct File 1)读入文件2)解析文件3)将数据发送到Web服务4)重建文件

Not allowed to use the cloud for this process, but definitely thinking of splitting up the large file in batches and have several threads/virtual machines running at the same time to speed up the process. 不允许在此过程中使用云,但是绝对可以考虑将大文件分批拆分,并同时运行多个线程/虚拟机以加快该过程。 So could be multiple jobs pulling from queue of jobs, and needing to tracking these and ofcourse error handling. 因此,可能会有多个作业从作业队列中拉出,并且需要跟踪这些作业以及错误处理过程。

Is this the sort of thing WF is built for ? 这是WF的目的吗?

WF is built for supporting long running processes in reliable manner. WF旨在以可靠的方式支持长时间运行的流程。 For example, when customer want to get a loan, he comes to bank and makes a request. 例如,当客户想要获得贷款时,他来到银行提出请求。 Request can be processed during few days and after that decision will be made. 可以在几天内处理请求,然后再做出决定。 If you want to automate and model the entire process via some software application WF can be a reasonable choice in such case. 如果要通过某个软件应用程序对整个过程进行自动化和建模,在这种情况下,WF是一个合理的选择。

Your case is not intented to use WF. 您的案例不打算使用WF。

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

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