RE: RE: User Notification

2002-09-24 Thread Galbreath, Mark

Yeah, what he said.  (I need a cup of coffee *yawn*).

Mark

-Original Message-
From: Joe Barefoot [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 7:53 PM

Sorry to intrude, but this is a red herring argument.  If you are storing
the XML in the DB as character data, SAX is obviously a faster parsing
method.  If you are storing it as a serialized DOM object, then there is no
parsing to be done, just de-serialization. 

FYI, JDOM builds a DOM-like model of the XML by using JAXP and whatever SAX
driver implementation you give it.  The slow-down in DOM comes from object
creation, so if you are thinking of using SAX to build an object hierarchy
or Collection of objects, don't.  That's exactly what JDOM does.  For small
XML data, the difference between JDOM parsing and straight SAX parsing is
negligible, particularly if you are going to use the SAX callbacks to create
and store Objects (as appears to be the case).

If however, you are going to use the callbacks to fire off messages as the
XML is parsed (no object storage), then that's a horse of a different
color

peace,
Joe

> -Original Message-
> From: Vernon Wu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 23, 2002 4:49 PM
> To: Struts Users Mailing List
> Subject: Re: RE: User Notification
> 
> 
> 
> What else would you suggest? 
> 
> The reason I am thinking about use DOM is that messages are 
> stored in a XML format in DB since the number of 
> messages can vary. The XML format data needs to be parsed 
> either SAX or DOM. If DOM parsing is too slow, SAX 
> parsing into a collection object is a way to get around.
> 
>
> 9/23/2002 3:03:49 PM, "Galbreath, Mark" <[EMAIL PROTECTED]> wrote:
> 
> >I hope he means stored as an XML doc.  Parsing DOMs are 
> notoriously slow.
> >
> >-Original Message-
> >From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, September 23, 2002 5:41 PM
> >
> >Sounds like a simple DB-lookup to me.  You aren't going to 
> update the 
> >client until they refresh at page at least.  You'd just have 
> to include 
> >something that polled for new messages in each page you 
> wanted them to 
> >receive notification.  I'm not familiar with what you mean 
> by "stored as 
> >a DOM" or the implications of that, so maybe this is a bad 
> suggestion ;-)
> >
> >Vernon Wu wrote:
> >
> >>I need to implement a message system, sort like email but 
> inside the Java
> >web application only for its users. After one 
> >>user, A, sends a message to another, B, B shall be notified 
> to retrieve the
> >updated messages if B is on line. I plan to 
> >>implement messages as stored in a DOM. My question is how 
> the notification
> >shall be implemented.  I only use a web 
> >>container, and considering to add in a JMS server for IM.
> >>
> >>Any suggestions?
> >>
> >>Thanks,
> >>
> >>Vernon
> >>
> >
> >-- 
> >Eddie Bush
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >--
> >To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> >
> >
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: RE: User Notification

2002-09-24 Thread Galbreath, Mark

Absolutely use SAXP (java.sun.com) or JDOM (www.jdom.org) to parse the XML
in a messaging system!  DOM parsing would be a big bottleneck on any
high-traffic system.

Mark

