Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / January 2006

Tip: Looking for answers? Try searching our database.

File Locking

Thread view: 
Chris Korhonen - 25 Jan 2006 13:00 GMT
Hi,

I'm currently developing a "quick and dirty" logger component that will
take HTTP requests and store them in some way. Use of a database may be
out of the question for the time being, so I'm looking for other places
to store the data. The obvious idea is in a XML/text file on my server,
using JSP to do the actually logging. So far so good...

Only problem is that its quite likely that it will be recieving high
volumes (>1 per second) of data which will need to be logged.

Given this, will I run into any issues regarding file locking etc. Can
any of you guys recommend any possible alternatives/workarounds for
this?

Regards
Chris
jcsnippets.atspace.com - 25 Jan 2006 19:48 GMT
> Hi,
>
[quoted text clipped - 10 lines]
> any of you guys recommend any possible alternatives/workarounds for
> this?

Rather than developing a new logger component, have you already had a look
at Log4j (http://logging.apache.org/log4j/docs/) ?

It's fast, reliable, open-source, rather easy to setup and use, and it has
already proven it's use in various projects.

As for the high volumes, here's a bit of text from the website itself:
"Actual logging is also quite fast, ranging from 21 microseconds using the
SimpleLayout, 37 microseconds using the TTCCLayout." .

For a "quick and dirty" logger, the SimpleLayout is more than sufficient.

If you're really interested in a smaller, simpler logger, just reply, I'll
dig one up.

Regards,

JC
--
http://jcsnippets.atspace.com
a collection of source code, tips and tricks
Chris Korhonen - 26 Jan 2006 10:54 GMT
Cheers, I'm actually looking at Log4J at the moment, and it looks likes
it will do everything I need, I may even strip it down a bit just too
simplify things even more.

I'll see how it copes with the input, as I said I'll be building this
into a JSP function initially, possibly migrating to servlet later on.
I'm just a tad concerned as it will be recieving potentially
simultanious requests.

Thanks again


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.