Difference between Pull Parsing and Push Parsing

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

Overview

Streaming pull parsing refers to a programming model in which a client application calls a "next element"-type method on a parser.

Streaming push parsing refers to a programming model in which a parser sends (pushes) data to the client when the parser encounters an "interesting" structure.

With pull parsing, the application controls the application thread, and can call methods on the parser when needed. With pull parsers, the parser controls the thread and the application can only accept invocations from the parser. Thus, pull clients can read multiple documents at the same time with a single thread.