开发者

What's the difference between polling and pulling?

What's the difference between pol开发者_如何学Cling and pulling (if any)?


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.


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.


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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