Socket based logging is a solution. But JMS is not. Timestamp based
algorithm is NOT a solution.
Run the following example PLEASE:
class t {
public static void main(String[] args) throws Exception {
long[] time = new long[10000];
for (int i = 0; i < time.length; i++)
time[i] = System.currentTimeMillis();
for (int i = 0; i < time.length; i++)
System.out.println(i + ": " + time[i]);
}
}
You will find the resolution of the timestamp is not good enough.
If the order of logging records is not important, you probably do not
need logging.
--- Juan Pablo Lorandi <[EMAIL PROTECTED]> wrote:
> No, there isn't, and even when so, guarantees are not 100%. No product
> can guarantee 100% of anything except failure.
> BTW, Wei, <vendor/> tags are apreciated by some people on this forum; me
> being one of them, I would be most grateful if you use them. TIA.
>
> On the timing thing: the msgs can be timestamped at the originating
> point with log4j.
> This of course introduces the problem of synch'ing the clocks(there are
> several solutions available).
> They can also be timestamped on
> IMHO problems in synchronizing delivery of logging events(and thus
> timestamping at the server) will ALWAYS be there when you're using
> TCP/IP (it's the way the stack works when there are some guarantees of
> delivery) and will be most notorious when logging event generators are
> distributed upon a not so balanced network(networks loaded near their
> nominal capacity, non co-located servers, etc.). In my experience,
> log4j's SocketNodes do the work as well as JMS, and are considerably
> faster. I would use JMS for logging unless you plan to use the logs as
> an important part of your application(part of some business logic is to
> mine data from logged events, etc.). If what you want is to deploy a
> cluster of machines, use SocketNode and forget about it.
>
> My 2c,
>
>
> Juan Pablo Lorandi
> Chief Software Architect
> Code Foundry Ltd.
> [EMAIL PROTECTED]
>
> Barberstown, Straffan, Co. Kildare, Ireland.
> Tel: +353-1-6012050 Fax: +353-1-6012051
> Mobile: +353-86-2157900
> www.codefoundry.com
>
>
> > -----Original Message-----
> > From: A mailing list for Enterprise JavaBeans development
> > [mailto:[EMAIL PROTECTED]] On Behalf Of Ted Neward
> > Sent: Saturday, August 10, 2002 12:58 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Distributed Logging
> >
> >
> > It depends on the Quality-of-service desired for the JMS
> > provider, IIRC. JMS providers are able to ignore order unless
> > required to do otherwise, IIRC from my readings of the JMS
> > Spec. Is there something in the spec that says otherwise?
> >
> > Ted Neward
> > { .NET && Java } Author, Instructor
> > http://www.javageeks.com
> > http://www.clrgeeks.com
> >
> > ----- Original Message -----
> > From: "William Ferguson" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, August 09, 2002 2:04 PM
> > Subject: Re: [EJB-INT] Distributed Logging
> >
> >
> > > AFAIK a JMSQueue not only guarantees delivery but also
> > guarantees to
> > > delivery the messages in the same order in which they were added to
> > > the queue.
> > >
> > > IMO JMS would make a fine log delivery mechanism.
> > >
> > > William
> > >
> > >
> > > > -----Original Message-----
> > > > From: Wei Jiang [mailto:[EMAIL PROTECTED]]
> > > > Sent: Friday, 9 August 2002 10:34
> > > > To: [EMAIL PROTECTED]
> > > > Subject: Re: Distributed Logging
> > > >
> > > >
> > > > Nothing will be lost with JMS. It guarantees delivery,
> > but does not
> > > > guarantee timing. Your logging will not be chronological.
> > > >
> > > >
> > > > --- Juan Pablo Lorandi <[EMAIL PROTECTED]> wrote:
> > > > > If you're using log4j, alternatively, you can start a
> > > > SocketNode on a PC
> > > > > on the network. It will listen to LoggingEvent from all the
> > > > machines you
> > > > > wish and dump into a file. It will be less expensive on network
> > > > > resources than JMS and it's easier to setup. On the other
> > > > hand, I think
> > > > > it's less likely that logging events will be lost with JMS.
> > > > >
> > > > > My 2c,
> > > > >
> > > > > Juan Pablo Lorandi
> > > > > Chief Software Architect
> > > > > Code Foundry Ltd.
> > > > > [EMAIL PROTECTED]
> > > > >
> > > > > Barberstown, Straffan, Co. Kildare, Ireland.
> > > > > Tel: +353-1-6012050 Fax: +353-1-6012051
> > > > > Mobile: +353-86-2157900
> > > > > www.codefoundry.com
> > > > >
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: A mailing list for Enterprise JavaBeans development
> > > > > > [mailto:[EMAIL PROTECTED]] On Behalf Of Jay Wagner
> > > > > > Sent: Thursday, August 08, 2002 2:17 PM
> > > > > > To: [EMAIL PROTECTED]
> > > > > > Subject: Re: Distributed Logging
> > > > > >
> > > > > >
> > > > > > Vikram,
> > > > > >
> > > > > > If I assume you are using log4j or something such as
> > that, you
> > > > > > can implement the logging using JMS providing a JMSAppender
> > > > > > which you can have various parties subscribe to the logging
> > > > > > topics.
> > > > > >
> > > > > > Jay Wagner
> > > > > > Sybase Inc.
> > > > > >
> > > > > > ----- Original Message -----
> > > > > > From: "Vikram Naik" <[EMAIL PROTECTED]>
> > > > > > To: <[EMAIL PROTECTED]>
> > > > > > Sent: Thursday, August 08, 2002 1:03 AM
> > > > > > Subject: Distributed Logging
> > > > > >
> > > > > >
> > > > > > > Hello All,
> > > > > > >
> > > > > > > We have a requirement for distributed logging.
> > > > i.e. though
> > > > > > > the
> > > > > > business
> > > > > > > entities are deployed at different locations the log
> > > > file should be
> > > > > > > generated at one place. Is that possible???
> > > > > > >
> > > > > > > TIA
> > > > > > > Vikram Naik
> > > > > > >
> > > > > > >
> > > > > > ==============================================================
> > > > > > =============
> > > > > > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > > > > > include in the
> > > > > > body
> > > > > > > of the message "signoff EJB-INTEREST". For general help,
> > > > > > send email
> > > > > > > to [EMAIL PROTECTED] and include in the body of the
> > > > > > > message "help".
> > > > > > >
> > > > > >
> > > > > > ==============================================================
> > > > > > =============
> > > > > > To unsubscribe, send email to [EMAIL PROTECTED]
> > and include
> > > > > > in the body of the message "signoff EJB-INTEREST".
> > For general
> > > > > > help, send email to [EMAIL PROTECTED] and include in the
> > > > > > body of the message "help".
> > > > > >
> > > > >
> > > > >
> > > > ==============================================================
> > > > =============
> > > > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > > > include in the body
> > > > > of the message "signoff EJB-INTEREST". For general help,
> > > > send email to
> > > > > [EMAIL PROTECTED] and include in the body of the message
> > > > > "help".
> > > > >
> > > >
> > > >
> > > > __________________________________________________
> > > > Do You Yahoo!?
> > > > HotJobs - Search Thousands of New Jobs http://www.hotjobs.com
> > > >
> > > > ==============================================================
> > > > =============
> > > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in
> > > > the body of the message "signoff EJB-INTEREST". For general help,
> > > > send email to
> > > > [EMAIL PROTECTED] and include in the body of the
> > message "help".
> > > >
> > > >
> > >
> > >
> > ==============================================================
> > =============
> > > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the
> > body
> > > of the message "signoff EJB-INTEREST". For general help,
> > send email
> > > to [EMAIL PROTECTED] and include in the body of the message
> > > "help".
> > >
> > >
> >
> > ==============================================================
> > =============
> > To unsubscribe, send email to [EMAIL PROTECTED] and
> > include in the body of the message "signoff EJB-INTEREST".
> > For general help, send email to [EMAIL PROTECTED] and
> > include in the body of the message "help".
> >
>
> ===========================================================================
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff EJB-INTEREST". For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>
__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".