[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Push and Pull?


push interface
On Fri, Jan 25, 2002 at 01:30:07PM -0800, Joe English wrote:
| >
| >          Sequential      Random
| >        +----------------------------------------------------------
| >        |
| >   Push | SAX             (events with replay)
| >        |
| >   Pull | Pull Parser     DOM
| >        |
| >        +-------------------------------------------------------
| >
| > The confusion arises since SAX and DOM are different
| > in two regards: (a) processing model (push vs pull)
| > and (b) access model (random vs sequential).
| 
| The way I see it the DOM is more of a "slurp" model --
| the application doesn't get involved during parsing, instead
| it gets the whole tree in one big gulp.

Given that DOM and SAX are interfaces, I was trying
to divorce parser from the analysis; as a product
like SoftwareAG's Tamino offers a DOM interface over
a database and hence without parsing.  In this
case the word "random access" describe exactly
the requirement imposed by the DOM interface.

| I'd describe the main difference as "event-driven" vs.
| "tree-based".

But SAX is a interface which represents a tree!  I 
think the words "event-driven" and "tree-based" do not
do as well as "sequential" vs "random" access.

| Event-driven processing models can have a "push" 
| interface (like SAX, where the parser calls the 
| application) or  a "pull" interface (where the 
| application calls the parser).

Good that we agree on push vs pull.  This is a flow 
control issue, which is, as you describe independent 
of the access issue.   One could devise a push interface 
(where the data source calls the application) that
allows the application to replay the events.  In this
case, random access would be required for the push
interface.  It just happens that such an interface
isn't all that useful... I think.

On Fri, Jan 25, 2002 at 03:21:42PM -0800, Jason Diamond wrote:
| As an alternative to "event-driven", I use the term "stream-based"
| Both SAX and .NET's XmlReader are "stream-based" but only SAX 
| is "event-driven".

Yes, stream-based is much better than event-driven; 
I tend to associate event-driven with a push interface.
Where stream-based is much closer a synonymn to sequential
access.  The only problem with stream-based is that it
doesn't have a good clean antonym.

Best,

Clark

-- 
Clark C. Evans                   Axista, Inc.
http://www.axista.com            800.926.5525
XCOLLA Collaborative Project Management Software

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.