非常快速的多线程URL提取 [英] Very Fast Multithreaded URL Fetching

查看:124
本文介绍了非常快速的多线程URL提取的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


有谁知道一个对象或如何创建一个对象,这将允许我获取最多10个URL(包含XML) - 在一个极速的服务器中提供数据)

方式?


如果请求的时间超过应有的时间,则该对象需要

能够当场超时(无需等待)。超时值需要

才能达到约50毫秒。通常,我希望暂停时间为1.5美元左右。


提前谢谢,

Arsen

Hello,

Does anyone know if an object or how to create one, that will allow me to
fetch up to 10 URLs (containing XML-feed data) in an extremelly fast server
side fashion?

If the request is taking longer than it should, the object would need to be
able to timeout on the spot (without waiting). The timeout value would need
to be acurate to about 50 milliseconds. Usually, I would want the timeout to
be around 1.5 seconds.

Thanks in advance,
Arsen

推荐答案

Arsen,


假设第一个问题是为什么需要多线程?


在一个线程中运行它可能足够公平,但是一个简单的循环应该足够b / b
就足够了,没有必要复杂的东西;-)


查看WebRequest类。您可以将超时设置为属性。从10个数组循环中的值中提取

WebRequest.Create(URI),该数组包含

您的网址。


Tam


" Arsen V." < AR **************** @ emergency24.com>在消息中写道

news:eU ************** @ TK2MSFTNGP12.phx.gbl ...
Arsen,

Suppose the first question is why does it need to be multithreaded?

Running it in a thread possibly fair enough but a simple loop should
suffice, no point complicating something that doesnt require it ;-)

Look at WebRequest class. You can set the timeout as a property. Feed the
WebRequest.Create(URI) from values in a loop from an array of 10 that holds
your urls.

Tam

"Arsen V." <ar****************@emergency24.com> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
你好,
有没有人知道一个对象或如何创建一个对象,这将允许我以极快的
服务器端方式获取多达10个URL(包含XML-feed数据)?

如果请求的时间超过应有的时间,则对象需要
才能在现场超时(无需等待)。超时值为
需要精确到约50毫秒。通常,我希望超时
大约1.5秒。

提前致谢,阿森
Hello,

Does anyone know if an object or how to create one, that will allow me to
fetch up to 10 URLs (containing XML-feed data) in an extremelly fast server side fashion?

If the request is taking longer than it should, the object would need to be able to timeout on the spot (without waiting). The timeout value would need to be acurate to about 50 milliseconds. Usually, I would want the timeout to be around 1.5 seconds.

Thanks in advance,
Arsen



Arsen,



运行它线程可能足够公平,但是一个简单的循环应该足够了,没有必要复杂的东西;-)


查看WebRequest类。您可以将超时设置为属性。从10个数组循环中的值中提取

WebRequest.Create(URI),该数组包含

您的网址。


Tam


" Arsen V." < AR **************** @ emergency24.com>在消息中写道

news:eU ************** @ TK2MSFTNGP12.phx.gbl ...
Arsen,

Suppose the first question is why does it need to be multithreaded?

Running it in a thread possibly fair enough but a simple loop should
suffice, no point complicating something that doesnt require it ;-)

Look at WebRequest class. You can set the timeout as a property. Feed the
WebRequest.Create(URI) from values in a loop from an array of 10 that holds
your urls.

Tam

"Arsen V." <ar****************@emergency24.com> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
你好,
有没有人知道一个对象或如何创建一个对象,这将允许我以极快的
服务器端方式获取多达10个URL(包含XML-feed数据)?

如果请求的时间超过应有的时间,则对象需要
才能在现场超时(无需等待)。超时值为
需要精确到约50毫秒。通常,我希望超时
大约1.5秒。

提前致谢,阿森
Hello,

Does anyone know if an object or how to create one, that will allow me to
fetch up to 10 URLs (containing XML-feed data) in an extremelly fast server side fashion?

If the request is taking longer than it should, the object would need to be able to timeout on the spot (without waiting). The timeout value would need to be acurate to about 50 milliseconds. Usually, I would want the timeout to be around 1.5 seconds.

Thanks in advance,
Arsen



对不起,我应该已经添加了...


标准互联网认为运行10个连续的webrequests是粗鲁的

协议。 2是标准,这就是为什么XP被设置为在任何时候只允许两次下载



所以一个线程循环通过一个数组网址是你最好的

解决方案;)


Tam

" Arsen V." < AR **************** @ emergency24.com>在消息中写道

news:eU ************** @ TK2MSFTNGP12.phx.gbl ...
sorry, and i should have added...

Running 10 consecutive webrequests is considered rude by standard internet
protocol. 2 is the standard which is why XP is set to only allow two
downloads at any one time.

so a single threaded loop to go through an array of urls is your best
solution ;)

Tam
"Arsen V." <ar****************@emergency24.com> wrote in message
news:eU**************@TK2MSFTNGP12.phx.gbl...
你好,
有没有人知道一个对象或如何创建一个对象,这将允许我以极快的
服务器端方式获取多达10个URL(包含XML-feed数据)?

如果请求的时间超过应有的时间,则对象需要
才能在现场超时(无需等待)。超时值为
需要精确到约50毫秒。通常,我希望超时
大约1.5秒。

提前致谢,阿森
Hello,

Does anyone know if an object or how to create one, that will allow me to
fetch up to 10 URLs (containing XML-feed data) in an extremelly fast server side fashion?

If the request is taking longer than it should, the object would need to be able to timeout on the spot (without waiting). The timeout value would need to be acurate to about 50 milliseconds. Usually, I would want the timeout to be around 1.5 seconds.

Thanks in advance,
Arsen



这篇关于非常快速的多线程URL提取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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