OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Push and Pull?

[ Lists Home | Date Index | Thread Index ]

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




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS