Two Laptop Bag
The moose likes Threads and Synchronization and the fly likes single-threaded or syncrhonous logging Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "single-threaded or syncrhonous logging" Watch "single-threaded or syncrhonous logging" New topic

single-threaded or syncrhonous logging

kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
what is single-threaded or syncrhonous logging ?
thanks is advance
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
Originally posted by kamesh aru:
what is single-threaded or syncrhonous logging ?
thanks is advance
Synchronous means that the logging would occur as a single sequence of events, described by the program code written in Java.

"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Stan James
(instanceof Sidekick)
Ranch Hand

Joined: Jan 29, 2003
Posts: 8791
So it means you have to wait for logging to complete before going on to the next line of your code. If you find that logging is slow - perhaps it sends emails or writes to databases - you might think that's a problem.

Then you'd be interested in asynchronous logging that moves the slow parts to another thread so you can return something to the user sooner. Message queuing is a common solution here.

A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
I agree. Here's the link:
subject: single-threaded or syncrhonous logging
It's not a secret anymore!