Re: [OT] Best way to log requests from a servlet and to a database?

2013-01-28 Thread André Warnier
Caldarale, Charles R wrote: From: Brian Braun [mailto:brianbr...@gmail.com] Subject: Re: [OT] Best way to log requests from a servlet and to a database? However, if I get significantly more requests, this may not be enough because MySQL will get slower and the queue will get full. I think I

Re: Best way to log requests from a servlet and to a database?

2013-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 1/25/13 9:00 PM, Brian Braun wrote: Until recently, all this happened in a syncronous way. I mean, before the Tomcat thread delivered the response, it had to create the records in the database table. The problem is that this log used

Re: [OT] Best way to log requests from a servlet and to a database?

2013-01-28 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Brian, On 1/26/13 11:29 PM, Brian Braun wrote: I finally found this, implemented it and works great! http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html However, if I get significantly more requests, this

Re: Best way to log requests from a servlet and to a database?

2013-01-26 Thread Brian Braun
My current method can hold about 3000 threads until memory collapses. I'm looking to replace this method with something more efficient in terms of RAM usage. Something like a buffer, where each item needs far less RAM than the kind of threads I'm creating now. Then when it gets full I will use

RE: [OT] Best way to log requests from a servlet and to a database?

2013-01-26 Thread Caldarale, Charles R
From: Brian Braun [mailto:brianbr...@gmail.com] Subject: Re: Best way to log requests from a servlet and to a database? (Marking this off-topic, since it has nothing to do with Tomcat.) My current method can hold about 3000 threads until memory collapses. I'm looking to replace this method

Re: [OT] Best way to log requests from a servlet and to a database?

2013-01-26 Thread Brian Braun
Hi chuck, I finally found this, implemented it and works great! http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/LinkedBlockingQueue.html However, if I get significantly more requests, this may not be enough because MySQL will get slower and the queue will get full. I think I could

RE: [OT] Best way to log requests from a servlet and to a database?

2013-01-26 Thread Caldarale, Charles R
From: Brian Braun [mailto:brianbr...@gmail.com] Subject: Re: [OT] Best way to log requests from a servlet and to a database? However, if I get significantly more requests, this may not be enough because MySQL will get slower and the queue will get full. I think I could start using this

Re: Best way to log requests from a servlet and to a database?

2013-01-25 Thread Hassan Schroeder
On Fri, Jan 25, 2013 at 6:00 PM, Brian Braun brianbr...@gmail.com wrote: What I need is to be able to accept as much HTTP requests as possible, to log every one of them as fast as possible (not syncronously), and to make everything fast and with a very low usage of RAM when MySQL gets slow and

Re: Best way to log requests from a servlet and to a database?

2013-01-25 Thread Brian Braun
Hi Hassan, I forgot to mention that I am already using Amazon's cloud (EC2+load balancer) so I love to see a suggestion that mentions it! I will definitely check your advice. The problem is that it costs money to use it, and I would love to just use some kind of framework that uses my own RAM to

Re: Best way to log requests from a servlet and to a database?

2013-01-25 Thread Brian Braun
OK, Amazon's solution would be too expensive to use as a first option. I would like to use it but just after a first queue is full. This first queue would be something running in my own host, using RAM to host the buffer. Any ideas on how to create this? On Fri, Jan 25, 2013 at 9:44 PM, Brian