-Original Message-
From: Vernon Wu [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 23, 2002 7:49 PM

The reason I am thinking about use DOM is that messages are stored in a XML
format in DB since the number of 
messages can vary. The XML format data needs to be parsed either SAX or DOM.
If DOM parsing is too slow, SAX 
parsing into a collection object is a way to get around.

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: RE: User Notification

2002-09-23 Thread Joe Barefoot

Sorry to intrude, but this is a red herring argument.  If you are storing the XML in 
the DB as character data, SAX is obviously a faster parsing method.  If you are 
storing it as a serialized DOM object, then there is no parsing to be done, just 
de-serialization. 

FYI, JDOM builds a DOM-like model of the XML by using JAXP and whatever SAX driver 
implementation you give it.  The slow-down in DOM comes from object creation, so if 
you are thinking of using SAX to build an object hierarchy or Collection of objects, 
don't.  That's exactly what JDOM does.  For small XML data, the difference between 
JDOM parsing and straight SAX parsing is negligible, particularly if you are going to 
use the SAX callbacks to create and store Objects (as appears to be the case).

If however, you are going to use the callbacks to fire off messages as the XML is 
parsed (no object storage), then that's a horse of a different color

peace,
Joe

> -Original Message-
> From: Vernon Wu [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 23, 2002 4:49 PM
> To: Struts Users Mailing List
> Subject: Re: RE: User Notification
> 
> 
> 
> What else would you suggest? 
> 
> The reason I am thinking about use DOM is that messages are 
> stored in a XML format in DB since the number of 
> messages can vary. The XML format data needs to be parsed 
> either SAX or DOM. If DOM parsing is too slow, SAX 
> parsing into a collection object is a way to get around.
> 
>
> 9/23/2002 3:03:49 PM, "Galbreath, Mark" <[EMAIL PROTECTED]> wrote:
> 
> >I hope he means stored as an XML doc.  Parsing DOMs are 
> notoriously slow.
> >
> >-Original Message-
> >From: Eddie Bush [mailto:[EMAIL PROTECTED]]
> >Sent: Monday, September 23, 2002 5:41 PM
> >
> >Sounds like a simple DB-lookup to me.  You aren't going to 
> update the 
> >client until they refresh at page at least.  You'd just have 
> to include 
> >something that polled for new messages in each page you 
> wanted them to 
> >receive notification.  I'm not familiar with what you mean 
> by "stored as 
> >a DOM" or the implications of that, so maybe this is a bad 
> suggestion ;-)
> >
> >Vernon Wu wrote:
> >
> >>I need to implement a message system, sort like email but 
> inside the Java
> >web application only for its users. After one 
> >>user, A, sends a message to another, B, B shall be notified 
> to retrieve the
> >updated messages if B is on line. I plan to 
> >>implement messages as stored in a DOM. My question is how 
> the notification
> >shall be implemented.  I only use a web 
> >>container, and considering to add in a JMS server for IM.
> >>
> >>Any suggestions?
> >>
> >>Thanks,
> >>
> >>Vernon
> >>
> >
> >-- 
> >Eddie Bush
> >
> >
> >
> >
> >--
> >To unsubscribe, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> ><mailto:[EMAIL PROTECTED]>
> >
> >--
> >To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> >
> >
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: RE: User Notification

2002-09-23 Thread Vernon Wu


What else would you suggest? 

The reason I am thinking about use DOM is that messages are stored in a XML format in 
DB since the number of 
messages can vary. The XML format data needs to be parsed either SAX or DOM. If DOM 
parsing is too slow, SAX 
parsing into a collection object is a way to get around.

   
9/23/2002 3:03:49 PM, "Galbreath, Mark" <[EMAIL PROTECTED]> wrote:

>I hope he means stored as an XML doc.  Parsing DOMs are notoriously slow.
>
>-Original Message-
>From: Eddie Bush [mailto:[EMAIL PROTECTED]]
>Sent: Monday, September 23, 2002 5:41 PM
>
>Sounds like a simple DB-lookup to me.  You aren't going to update the 
>client until they refresh at page at least.  You'd just have to include 
>something that polled for new messages in each page you wanted them to 
>receive notification.  I'm not familiar with what you mean by "stored as 
>a DOM" or the implications of that, so maybe this is a bad suggestion ;-)
>
>Vernon Wu wrote:
>
>>I need to implement a message system, sort like email but inside the Java
>web application only for its users. After one 
>>user, A, sends a message to another, B, B shall be notified to retrieve the
>updated messages if B is on line. I plan to 
>>implement messages as stored in a DOM. My question is how the notification
>shall be implemented.  I only use a web 
>>container, and considering to add in a JMS server for IM.
>>
>>Any suggestions?
>>
>>Thanks,
>>
>>Vernon
>>
>
>-- 
>Eddie Bush
>
>
>
>
>--
>To unsubscribe, e-mail:
>
>For additional commands, e-mail:
>
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>




--
To unsubscribe, e-mail:   
For additional commands, e-mail: