轮询和拉取有什么区别?

发布于 2024-08-31 08:00:21 字数 25 浏览 2 评论 0 原文

轮询和拉动(如果有的话)有什么区别?

What's the difference between polling and pulling (if any)?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

℉絮湮 2024-09-07 08:00:21

它们是两个不同的词。 “poll”就是寻求答案。 “拉”是用力将某物(实际上或概念上)移向自己(同样,实际上或概念上)。

当客户端上的软件定期向服务器询问某些信息时,就会“轮询”服务器。一个人将数据从数据库“拉”到客户端软件。

请注意,即使在计算领域,这两个词也有各种不同的用途,但我无法想象它们可以以不改变含义的方式互换的任何情况。低级设备驱动程序代码可能会“轮询”接口以检查它是否已准备好进行某些操作,并且不涉及网络流量。在电子学中,人们将信号“拉高”或“拉低”。

客户端可以“轮询”服务器并从服务器“拉取”数据,但请注意,当我使用每个动词时,我使用不同直接对象。只有当您将服务器拖过机房地板时,说“拉动服务器”才有意义。

They're two distinct words. To "poll" is to ask for an answer. To "pull" is to use force to move (actually or conceptually) something towards oneself (again, actually or conceptually).

One "polls" a server when software on a client periodically asks the server for something. One "pulls" data from a database towards client software.

Note that both words have various distinct uses even within the world of computing, but I can't think of any case where they're interchangeable in such a way as to leave meaning unchanged. Low-level device driver code may "poll" an interface to check whether it's ready for some operation, and there's no network traffic involved. In electronics, one "pulls" a signal up or down.

Clients may both "poll" a server and "pull" data from a server, but note that when I use each verb I use different direct objects. It only makes sense to say "pull the server" when you're dragging it across the computer room floor.

¢蛋碎的人ぎ生 2024-09-07 08:00:21

民意调查就像盖洛普对美国人民进行的民意调查一样。他们通过提问来查询特定信息。

拉力就像拉绳子一样。您希望绳子(或文件或某些数据)位于您的位置,因此您将其拉向自己。

Poll is like when Gallup does a poll of the American people. They are querying for specific information by asking a question.

Pull is like what you do to a rope. You want the rope (or a file, or some data) to be in your location, so you pull it towards you.

蘸点软妹酱 2024-09-07 08:00:21

可能存在轻微差异。

轮询试图以设定的时间间隔请求信息。

拉取只是指您向其他人请求数据,而不是让他们将数据发送给您。

话虽这么说,我听说它们可以互换使用。

There is a possible slight difference.

Polling is attempting to request information at set intervals.

Pulling just refers to the fact that you are requesting data from somebody else rather than having them send it to you.

That being said, I've heard them used interchangeably.

Hello爱情风 2024-09-07 08:00:21

对于网络通信,它们都引用相同的方案,您定期从外部源请求数据。请参阅拉取技术

当然,相反的是推送,即数据可用时发送。

With respect to network communications, they both refer to the same scheme, where you are periodically requesting data from an external source. See Pull Technology.

Of course the opposite is Pushing, where data is sent as it becomes available.

生寂 2024-09-07 08:00:21

poll 是快速请求,而 pull 是缓慢请求。

人们可能会进行民意调查,询问是否可以立即获取可以提取的信息。区别并不在于民意调查的答案必须是布尔值,而是民意调查的答案是快速且容易获得的,否则答案将被拒绝。民意调查意味着正在提供选择,这与不提供选择的拉动相反。拉取可能会导致调用者等待信息变得可用,或者可能会提供其他方式,以便稍后在详细信息实际变得可用时将详细信息返回给调用者。

A poll is quick request while a pull is a slow demand.

One may poll asking if information is immediately available which can be pulled. The distinction is not that the answer to a poll must be boolean, but that the answer to a poll is quick and readily available or the answer will be denied. A poll implies that a choice is being offered which is contrary to a pull, where no choice is offered. A pull may cause the caller to wait for the information to become available or may offer other means of returning the detailed information to the caller later when it actually becomes available.

内心激荡 2024-09-07 08:00:21

对于实际使用示例,我遇到过关于 更改数据捕获

[...]或下游服务和应用程序以固定时间间隔轮询源数据库以提取更新的数据。

For practical use example, I have come across this article (first paragraph) regarding Change Data Capture:

[...] or downstream services and applications poll the source database at fixed intervals to pull the updated data.

浮华 2024-09-07 08:00:21

您逐字询问“轮询”与“拉动”,但也许您实际上是在询问“轮询”与“使用拉动订阅模型”。

根据 https://dev.to/anubhavitis/push-vs- pull-api-architecture-1djo,它们是相同的东西:

拉:通常称为轮询

You are verbatim asking about "polling" vs "pulling", but maybe you are actually asking about "polling" vs "using a pull subscription model".

According to https://dev.to/anubhavitis/push-vs-pull-api-architecture-1djo, they are the same thing:

Pull: Often referred to as polling

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文